LoRA adapter fine-tuned for OCR of nineteenth-century Polish printed materials
from the Geographical Dictionary of the Kingdom of Poland (SGKP). This
repository contains the adapter and processor files, not a full copy of the
base model.
Base Model
lightonai/LightOnOCR-2-1B-base
Training Data
The model was fine-tuned on the IHPAN/ocr-sgkp dataset using 270 training
pages and 30 validation pages. The transcriptions preserve historical
spelling, Polish characters, punctuation, and text segmentation.
Training Configuration
4-bit NF4 QLoRA
LoRA r=8, alpha=16, dropout 0.05, applied only to the language model
Use LightOnOcrProcessor to prepare the image and chat template and to generate
the transcription, following the same procedure as for the base model.
Evaluation
The following results were obtained on 10 manually transcribed SGKP pages that
were excluded from the training and validation sets. Both models used the same
plain-text transcription prompt and a generation limit of 3,072 new tokens.
Metric
Base Model
Fine-tuned Model
Character Error Rate (CER)
1.2264%
0.9488%
Word Error Rate (WER)
4.3541%
4.2233%
Fine-tuning reduced CER by 0.2776 percentage points, corresponding to a 22.6%
relative reduction. WER decreased by approximately 3.0% relative. The test set
is small and comes from the same publication as the training material, so these
figures should be treated as an in-domain preliminary evaluation rather than a
general OCR benchmark.
Comparison of results with selected OCR models:
Model
Samples
CER
WER
gemini 3.5 Flash Lite
10
0.65%
2.52%
LightOnOCR_sgkp
10
0.95%
4.22%
Mistral 4 ocr
10
0.97%
4.51%
Chandra 2
10
1.32%
3.11%
Tesseract 5.5
10
7.70%
30.46%
Limitations
The model is specialized for the layout and typography of SGKP.
Its performance may not generalize to other books, manuscripts, or modern
printed materials.
It returns plain text with individual dictionary entries separated into
paragraphs.
Before production use, the model should be evaluated on a larger independent
test set.
Use of this adapter is also subject to the license terms of the base model.