Downloads · 30 days
0
small-models-for-glam/kraken-ppocrv6-medium
kraken-ppocrv6-medium is a image-to-text model from small-models-for-glam. Use it when you need a caption or text from an image. It is set up for kraken. The card lists the license as apache-2.0.
Hugging Face Hub mirror This repository mirrors the canonical Zenodo release by Benjamin Kiessling, ALMAnaCH, Inria Paris. The weights are byte-identical to the Zenodo release and have not been modified by Small Model…
Downloads · 30 days
0
Access
Public
Updated Sep 10, 2026
Repo size
63.8 MB
Likes
17
Public
Click a slice to open those files.
.safetensors63.8 MB · 100%
From the Hugging Face model README
Hugging Face Hub mirror
This repository mirrors the canonical Zenodo release by Benjamin Kiessling, ALMAnaCH, Inria Paris. The weights are byte-identical to the Zenodo release and have not been modified by Small Models for GLAM.
Install Kraken and the Hugging Face Hub CLI:
pip install "kraken>=7.1.0" huggingface_hub
Download the model and run recognition:
hf download small-models-for-glam/kraken-ppocrv6-medium \
medium.safetensors \
--local-dir ./kraken-ppocrv6-medium
kraken -i image.png output.txt \
segment -bl \
ocr -m ./kraken-ppocrv6-medium/medium.safetensors
This is the medium variant (~15.92M parameters) of a family of PP-OCRv6
text-line recognition models (tiny, small, medium) for
kraken. The models are trained from scratch with baseline
PP-OCRv6 is a conventional CTC-based line recognizer consisting of a lightweight convolutional backbone and a non-recurrent sequence-modelling neck.
The original architecture published as part of PaddlePaddle has been adapted for historical ATR by:
This is a base model that is supposed to produce usable output across a wide
range of scripts and materials out of the box while also allowing fine-tuning
with ease. It should offer similar accuracy and generalization to VLM-based
recognizers without hallucinations and with vastly higher throughput. This
medium variant model achieves the highest scores on the test set, tiny and
small trade accuracy for inference speed and a smaller memory footprint.
No attempt has been made to normalize the source datasets to a single set of transcription guidelines; the corpus mixes conventions, so inconsistent output is to be expected, in particular for Latin-script European manuscripts which mix large datasets such as CATMuS and TRIDIS that have very different approaches to transcription. Text was normalized to Unicode NFD and whitespace was normalized during training and evaluation.
The training corpus is heavily skewed towards a handful of high-resource languages (English, French, German, Latin, Dutch, Middle French, ...). Languages with little real training material show markedly higher error rates and will require fine-tuning for practical use. Because transcription conventions are inconsistent across sources, the model may resolve abbreviations or expand glyphs unpredictably.
The synthetic data used for training was created with the pangoline tool which is limited to approximating modern, machine-printed text. For the languages/scripts present only as synthetic data (Classical Armenian, Geʽez) and to a lesser extent those sharing the Latin script (Irish, Latvian, Lithuanian, Romanian, Serbian, Slovenian), real-world accuracy is probably limited.
Install kraken (>= 7.1.0), download the model, and run recognition on an
input image:
kraken -i image.png output.txt \
segment -bl \
ocr -m medium.safetensors
For more information, refer to the documentation.
The model was trained on publicly available and restricted (private) datasets. Datasets marked as private are part of the training mixture but are not redistributable. A † marks languages that were additionally augmented with synthetic training data (see below).
Synthetic line images were generated as additional training material for 18 languages: Ancient Greek, Arabic, Classical Armenian, Czech, Dutch, Finnish, Georgian, Geʽez, Irish, Latvian, Lithuanian, Persian, Polish, Romanian, Russian, Serbian, Slovenian, Syriac. Of these, eight are present only as synthetic data: Classical Armenian, Geʽez, Irish, Latvian, Lithuanian, Romanian, Serbian (Cyrillic), Slovenian.
The model was trained with kraken (feature/ppocrv6_rec branch).
| Hardware | 3 × NVIDIA H100 |
| Precision | bf16-mixed |
| Optimizer | AdamW + Muon (momentum 0.95, weight decay 0.01) |
| Learning rate | 1.05e-3 (cosine schedule, 3000 step warmup, min 1e-5) |
| Batch size | 96 |
| Gradient clipping | 1.0 |
| Epochs | 12 |
| Normalization | NFD + whitespace |
| Augmentation | enabled |
Metrics are computed on a held-out test set for each language. The test split was obtained by random 5% split with an upper limit of 100 document pages per language. No attempt has been made to split in a manner that separates documents between train and test. The scores below are therefore best read as in-domain generalization.
Evaluations with purely synthetic data are marked with ‡. CER and WER are
the character- and word-level error rates, computed with torchmetrics using
greedy CTC decoding and the NFD + whitespace normalization (equivalent to
ketos test -u NFD -n).
| Language | Lines | CER (%) | WER (%) |
|---|---|---|---|
| Ancient Greek | 451 | 7.21 | 44.03 |
| Arabic | 1,926 | 9.38 | 38.90 |
| Catalan | 128 | 2.10 | 11.84 |
| Church Slavonic | 6,599 | 7.53 | 33.66 |
| Classical Armenian ‡ | 3,580 | 0.06 | 0.35 |
| Corsican | 50 | 0.58 | 3.14 |
| Czech | 922 | 7.38 | 37.14 |
| Danish | 25 | 0.48 | 4.46 |
| Dutch | 4,384 | 6.86 | 27.85 |
| English | 2,005 | 5.90 | 20.35 |
| Finnish | 7,907 | 0.63 | 3.97 |
| French | 5,967 | 7.56 | 14.63 |
| Georgian | 394 | 12.75 | 51.15 |
| German | 3,007 | 1.62 | 7.20 |
| German (shorthand) | 830 | 17.46 | 47.69 |
| Geʽez ‡ | 2,992 | 0.11 | 0.46 |
| Hebrew | 3,426 | 5.06 | 14.21 |
| Hungarian | 38 | 2.40 | 16.67 |
| Irish ‡ | 2,824 | 0.14 | 0.68 |
| Italian | 2,611 | 2.89 | 10.90 |
| Latin | 5,748 | 6.45 | 23.91 |
| Latvian ‡ | 2,397 | 0.29 | 1.56 |
| Lithuanian ‡ | 2,615 | 0.48 | 2.45 |
| Malayalam | 59 | 26.18 | 84.96 |
| Middle Dutch | 3,014 | 6.77 | 25.42 |
| Middle French | 3,970 | 3.41 | 15.46 |
| Multilingual (mixed) | 241 | 1.00 | 5.42 |
| Norwegian | 2,335 | 5.22 | 19.27 |
| Ottoman Turkish | 451 | 5.92 | 27.19 |
| Persian | 990 | 4.66 | 20.46 |
| Polish | 2,766 | 0.42 | 2.44 |
| Portuguese | 2,763 | 10.06 | 38.45 |
| Romanian ‡ | 2,412 | 0.38 | 1.85 |
| Russian | 3,053 | 12.34 | 37.21 |
| Serbian (Cyrillic) ‡ | 2,789 | 0.04 | 0.21 |
| Slovak | 1,550 | 2.62 | 10.70 |
| Slovenian ‡ | 2,741 | 1.34 | 3.02 |
| Spanish | 5,465 | 4.49 | 17.61 |
| Swedish | 3,555 | 3.56 | 16.61 |
| Syriac | 1,801 | 4.80 | 21.72 |
| Ukrainian | 1,253 | 5.27 | 21.96 |
| Urdu | 1,656 | 3.77 | 16.77 |
| Yiddish | 4,320 | 4.49 | 16.24 |
| Aggregate (micro-average) | 108,010 | 3.91 | 14.98 |
| Aggregate (macro-average) | 4.93 | 19.07 |
On 9 September 2026, a community evaluation combined this recognizer with Kraken's bundled BLLA segmenter on all 1,403 pages / 8,413 tests in olmOCR-bench. Pages were rendered at 300 DPI and processed through Kraken's Python API on Hugging Face Jobs. Output was raw newline-joined text, without table reconstruction, LaTeX generation or header suppression.
| Task | Score (%) |
|---|---|
| Overall | 36.8 |
| Long / tiny text | 74.4 |
| Multiple columns | 57.9 |
| Headers / footers | 37.5 |
| Old scans | 24.1 |
| Tables | 0.2 |
| Old scans: math | 0.0 |
| ArXiv math | 0.0 |
| Automatic baseline | 100.0 |
The official overall score has a 95% bootstrap confidence interval of 35.9–37.7%. These are full-pipeline test pass rates, including segmentation, reading order and output format; they are separate from the line-recognition CER/WER evaluation above. The table score includes two passing baseline checks; no table-structure tests passed. Baseline checks do not measure transcription accuracy.
Reproduction scripts · Pinned run report and configuration · Public results and provenance.
Released under the Apache-2.0 license.
Training of this model was funded by the European Union under Grant Agreement No.~101132163 (ATRIUM) and No.~101071829 (MiDRASH). Views and opinions expressed are those of the authors only and do not necessarily reflect those of the European Union.
This project also received funding from the BPI Scribe project.
If you use this model, please cite kraken and if possible credit the dataset providers linked in the front matter and the table above.