Instructions to use prithivMLmods/OCRia-1-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/OCRia-1-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="prithivMLmods/OCRia-1-GGUF")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("prithivMLmods/OCRia-1-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use prithivMLmods/OCRia-1-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/OCRia-1-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf prithivMLmods/OCRia-1-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf prithivMLmods/OCRia-1-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf prithivMLmods/OCRia-1-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf prithivMLmods/OCRia-1-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf prithivMLmods/OCRia-1-GGUF:Q4_K_M
Use Docker
docker model run hf.co/prithivMLmods/OCRia-1-GGUF:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use prithivMLmods/OCRia-1-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prithivMLmods/OCRia-1-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/OCRia-1-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/OCRia-1-GGUF:Q4_K_M
- SGLang
How to use prithivMLmods/OCRia-1-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/OCRia-1-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/OCRia-1-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/OCRia-1-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/OCRia-1-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/OCRia-1-GGUF with Ollama:
ollama run hf.co/prithivMLmods/OCRia-1-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use prithivMLmods/OCRia-1-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/OCRia-1-GGUF:Q4_K_M
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:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "prithivMLmods/OCRia-1-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use prithivMLmods/OCRia-1-GGUF with Docker Model Runner:
docker model run hf.co/prithivMLmods/OCRia-1-GGUF:Q4_K_M
- Lemonade
How to use prithivMLmods/OCRia-1-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull prithivMLmods/OCRia-1-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.OCRia-1-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use prithivMLmods/OCRia-1-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/OCRia-1-GGUF:Q4_K_M
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:9931/v1 hermes config set model.default prithivMLmods/OCRia-1-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use prithivMLmods/OCRia-1-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/OCRia-1-GGUF:Q4_K_M
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:9931/v1 \ --custom-model-id "prithivMLmods/OCRia-1-GGUF:Q4_K_M" \ --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"
OCRia-1-GGUF
OCRia-1 is a 4B-parameter vision-language model developed by LlamaIndex on top of Qwen3.5-4B for high-fidelity single-page document parsing directly from page images without external OCR engines or text layers. Trained on 100,979 real and synthetic pages via supervised fine-tuning, GRPO reinforcement learning with verifiable dimension-specific rewards, and checkpoint averaging, it transcribes complex documents into structured Markdownβconverting multi-level and merged-cell tables (
colspan/rowspan) as well as plot charts into HTML<table>elements, diagrams into Mermaid blocks, math and handwriting into LaTeX, and fine-grained formatting (strikethrough, underlines, highlights, checkboxes, page furniture, and watermarks) into semantic tags, with optional post-hoc visual grounding viaocria_grounding. Ranking as the top open-weight model on both ParseBench 2 (85.24 overall across 4,317 pages) and ParseBench 1 (84.65 overall across 2,078 pages, scoring 82.47 on charts), it is distributed in unoptimized BF16 weights (10.35 GB) forvLLM,Transformers, andOllamaunder the custom OCRia-1 Model and Code License (free for research, personal use, and non-competing organizations under $2M in annual revenue and funding).
MTP β Speculative Decoding: Yes
Multi-Token Prediction (MTP) GGUF is a specialized GGUF model file format extension that integrates speculative decoding directly into the model weights to significantly accelerate local inference. Unlike traditional speculative decoding which requires a separate, smaller "draft" model, MTP GGUF files include additional output heads within the main model architecture that predict multiple future tokens in a single forward pass.
MTP-Repackaged BF16 Weights Available Here β https://huggingface.co/prithivMLmods/OCRia-1-MTP-Repacked
Model Files
| File Name | Quant Type | File Size | File Link | Description |
|---|---|---|---|---|
| OCRia-1.BF16.gguf | BF16 | 9.94 GB | Link | Full BF16 weights. Highest quality, largest file size. |
| OCRia-1.Q2_K.gguf | Q2_K | 2.23 GB | Link | Lowest quality, smallest file size, only for extreme resource constraints. |
| OCRia-1.Q3_K_L.gguf | Q3_K_L | 2.82 GB | Link | Lower quality but usable, good for low RAM availability. |
| OCRia-1.Q3_K_M.gguf | Q3_K_M | 2.63 GB | Link | Low quality, smaller footprint. |
| OCRia-1.Q4_0.gguf | Q4_0 | 2.97 GB | Link | Standard 4-bit quantization. |
| OCRia-1.Q4_K_M.gguf | Q4_K_M | 3.17 GB | Link | Good quality, default size for most use cases, recommended. |
| OCRia-1.Q4_K_S.gguf | Q4_K_S | 2.99 GB | Link | Slightly lower quality with more space savings, recommended. |
| OCRia-1.Q5_0.gguf | Q5_0 | 3.51 GB | Link | Standard 5-bit quantization. |
| OCRia-1.Q5_K_M.gguf | Q5_K_M | 3.62 GB | Link | High quality, recommended. |
| OCRia-1.Q5_K_S.gguf | Q5_K_S | 3.51 GB | Link | High quality with slight space savings, recommended. |
| OCRia-1.Q6_K.gguf | Q6_K | 4.08 GB | Link | Very high quality, near perfect, recommended. |
| OCRia-1.Q8_0.gguf | Q8_0 | 5.29 GB | Link | Extremely high quality, generally unneeded but max available standard quant. |
| OCRia-1.mmproj-bf16.gguf | mmproj-bf16 | 676 MB | Link | Multimodal projection file in BF16 format. Used for vision/OCR capabilities. |
| OCRia-1.mmproj-q8_0.gguf | mmproj-q8_0 | 367 MB | Link | Multimodal projection file in Q8_0 format. Used for vision/OCR capabilities with higher precision than standard quants but smaller than BF16. |
Q8_0 Test Run
Tested OCRia-1.Q8_0.gguf with the BF16 multimodal projector (OCRia-1.mmproj-bf16.gguf) on an NVIDIA RTX PRO 6000 Blackwell Server Edition GPU with 96 GB of VRAM, using llama-cli with full GPU offloading and MTP speculative decoding.
Performance Metrics
| Metric | Value |
|---|---|
| Average Prompt Processing Speed | 1,863.07 tokens/s |
| Average Generation Speed | 335.73 tokens/s |
| Total Wall Time | 19.8 seconds |
| Context Length | 16,384 tokens |
| KV Cache (K) | q8_0 |
| Multimodal Projector | OCRia-1.mmproj-bf16.gguf |
| GPU | NVIDIA RTX PRO 6000 Blackwell Server Edition |
| GPU VRAM Capacity | 96 GB |
| Peak GPU VRAM Usage | 6.62 GiB |
| Peak GPU Utilization | 79% |
| GPU Layers Offloaded | 99 (-ngl 99) |
| Random Seed | 42 |
| Speculative Decoding | MTP (draft_n_max=2) |
| Test Runs | 3 |
Test Shots
| Shot | Test | Image |
|---|---|---|
| Shot 1 | Vision OCR β Image 1 | EF8cldKHhUEO3MZPZSD19.jpeg |
| Shot 2 | Vision OCR β Image 2 | oYtCvrxudkMzz3nYr7lN7.jpeg |
| Shot 3 | Vision OCR β Image 3 | IOjpU_h3RI_DoVdKXZ0DW.jpeg |
Run Inference
./build/bin/llama-cli \
-m /path/to/models/OCRia-1.Q8_0.gguf \
--mmproj /path/to/models/OCRia-1.mmproj-bf16.gguf \
--image /path/to/image.jpeg \
--spec-type draft-mtp \
--spec-draft-n-max 2 \
-ngl 99 \
-c 16384 \
--cache-type-k q8_0 \
--seed 42 \
-n 8192 \
-st \
-p "OCR the image."
Performance results reflect this specific hardware and inference configuration. Actual throughput may vary depending on the prompt, image resolution, model, software build, and runtime settings.
Snapshots (5)
llama.cpp
LLM inference in C/C++ β https://github.com/ggml-org/llama.cpp
MTP-repackaged and quantized using llama.cpp by β prithivMLmods.
For other inference setups, kindly refer to the original model card β https://huggingface.co/llamaindex/OCRia-1. It is recommended to follow the system message prompt.txt without providing any user text, with thinking turned off.
- Downloads last month
- -
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit



