Japanese OCR — Qwen3.5-2B fine-tune (honkoku + kuzushiji)
End-to-end vision-language OCR for pre-modern and early-modern Japanese documents. Full fine-tune of Qwen/Qwen3.5-2B on a combined corpus of printed honkoku transcriptions and Kuzushiji cursive pages.
Training data
- NDL minhon-v2 honkoku (~20.4k pages) — printed Japanese transcriptions across 15 categories (tempo, ryukyu, gakugei, dafukui, kusazoushi, …), with cleaning applied (parenthetical furigana stripped, kanbun markers stripped, brackets stripped, per-category length filtering).
- Kaggle Kuzushiji recognition corpus (~3.5k pages) — cursive Japanese pages held back from any evaluation split.
Total: ~23.9k training pages. Held-out eval set: 416 honkoku rows (cleaned_v2 val) + 120 Kuzushiji rows (kaggle held-out val).
Quick start (vLLM)
vllm serve tohoku-cijs/qwen3.5-2b-ndl-honkoku-kuzushiji-ocr \
--served-model-name ocr --trust-remote-code \
--max-model-len 16384 --gpu-memory-utilization 0.7
import base64, requests
with open("page.jpg", "rb") as f:
b64 = base64.b64encode(f.read()).decode()
r = requests.post(
"http://localhost:8000/v1/chat/completions",
json={
"model": "ocr",
"messages": [{
"role": "user",
"content": [{"type": "image_url",
"image_url": {"url": f"data:image/jpeg;base64,{b64}"}}],
}],
"temperature": 0.0,
"max_tokens": 2048,
},
)
print(r.json()["choices"][0]["message"]["content"])
License & attribution
- Base model: Qwen3.5-2B — see Qwen license.
- Training data: NDL minhon-v2 (CC BY 4.0) and Kaggle Kuzushiji recognition corpus (CC BY-SA 4.0). Cite the underlying sources if you publish results.