Downloads · 30 days
0
iamkushagratomar/Qwen3VL-2B-OCR
Qwen3VL-2B-OCR is a machine learning model from iamkushagratomar. Use it for the machine learning 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 apache-2.0.
This model is a fine-tuned version of Qwen3-VL-2B, optimized for Hindi OCR. It is trained on the iamkushagratomar/devanagari-ocr-synthetic-80k dataset to recognize and extract Hindi text from images.
Downloads · 30 days
0
Access
Public
Updated Sep 19, 2026
Repo size
106 MB
Likes
0
Public
Click a slice to open those files.
.safetensors95 MB · 89%
From the Hugging Face model README
This model is a fine-tuned version of Qwen3-VL-2B, optimized for Hindi OCR. It is trained on the iamkushagratomar/devanagari-ocr-synthetic-80k dataset to recognize and extract Hindi text from images.
pip install -q -U unsloth unsloth_zoo
import unsloth
from unsloth import FastVisionModel
import torch
from PIL import Image
TEST_IMAGE_PATH = "/content/image.jpg"
INSTRUCTION = "Read all the text in this image and transcribe it exactly."
inference_model, inference_processor = FastVisionModel.from_pretrained(
"iamkushagratomar/Qwen3VL-2B-OCR",
load_in_4bit=True,
)
FastVisionModel.for_inference(inference_model)
image = Image.open(TEST_IMAGE_PATH).convert("RGB")
text_prompt = inference_processor.apply_chat_template(
[
{"role": "user", "content": [
{"type": "image", "image": image},
{"type": "text", "text": INSTRUCTION},
]}
],
tokenize=False,
add_generation_prompt=True
)
inputs = inference_processor(
text=[text_prompt],
images=[image],
padding=True,
return_tensors="pt").to(inference_model.device)
with torch.no_grad():
output_ids = inference_model.generate(**inputs, max_new_tokens=512)
# Example usage
trimmed = output_ids[:, inputs["input_ids"].shape[1]:]
result = inference_processor.batch_decode(
trimmed,
skip_special_tokens=True,
clean_up_tokenization_spaces=False)[0]
print("OCR OUTPUT:", result)
This qwen3_vl model was trained 2x faster with Unsloth