How to use from
Docker Model Runner
docker model run hf.co/prithivMLmods/chandra-ocr-2-MTP-Repacked:
Quick Links

chandra-ocr-2-MTP-Repacked

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: Yes | GGUF β€” chandra-ocr-2-MTP-Repacked(GGUF)

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.

Model Files

File Name Quant Type File Size File Link Description
chandra-ocr-2-MTP.BF16.gguf BF16 8.67 GB Link Full BF16 weights. Highest quality, largest file size.
chandra-ocr-2-MTP.Q3_K_L.gguf Q3_K_L 2.48 GB Link Lower quality but usable, good for low RAM availability.
chandra-ocr-2-MTP.Q3_K_M.gguf Q3_K_M 2.32 GB Link Low quality.
chandra-ocr-2-MTP.Q4_K_M.gguf Q4_K_M 2.78 GB Link Good quality, default size for most use cases, recommended.
chandra-ocr-2-MTP.Q4_K_S.gguf Q4_K_S 2.63 GB Link Slightly lower quality with more space savings, recommended.
chandra-ocr-2-MTP.Q5_K_M.gguf Q5_K_M 3.16 GB Link High quality, recommended.
chandra-ocr-2-MTP.Q5_K_S.gguf Q5_K_S 3.07 GB Link High quality, recommended.
chandra-ocr-2-MTP.Q6_K.gguf Q6_K 3.56 GB Link Very high quality, near perfect, recommended.
chandra-ocr-2-MTP.Q8_0.gguf Q8_0 4.61 GB Link Extremely high quality, generally unneeded but max available quant.
chandra-ocr-2-MTP.mmproj-bf16.gguf mmproj-bf16 676 MB Link Multimodal projection file in BF16 format. Used for vision/OCR capabilities.

MTP-Repacked [Transformers, BF16]

File Name File Size File Link Description
chat_template.jinja 7.62 kB Link Jinja template for chat formatting.
config.json 2.88 kB Link Model configuration file.
generation_config.json 116 Bytes Link Generation configuration parameters.
model-00001-of-00002.safetensors 5.07 GB Link Model weights shard 1 of 2 (Safetensors format).
model-00002-of-00002.safetensors 4.25 GB Link Model weights shard 2 of 2 (Safetensors format).
model.safetensors.index.json 67.3 kB Link Index file mapping weights to shards.
processor_config.json 1.33 kB Link Processor configuration for multimodal inputs.
tokenizer.json 20 MB Link Tokenizer vocabulary and merges.
tokenizer_config.json 1.51 kB Link Tokenizer configuration file.

BF16 Test Run

Tested chandra-ocr-2-MTP.BF16.gguf (with chandra-ocr-2-MTP.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 2,383.63 tokens/s
Average Generation Speed 196.98 tokens/s
Total Wall Time 25.4 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 10.66 GiB
Peak GPU Utilization 87%
GPU Layers Offloaded 99 (-ngl 99)
Random Seed 42
Speculative Decoding MTP (draft_n_max=2)
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

./build/bin/llama-cli \
  -m /path/to/models/chandra-ocr-2-MTP.BF16.gguf \
  --mmproj /path/to/models/chandra-ocr-2-MTP.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, model, software build, and runtime settings.

Snapshot(3)

download (1) download (2) download (3) download

llama.cpp

LLM inference in C/C++ β€” https://github.com/ggml-org/llama.cpp

MTP-repackaged and quantized using llama.cpp by β€” prithivMLmods.

Downloads last month
39
Safetensors
Model size
5B params
Tensor type
BF16
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for prithivMLmods/chandra-ocr-2-MTP-Repacked

Quantized
(44)
this model
Quantizations
1 model

Collections including prithivMLmods/chandra-ocr-2-MTP-Repacked