Qwen3-VL-8B Hebrew — v22a (pilot: documentary editions, grounding and QA)
Cairo Genizah AI Transcription — formal analysis and write-up of the project
The full account of the methods, training data, benchmarks and error analysis behind the Cairo Genizah AI transcription models. Search the transcribed corpus at Cairo Genizah AI.
Part of the Qwen3-VL-8B Hebrew / Cairo Genizah fine-tune series (https://github.com/AIStream-Peelout/historical-document-analysis). Flagship: v21b step 1200.
This version
Status: pilot, not promoted. Best documentary reader in the series; a step back on religious pages;
QA not yet learned. The full v22 run will follow with several times more unique rows.
- Trained 2026-09-25/26, steps 100–1300 (the Colab session hit its 24-hour cap at ~1,340). Warm start
v21b step 1200.
- Data:
isaacmg/genizah_v22_pilot — a map-style mixture with every page image stored once (8,000
training rows, 188 validation rows on pages disjoint from training, 4,598 images): KTIV v4 transcription
.30, line-broken PGP editions .25, KTIV v4 grounding .15, documentary grounding .10 (Kraken ink
boxes on lines where Kraken and v21b agree, v21b's text as target — pseudo-labels), extractive PGP QA
.20 (about 900 unique rows, 1.8 passes). No synthetic data and no Talmud replay; 1,000 steps = one epoch.
- Recipe: v21b's, merger frozen (
colab/genizah_v22a.ipynb). Eval loss 0.738 → 0.638 at 1000 →
0.635 at 1300.
| benchmark |
step 1300 |
parent v21b-1200 |
| PGP CER* / F1 / substantive |
0.164 / 0.889 / 100 %, no loops or hallucinated pages; Judaeo-Arabic F1 0.885 |
0.177 / 0.880 / 99 %; 0.872 |
| religious CER* / F1 / readOK |
0.186 / 0.860 / 0.683 (two-column 0.221) |
0.165 / 0.869 / 0.692 |
| documentary grounding, held-out pilot rows |
locate on the right line 91 % (median IoU 0.62); read-box CER 0.04 |
— |
| extractive QA, 37 held-out rows |
format always parses; right line 24 %, exact span 17 %, abstains correctly 1/8 |
— |
Reading: the documentary rows did what they were built for — transcription of documentary hands is
the best in the series and boxes on documentary photographs land on the right line — while the religious
share bought nothing new (no new religious data) and the QA rows taught the answer shape but not the
retrieval. The canonical KTIV grounding eval and further step comparisons are in progress.
Canonical revisions: step 1300 f1ad6300b7941641aeb84b4f249e197cc0c56d7e; step 1000
809141308cfb4e2ed2fc73b13e767f735602e7c1.
The series at a glance
All versions are QLoRA adapters on Qwen/Qwen3-VL-8B-Instruct (r16/α16 on the language model and every
vision-tower block, merger frozen unless stated; batch 1 × 8, AdamW-8bit, LR 5e-5 cosine, image budget
6.5–7 MP, eval/save every 100 steps), trained on Colab A100s and evaluated with one decode at T=0.1
through an 8-bit MLX conversion. Two benchmarks recur below: religious = 140 held-out KTIV Talmud
pages (33 two-column), PGP = 131 held-out documentary fragments from the Princeton Geniza Project
(82 Judaeo-Arabic). CER* is the median character error rate over substantive outputs; page-level flips
between versions are within decode noise, medians are the claim. The flagship is v21b step 1200.
| version |
trained |
data change |
recipe change |
religious CER* |
PGP CER* |
status |
| v19a |
2026-08-20/21 |
+ KTIV v1 (8.3k rows), synthetic Hebrew v3 |
base recipe, merger frozen |
0.216 |
0.196 |
former flagship, superseded |
| v19b |
2026-08-28/29 |
= v19a |
merger r16 LoRA |
0.234 |
0.186 |
control, not adopted |
| v19c |
2026-08-30 → 09-01 |
= v19a |
merger trained full-weight |
0.225 |
0.189 |
not adopted |
| v20a |
2026-09-03/05 |
KTIV v2 (2.7× letters) + 8 % grounding |
warm start v19a-1300 |
0.184 |
0.183 |
superseded; merged weights published |
| v20b |
2026-09-06/09 |
= v20a |
merger r16 LoRA |
n/a |
n/a |
dead-end arm (boxes worse) |
| v21 |
2026-09-11 |
KTIV v3, 20 % grounding, streamed |
warm start v20a-1800 |
— |
— |
scrap: trained without images |
| v21b |
2026-09-11/15 |
= v21 |
dispatch fix + dataloader gate |
0.165 |
0.177 |
flagship / model of record |
| v22a |
2026-09-25/26 |
+ PGP editions, documentary grounding, extractive QA; no synthetic / Talmud |
warm start v21b-1200, map-style data |
0.186 |
0.164 |
pilot; documentary best, religious regression |
Baselines on the same tables: the best Kraken setup reads religious pages at CER 0.30 and PGP at 0.25;
stock Qwen3-VL-8B produces a substantive transcription on 2 % of PGP pages (F1 0.01).
Training data comes from the KTIV project of the National Library of Israel (literary manuscripts and
transcriptions), from published editions of Princeton Geniza Project documents, and from synthetic renders;
see each card's data section. Code, builders and the evaluation harness: https://github.com/AIStream-Peelout/historical-document-analysis.
Loading
The repo root holds the adapter of the latest saved step; every step is a commit ("step N" = root
adapter, "step N, checkpoint" = the same plus last-checkpoint/ with optimizer state). Pin the revision
you want:
from transformers import AutoModelForImageTextToText, AutoProcessor
from peft import PeftModel
base = AutoModelForImageTextToText.from_pretrained("Qwen/Qwen3-VL-8B-Instruct", torch_dtype="bfloat16", device_map="auto")
model = PeftModel.from_pretrained(base, "isaacmg/qwen3-vl-8b-hebrew-v22a-ckpt", revision="f1ad6300b7941641aeb84b4f249e197cc0c56d7e") # step 1300
processor = AutoProcessor.from_pretrained("Qwen/Qwen3-VL-8B-Instruct", min_pixels=6_500_000, max_pixels=7_000_000)
Prompt the model the way it was trained: one page image plus a plain instruction such as
"Transcribe this manuscript page line by line." For the grounding tasks (from v20a on) use the exact
prompts in the builders (src/finetuning/qwen_hebrew/build_ktiv_dataset.py); boxes are [x1, y1, x2, y2]
normalised to 0–1000 of the original image.
Data rights
Manuscript images remain the property of their holding institutions; the KTIV transcriptions are the
National Library of Israel's; the Princeton Geniza Project's editions are used under their research terms;
the Talmud replay set (v19a–v21b) consists of scans marked for non-commercial use. This adapter is released
for research on handwritten-text recognition. Credit NLI KTIV and the Princeton Geniza Project when
you build on it.