Views
No views yet
lightonai/LightOnOCR-2-1B
on 16 pages of Pierfrancesco Giambullari's Del sito, forma, & misure,
dello Inferno di Dante (Florence: Neri Dortelata, 1544) — a Renaissance
Italian treatise printed in a pseudonymous Florentine press with an
experimental dense stress-accent orthography that defeats out-of-the-box
OCR. USTC 832684, rare outside Italy (9 copies in the US), never edited
or translated into English.1from transformers import AutoModelForImageTextToText, AutoProcessor
2from peft import PeftModel
3from PIL import Image
4import torch
5
6base = AutoModelForImageTextToText.from_pretrained(
7 "lightonai/LightOnOCR-2-1B",
8 torch_dtype=torch.bfloat16,
9 device_map="auto",
10)
11model = PeftModel.from_pretrained(
12 base, "metamorphoses-collection/GiambullariOCR-1B-lora"
13)
14model.eval()
15processor = AutoProcessor.from_pretrained("lightonai/LightOnOCR-2-1B")
16
17img = Image.open("path/to/giambullari_page.jpg")
18inputs = processor(images=img, return_tensors="pt").to(model.device)
19with torch.no_grad():
20 out = model.generate(**inputs, max_new_tokens=1024)
21print(processor.batch_decode(out, skip_special_tokens=True)[0])| Base model | lightonai/LightOnOCR-2-1B |
| Adapter | LoRA (PEFT 0.18.1), rank 32, α 64, dropout 0.05 |
| Target modules | q/k/v/o + gate/up/down projections |
| Training data | 16 pages, Claude-Sonnet-4.5-auto-labelled, filtered |
| Epochs | 60, lr 1e-4, grad-accum 4 |
| Hardware | 1× H100 SXM 80 GB, rented from RunPod |
| Wall-clock | ~15 min |
| Total cost | US$6.96 (all experiments + full-book inference) |
| System | CER |
|---|---|
| GiambullariOCR-1B-lora (this model) | 2.48% |
| Claude Sonnet 4.5 zero-shot | 8.12% |
| Transkribus custom HTR, first-pass (id 544378) | 15.66% |
1@misc{jurczak2026giambullariOCR,
2 author = {Jurczak, Christophe},
3 title = {A 2.48\% CER VLM-OCR Pipeline for a Heavily Accented 1544 Florentine Treatise},
4 year = {2026},
5 publisher = {Zenodo},
6 doi = {10.5281/zenodo.19503091},
7 url = {https://doi.org/10.5281/zenodo.19503091},
8}lightonai/LightOnOCR-2-1B
is not redistributed here — see the upstream model card for its own
licence.cj@metamorphoses-collection.org · ORCID
0009-0001-8204-7333