Downloads · 30 days
238
8% of all-time downloads
krutrim-ai-labs/Chitrapathak-2
Chitrapathak-2 is a image-text-to-text model from krutrim-ai-labs. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as other.
Downloads · 30 days
238
8% of all-time downloads
All-time downloads
2.9K
Public
Parameters
3.8B
8.1 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors8.1 GB · 100%
From the Hugging Face model README
Chitrapathak-2 (Chitra: Image; Pathak: Reader) is a VLM-based multilingual Optical Character Recognition (OCR) system designed specifically for the linguistic diversity and document complexity of the Indian ecosystem. Trained for high-fidelity OCR on Indic language book pages, Chitrapathak-2 demonstrates strong generalization across 10 major Indian languages and English. It is the second model in the Chitrapathak OCR series, continuing the effort to build robust OCR systems for Indic scripts and multilingual documents.
| Property | Details |
|---|---|
| Architecture | Vision-Encoder + 3B Decoder LLM |
| Languages | Hindi, Sanskrit, Bengali, Telugu, Tamil, Marathi, Kannada, Malayalam, Odia, Punjabi and English |
| Use Cases | OCR for printed text in multilingual books, pdf documents etc. |
| Frameworks | TRL 0.22.1, Transformers 4.56.0, PyTorch 2.6.0+cu124 |
| Training Strategy | Supervised Fine-Tuning (SFT), mixed precision (FP16 / bfloat16), multinode training, DeepSpeed ZeRO-2 optimization |
from PIL import Image
from transformers import AutoTokenizer, AutoProcessor, AutoModelForImageTextToText
model_path = "krutrim-ai-labs/Chitrapathak-2"
model = AutoModelForImageTextToText.from_pretrained(
model_path,
torch_dtype="auto",
device_map="auto",
attn_implementation="flash_attention_2"
)
model.eval()
tokenizer = AutoTokenizer.from_pretrained(model_path)
processor = AutoProcessor.from_pretrained(model_path)
def perform_ocr(image_path, model, processor, max_new_tokens=4096):
image = Image.open(image_path)
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": [
{"type": "image", "image": f"file://{image_path}"},
{"type": "text", "text": "Perform OCR on this image and transcribe all visible text exactly as it appears."},
]},
]
text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = processor(text=[text], images=[image], padding=True, return_tensors="pt")
inputs = inputs.to(model.device)
output_ids = model.generate(**inputs, max_new_tokens=max_new_tokens, do_sample=False)
generated_ids = [output_ids[len(input_ids):] for input_ids, output_ids in zip(inputs.input_ids, output_ids)]
output_text = processor.batch_decode(generated_ids, skip_special_tokens=True, clean_up_tokenization_spaces=True)
return output_text[0]
image_path = "/path/to/your/document.jpg"
result = perform_ocr(image_path, model, processor, max_new_tokens=15000)
print(result)
vllm serve krutrim-ai-labs/Chitrapathak-2
from openai import OpenAI
import base64
client = OpenAI(api_key="123", base_url="http://localhost:8000/v1")
model = "krutrim-ai-labs/Chitrapathak-2"
def encode_image(image_path):
with open(image_path, "rb") as image_file:
return base64.b64encode(image_file.read()).decode("utf-8")
def perform_ocr(img_base64):
response = client.chat.completions.create(
model=model,
messages=[
{
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {"url": f"data:image/png;base64,{img_base64}"},
},
{
"type": "text",
"text": "Perform OCR on this image and transcribe all visible text exactly as it appears.",
},
],
}
],
temperature=0.0,
max_tokens=15000
)
return response.choices[0].message.content
test_img_path = "/path/to/your/document.jpg"
img_base64 = encode_image(test_img_path)
print(perform_ocr(img_base64))
| Model | Bn Word ↓ | Bn Char ↓ | Hi Word ↓ | Hi Char ↓ | Kn Word ↓ | Kn Char ↓ | Ml Word ↓ | Ml Char ↓ | Mr Word ↓ | Mr Char ↓ | Or Word ↓ | Or Char ↓ | Pa Word ↓ | Pa Char ↓ | Ta Word ↓ | Ta Char ↓ | Te Word ↓ | Te Char ↓ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Maya | 99.42 | 95.77 | 99.7 | 94.91 | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
| PALO | 96.3 | 91.15 | 99.26 | 91.98 | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
| Pangea | 94.66 | 80.33 | 99.53 | 91.5 | - | - | - | - | - | - | - | - | - | - | 99.44 | 84.13 | 99.95 | 89.91 |
| Chitrarth-1 | 96.16 | 84.65 | 98.56 | 89.81 | 99.58 | 85.29 | 99.62 | 94.77 | 99.66 | 86.58 | 99.99 | 93.21 | 99.16 | 90.17 | 99.1 | 89.94 | 99.86 | 89.02 |
| LLaMA-4 maverick | 31.52 | 13.21 | 25.73 | 11.91 | 36.9 | 11.17 | 75.5 | 45.75 | 20.94 | 8.05 | 97.51 | 86.78 | 29.77 | 12.68 | 31.36 | 10.79 | 57.07 | 18.72 |
| Gemma-3 27B | 42.15 | 24.41 | 46.47 | 29.5 | 84.22 | 54.24 | 92.06 | 72.64 | 50.4 | 31.06 | 92.67 | 70.72 | 70.88 | 42.65 | 39.52 | 16.51 | 86.76 | 54.14 |
| GPT-4o | 55.51 | 32.68 | 54.62 | 35.54 | 94.33 | 69.79 | 94.67 | 78.47 | 63.44 | 37.93 | 94.61 | 73.46 | 68.88 | 40.71 | 74.35 | 43.39 | 95.97 | 70.08 |
| Nanonets-OCR2-3B | 28.56 | 12.42 | 32.26 | 16.78 | 99.38 | 93.07 | 97.24 | 89.81 | 40.97 | 15.92 | 99.82 | 97.11 | 98.70 | 82.84 | 95.25 | 78.83 | 99.42 | 89.39 |
| Chitrapathak-1 | 17.14 | 7.03 | 25.55 | 13.74 | 26.24 | 8.78 | 71.97 | 48.19 | 15.68 | 6.09 | 50.72 | 31.62 | 17.7 | 7.87 | 19.25 | 5.81 | 38.79 | 11 |
| Chitrapathak-2 | <u>14.51</u> | <u>5.47</u> | <u>19.87</u> | <u>8.36</u> | <u>18.8</u> | <u>4.81</u> | <u>64.47</u> | <u>34.7</u> | <u>9.82</u> | <u>2.27</u> | <u>44.74</u> | <u>21.83</u> | <u>15.24</u> | <u>7.06</u> | <u>17.66</u> | <u>5.68</u> | 31.81 | 6.69 |
| Gemini-2.5 Flash | 11.3 | 4.04 | 16.01 | 5.88 | 17.18 | 4.38 | 59.64 | 30.6 | 8.06 | 1.79 | 41.7 | 18.6 | 14.56 | 4.98 | 15.26 | 3.01 | <u>33.32</u> | <u>7.16</u> |
We also evaluated the model on the Old books OCR dataset, which consists of scanned book pages in English.
| Model | ANLS-word | ANLS-char |
|---|---|---|
| Nanonets | 4.33 | 2.96 |
| Chitrapathak-2 | 4.49 | 1.89 |
| Gemini-2.5 | 4.36 | 1.86 |
| Metric | bn | hi | kn | ml | mr | or | pa | ta | te | en |
|---|---|---|---|---|---|---|---|---|---|---|
| Tokens / Word | 5.9 | 4.8 | 11.2 | 12.6 | 6.5 | 11.7 | 6.9 | 9.4 | 13.2 | 1.4 |
| Tokens (200 words) | 1174.8 | 951.4 | 2242.2 | 2514.0 | 1292.4 | 2334.2 | 1387.2 | 1873.6 | 2646.6 | 280.0 |
| Latency (200 words) | 4.9s | 4.0s | 9.2s | 10.3s | 5.3s | 9.5s | 5.7s | 7.7s | 10.8s | 1.3s |
Note that the above latency values are calculated assuming the size of the input image to be ~1024x1024.
This model is distributed under the Krutrim Community License Agreement v1.0.
Ensure compliance before any commercial or redistributed usage.
Update: This model is released only for research purposes since the underlying Qwen-2.5-VL model has changed from Apache to a more restrictive license.
If you use Chitrapathak-2 in your research, please cite:
@misc{faraz2026indicocr,
title={Designing Production-Scale OCR for India: Multilingual and Domain-Specific Systems},
author={Ali Faraz and Raja Kolla and Ashish Kulkarni and Shubham Agarwal},
year={2026},
eprint={2602.16430},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2602.16430},
}
Chitrapathak-2 builds upon the foundations of the following projects and open-source efforts: