Instructions to use metamorphoses-collection/GiambullariOCR-1B-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use metamorphoses-collection/GiambullariOCR-1B-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("lightonai/LightOnOCR-2-1B") model = PeftModel.from_pretrained(base_model, "metamorphoses-collection/GiambullariOCR-1B-lora") - Notebooks
- Google Colab
- Kaggle
GiambullariOCR-1B-lora
📄 Paper: Jurczak 2026 on Zenodo · cross-posted on Knowledge Commons
A LoRA fine-tune of 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.
Headline: 2.48% CER on a 7-page hand-corrected leakage-free gold standard. Trained in ~15 minutes on a single rented H100 for US$6.96 of compute.
How to use
from transformers import AutoModelForImageTextToText, AutoProcessor
from peft import PeftModel
from PIL import Image
import torch
base = AutoModelForImageTextToText.from_pretrained(
"lightonai/LightOnOCR-2-1B",
torch_dtype=torch.bfloat16,
device_map="auto",
)
model = PeftModel.from_pretrained(
base, "metamorphoses-collection/GiambullariOCR-1B-lora"
)
model.eval()
processor = AutoProcessor.from_pretrained("lightonai/LightOnOCR-2-1B")
img = Image.open("path/to/giambullari_page.jpg")
inputs = processor(images=img, return_tensors="pt").to(model.device)
with torch.no_grad():
out = model.generate(**inputs, max_new_tokens=1024)
print(processor.batch_decode(out, skip_special_tokens=True)[0])
Training
| 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) |
Evaluation — 7-page leakage-free gold standard
| 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% |
Three reference points, not a competitive ranking — they reflect very different effort budgets, and the Transkribus figure is a non-expert first-pass training run that would improve with more data and tuning. The paper also reports an 8-page nominal set, a 5-page strict generalisation set, per-page CER, the corpus-wide +26% accent-coverage finding, known failure modes, and a visual sample-page comparison on p. 66.
Scope
Tuned specifically for Dortelata's 1544 dense stress-accent system. The Dortelata press is pseudonymous and only one other book is known to bear its imprint (Cosimo Bartoli's translation of Ficino's Symposium, same month, same orthography). This adapter is not expected to help on Aldine (Manuzio) or other typographically conservative 16th-century Italian prints, which frontier zero-shot VLMs already handle well. What travels is the recipe — frontier VLM auto-label + small LoRA fine-tune — not this specific adapter. See §3.2 of the paper.
Citation
@misc{jurczak2026giambullariOCR,
author = {Jurczak, Christophe},
title = {A 2.48\% CER VLM-OCR Pipeline for a Heavily Accented 1544 Florentine Treatise},
year = {2026},
publisher = {Zenodo},
doi = {10.5281/zenodo.19503091},
url = {https://doi.org/10.5281/zenodo.19503091},
}
Licence
LoRA delta: CC-BY 4.0 by Christophe Jurczak, Metamorphoses of
Civilization Collection. The base model lightonai/LightOnOCR-2-1B
is not redistributed here — see the upstream model card for its own
licence.
Contact
Christophe Jurczak · Metamorphoses of Civilization Collection ·
cj@metamorphoses-collection.org · ORCID
0009-0001-8204-7333
- Downloads last month
- 4
Model tree for metamorphoses-collection/GiambullariOCR-1B-lora
Base model
lightonai/LightOnOCR-2-1B