Result
CER see RESULTS.json on the 227-image SinOCR-Handwritten test split.
Table with columns: System, Handwritten CER| System | Handwritten CER |
|---|
| TrOCR (printed only) | 0.9940 |
| Tesseract (pre-trained) | 0.9493 |
| Google Vision API | 0.7532 |
| Tesseract (printed+handwritten) | 0.7204 |
| TrOCR (printed -> handwritten) | 0.5253 |
| This adapter | see RESULTS.json |
CER is (S+D+I)/N over Unicode code points.
Training
Warm-started from avishadilhara/sinhala-lightonocr-2-1b-Qlora (Sinhala printed adapter), then
fine-tuned on handwriting. 4-bit NF4, r=32, alpha=64,
dropout=0.1, native resolution longest_edge=1540,
bf16, single Kaggle T4.
Usage
from transformers import AutoProcessor, AutoModelForImageTextToTextfrom peft import PeftModel base = "lightonai/LightOnOCR-2-1B"proc = AutoProcessor.from_pretrained(base)model = AutoModelForImageTextToText.from_pretrained(base, dtype="bfloat16", device_map="auto")model = PeftModel.from_pretrained(model, "danush99/Model_LightOnOCR-Sin-Handwritten-Text")
Requires transformers==5.0.0 (LightOnOCR's classes ship in 5.x).