Lector 2B v1
A page reader for Latin scholastic print (16thโ20th century): one page image in, one Markdown page file
out, in the diplomatic-v1 dialect (print spelling, รฆ/ล, &, accents, u/v, abbreviation marks; long s as
s; footnotes ^[โฆ], marginal notes ^[โฆMโง โฆ], a footnote continued from the previous page as a last
block starting โฆCONTINUED-NOTEโง). Full fine-tune of Qwen/Qwen3.5-2B, 2 epochs, 3,732 pages + 2,000
lines, by lector (Schola Thomistica), 2026-11-01. Internal run name: ft5.
Benchmark: lector-bench v0.
Use it exactly like this
- Prompt:
prompt.txtin this repo, verbatim, as the only text of one user turn after the image. It is the prompt the model was trained on; later lector prompts belong to later models. - Image: one portrait page (split two-page spreads at the gutter first), RGB, longest side resized
to 1280 px (Lanczos) when larger. Processor:
min_pixels = 256*32*32,max_pixels = 1280*1280. - Decoding: bf16, greedy (
do_sample=False,repetition_penalty=1.0),max_new_tokens=3500, stop at<|im_end|>or eos, chat template withenable_thinking=False. - Loop guard on the output (lector
prompts.unloop), always:A page where the guard fired lost text after the loop: re-read it another way.text = re.sub(r"^\|.*$\n?", "", text, flags=re.M) # tables are not in the dialect text = re.sub(r"(.{12,1500}?)\1{2,}", r"\1", text, flags=re.S) # a run repeated 3+ times -> once
Scores (lector-bench v0, md_cer folded, page-weighted, through the loop guard)
| all 146 pages | public split, 86 pages | |
|---|---|---|
| ft2 (Qwen3-VL-2B) | 0.137 | 0.059 |
| ft4 (Qwen3.5-2B) | 0.099 | 0.089 |
| lector-2b-v1 (ft5) | 0.093 | 0.066 |
19thโ20th-century print: 0.002โ0.04. Hurtado 1624: 0.040. รlvarez 1610: 0.053, no skipped columns.
Known weaknesses
- Loops on very dense old print (Bรกรฑez 1602: 0.45), on Greek inside footnotes, and on short end-of-book pages.
- It sometimes writes
^[โฆMโงโฆRโง โฆ](paragraph summary). Treat that role as a guess (precision 0.59 on v0): the kind of a marginal note is decided at scouting/QA, not by the reader.
- Downloads last month
- 24