Downloads · 30 days
47
36% of all-time downloads
context212/alhazen-ocr
alhazen-ocr is a image-text-to-text model from context212. 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 peft. The card lists the license as apache-2.0.
QLoRA adapter on unsloth/Qwen3-VL-2B-Instruct for Arabic institutional OCR: printed forms, invoices, and handwriting-heavy pages.
Downloads · 30 days
47
36% of all-time downloads
All-time downloads
131
Public
Repo size
466 MB
Likes
0
Public
Click a slice to open those files.
.safetensors69.8 MB · 86%
From the Hugging Face model README
QLoRA adapter on unsloth/Qwen3-VL-2B-Instruct for Arabic institutional OCR: printed forms, invoices, and handwriting-heavy pages.
Named after Ibn al-Haytham (Alhazen), the 11th-century scholar who founded the science of optics.
context212/context212-alhazen-ocr (khattmix rebuild)github.com/context212/atlas-ocrcontext212/alhazen-ocr-khattmixCER / WER (lower is better), greedy decoding, 50 samples each on the held-out eval split and on external ahmedheakl/arocrbench_khatt:
| Model | Eval CER ↓ | Eval WER ↓ | KHATT CER ↓ | KHATT WER ↓ |
|---|---|---|---|---|
| Qwen3-VL-2B-Instruct (base) | 0.792 | 0.947 | 1.893 | 1.801 |
| Alhazen-OCR | 0.328 | 0.504 | 0.841 | 1.193 |
Held-out character error: 0.79 → 0.33. External KHATT handwriting: 1.89 → 0.84 CER.
This release (khattmix) adds line-level KHATT handwriting (~30% of the mix) on top of synthetic printed, invoices, and paragraph handwriting; KHATT-bench transcript overlap is removed from train.
Serve the base with the adapter attached (vLLM example):
vllm serve Qwen/Qwen3-VL-2B-Instruct \
--enable-lora \
--lora-modules alhazen=context212/alhazen-ocr \
--limit-mm-per-prompt '{"image": 1}' \
--mm-processor-cache-gb 0 \
--no-enable-prefix-caching
Prompt:
Extract all the text from this image, preserving the original reading order.
Keep temperature=0 for transcription.
@misc{alhazen-ocr-2026,
title = {Alhazen-OCR},
author = {Context212},
year = {2026},
howpublished = {\url{https://huggingface.co/context212/alhazen-ocr}}
}