Instructions to use prithivMLmods/chandra-ocr-2-NVFP4-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/chandra-ocr-2-NVFP4-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="prithivMLmods/chandra-ocr-2-NVFP4-GGUF")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("prithivMLmods/chandra-ocr-2-NVFP4-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use prithivMLmods/chandra-ocr-2-NVFP4-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf prithivMLmods/chandra-ocr-2-NVFP4-GGUF:NVFP4 # Run inference directly in the terminal: llama cli -hf prithivMLmods/chandra-ocr-2-NVFP4-GGUF:NVFP4
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf prithivMLmods/chandra-ocr-2-NVFP4-GGUF:NVFP4 # Run inference directly in the terminal: llama cli -hf prithivMLmods/chandra-ocr-2-NVFP4-GGUF:NVFP4
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf prithivMLmods/chandra-ocr-2-NVFP4-GGUF:NVFP4 # Run inference directly in the terminal: ./llama-cli -hf prithivMLmods/chandra-ocr-2-NVFP4-GGUF:NVFP4
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf prithivMLmods/chandra-ocr-2-NVFP4-GGUF:NVFP4 # Run inference directly in the terminal: ./build/bin/llama-cli -hf prithivMLmods/chandra-ocr-2-NVFP4-GGUF:NVFP4
Use Docker
docker model run hf.co/prithivMLmods/chandra-ocr-2-NVFP4-GGUF:NVFP4
- LM Studio
- Jan
- vLLM
How to use prithivMLmods/chandra-ocr-2-NVFP4-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prithivMLmods/chandra-ocr-2-NVFP4-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/chandra-ocr-2-NVFP4-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/prithivMLmods/chandra-ocr-2-NVFP4-GGUF:NVFP4
- SGLang
How to use prithivMLmods/chandra-ocr-2-NVFP4-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "prithivMLmods/chandra-ocr-2-NVFP4-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/chandra-ocr-2-NVFP4-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "prithivMLmods/chandra-ocr-2-NVFP4-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/chandra-ocr-2-NVFP4-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Ollama
How to use prithivMLmods/chandra-ocr-2-NVFP4-GGUF with Ollama:
ollama run hf.co/prithivMLmods/chandra-ocr-2-NVFP4-GGUF:NVFP4
- Unsloth Desktop
- Pi
How to use prithivMLmods/chandra-ocr-2-NVFP4-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf prithivMLmods/chandra-ocr-2-NVFP4-GGUF:NVFP4
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "prithivMLmods/chandra-ocr-2-NVFP4-GGUF:NVFP4" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use prithivMLmods/chandra-ocr-2-NVFP4-GGUF with Docker Model Runner:
docker model run hf.co/prithivMLmods/chandra-ocr-2-NVFP4-GGUF:NVFP4
- Lemonade
How to use prithivMLmods/chandra-ocr-2-NVFP4-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull prithivMLmods/chandra-ocr-2-NVFP4-GGUF:NVFP4
Run and chat with the model
lemonade run user.chandra-ocr-2-NVFP4-GGUF-NVFP4
List all available models
lemonade list
- Hermes Agent
How to use prithivMLmods/chandra-ocr-2-NVFP4-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf prithivMLmods/chandra-ocr-2-NVFP4-GGUF:NVFP4
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default prithivMLmods/chandra-ocr-2-NVFP4-GGUF:NVFP4
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use prithivMLmods/chandra-ocr-2-NVFP4-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf prithivMLmods/chandra-ocr-2-NVFP4-GGUF:NVFP4
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "prithivMLmods/chandra-ocr-2-NVFP4-GGUF:NVFP4" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
chandra-ocr-2-NVFP4-GGUF
Chandra-OCR-2 from Datalab is a state-of-the-art OCR model that outputs structured markdown, HTML, or JSON while preserving precise layout information from images and PDFs across 90+ languages. It achieves SOTA benchmarks with 85.9% on olmocr and 77.8% multilingual score (+12% over Chandra 1), delivering major gains in math equation parsing, complex table reconstruction (including merged cells), handwriting recognition, form elements like checkboxes, and wide-document layouts alongside vastly improved image captioning and diagram extraction. Available via free playground, hosted API for production speed/accuracy, or local deployment through HuggingFace Transformers/vLLM, it excels at transforming challenging real-world documents—financial filings, research papers, historical scans, multilingual forms—into semantically rich structured data for downstream AI pipelines and automation workflows.
MTP — Speculative Decoding: No
Model Files
| File Name | Quant Type | File Size | File Link | Description |
|---|---|---|---|---|
| chandra-ocr-2-NVFP4.gguf | NVFP4 | 4.75 GB | Link | NVFP4 quantization. Highly optimized for specific hardware accelerators, offering a strong balance of size and performance. |
| chandra-ocr-2.mmproj.gguf | mmproj | 676 MB | Link | Multimodal projection file. Used for vision/language models. |
NVFP4 Test Run
Tested chandra-ocr-2-NVFP4.gguf with multimodal vision support using llama-cli on an NVIDIA RTX PRO 6000 Blackwell Server Edition GPU with 96 GB of VRAM.
Performance Metrics
| Metric | Value |
|---|---|
| Average Prompt Processing Speed | 2,957.14 tokens/s |
| Average Generation Speed | 192.13 tokens/s |
| Average Wall Time | 8.98 seconds |
| Total Wall Time | 26.9 seconds |
| Context Length | 16,384 tokens |
| KV Cache (K) | q8_0 |
| GPU | NVIDIA RTX PRO 6000 Blackwell Server Edition |
| GPU VRAM Capacity | 96 GB |
| Peak GPU VRAM Usage | 6.66 GiB |
| Peak GPU Utilization | 88% |
| GPU Layers Offloaded | 99 (-ngl 99) |
| Random Seed | 42 |
| Speculative Decoding | Disabled |
| Vision Support | Enabled (--mmproj) |
| Test Runs | 3 |
Test Shots
| Shot | Test |
|---|---|
| Shot 1 | Vision OCR: Image 1 |
| Shot 2 | Vision OCR: Image 2 |
| Shot 3 | Vision OCR: Image 3 |
Run Inference
# Download the image
wget -O /path/to/models/input.jpeg \
"https://cdn-uploads.huggingface.co/production/uploads/65bb837dbfb878f46c77de4c/EF8cldKHhUEO3MZPZSD19.jpeg"
# Run Chandra OCR 2 NVFP4 with vision support
/data/llama.cpp/build/bin/llama-cli \
-m /path/to/models/chandra-ocr-2-NVFP4.gguf \
--mmproj /path/to/models/chandra-ocr-2.mmproj.gguf \
-ngl 99 \
-c 16384 \
--cache-type-k q8_0 \
--seed 42 \
-n 8192 \
-st \
--image /path/to/models/input.jpeg \
-p "OCR the image"
Performance results reflect this specific hardware and inference configuration. Actual throughput may vary depending on the image, model, software build, and runtime settings.
llama.cpp
LLM inference in C/C++ — https://github.com/ggml-org/llama.cpp
Snapshots (3)
Quantized using llama.cpp by prithivMLmods
- Downloads last month
- -
4-bit
Model tree for prithivMLmods/chandra-ocr-2-NVFP4-GGUF
Base model
datalab-to/chandra-ocr-2


