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.txt in 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 with enable_thinking=False.
  • Loop guard on the output (lector prompts.unloop), always:
    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
    
    A page where the guard fired lost text after the loop: re-read it another way.

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
Safetensors
Model size
2B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for julioalonzom/lector-2b-v1

Finetuned
Qwen/Qwen3.5-2B
Finetuned
(667)
this model
Quantizations
1 model