MoganOCR-TR-1.5

TurkishOCR-Bench MoganOCR-TR Buy Me a Coffee

MoganOCR-TR-1.5

MoganOCR-TR-1.5 is the next version of MoganOCR-TR, a 2B-parameter OCR model for Turkish documents. It reads one page image and writes the whole page in reading order as Markdown, with tables as HTML and formulas as LaTeX. Same size, same prompt, same output format: it is a drop-in replacement.

On TurkishOCR-Bench it scores 91.9 (MoganOCR-TR: 89.9).

What's new

  • No more memorized text on blank pages. On empty scanned pages MoganOCR-TR often wrote a memorized passage ("1. BΓ–LÜM / KALP VE DAMAR HASTALIKLARI…") or looped until the token limit. 1.5 returns an empty output, or only what is really on the page (page number, <figure/>, form boxes).
  • Better tables. Table TEDS rises from 82.5 to 86.9.
  • No repetition loops. On TurkishOCR-Bench, pages that loop until the token limit went from 2 to 0; on text pages of the held-out set, from 8 to 0.
  • Better on scanned pages. Text usability on scanned pages rises from 71.0 to 78.4.

Results

TurkishOCR-Bench: 488 hard pages, 10 categories, scored with the published pipeline (oku_puanla.py + tob_v3.py, CDM included). Images up to 4,194,304 pixels (the processor default, which gave the best results), up to 8,000 new tokens.

TurkishOCR-Bench top 6: MoganOCR-TR-1.5 enters at 91.9
MoganOCR-TR MoganOCR-TR-1.5
TOB score 89.9 91.9
Text_TR 89.4 91.0
Table (TEDS) 82.5 86.9
Formula (CDM) 97.8 97.8
Clean pages 65.8% 68.3%
Unreliable pages 26.8% 24.7%
Turkish-character tests 97.6 99.2
Pages looping to the token limit 2 0

Demo

Real MoganOCR-TR-1.5 outputs on three TurkishOCR-Bench pages (from the benchmark run; the model has not seen these pages in training): the raw Markdown as it is generated and the rendered result. All three pages score full marks.

MoganOCR-TR-1.5 streaming its output on a table + formula page, a table page and a scanned book page

Pages: Bayram, Sevilgen, İbiş, GU J Sci Part C 10(1), 2022 (CC BY-SA 4.0); Aşıcıoğlu et al., Acta Odontologica Turcica, 2026 (CC BY 4.0); Bektaşi Şairleri ve Nefesleri, p. 160 (public domain, Wikimedia Commons).

How it was trained

Starting from MoganOCR-TR, with the vision encoder frozen:

  1. GRPO (DAPO loss, TRL + vLLM): 125 steps, 8 pages Γ— 8 samples per step. Pages were chosen where the model's own samples disagreed. Reward: text similarity, table row and number F1, empty output on blank pages, zero for loops and truncated outputs.
  2. Short SFT (1 epoch, 1,086 pages): blank pages that RL could not fix, plus the model's own high-scoring outputs on text pages to prevent forgetting.
  3. Weight averaging: 50% RL model + 50% SFT model. The SFT model alone fixed blank pages but skipped about 5% of text pages; the average keeps both.

Usage

The prompt is always SayfayΔ± markdown olarak yaz. ("Write the page as markdown."). Keep thinking off (the chat template default), decode greedily and allow up to 8,000 new tokens. Keep the processor's default image limit of 4,194,304 pixels; the results above were measured with it.

vLLM

vllm serve moganai/MoganOCR-TR-1.5 --max-model-len 32768 --limit-mm-per-prompt '{"image": 1, "video": 0}'
import base64, requests

img = base64.b64encode(open("page.png", "rb").read()).decode()
r = requests.post("http://localhost:8000/v1/chat/completions", json={
    "model": "moganai/MoganOCR-TR-1.5",
    "temperature": 0,
    "max_tokens": 8000,
    "chat_template_kwargs": {"enable_thinking": False},
    "messages": [{"role": "user", "content": [
        {"type": "image_url", "image_url": {"url": f"data:image/png;base64,{img}"}},
        {"type": "text", "text": "SayfayΔ± markdown olarak yaz."},
    ]}],
})
print(r.json()["choices"][0]["message"]["content"])

MTP: mtp.safetensors is the MTP head of MoganOCR-TR, not retrained for 1.5. Enable it with --speculative-config '{"method": "mtp", "num_speculative_tokens": 3}'. The speed-up was not re-measured for 1.5.

Transformers

from PIL import Image
from transformers import AutoModelForImageTextToText, AutoProcessor

model_id = "moganai/MoganOCR-TR-1.5"
model = AutoModelForImageTextToText.from_pretrained(model_id, dtype="bfloat16", device_map="auto")
processor = AutoProcessor.from_pretrained(model_id)

messages = [{"role": "user", "content": [
    {"type": "image", "image": Image.open("page.png")},
    {"type": "text", "text": "SayfayΔ± markdown olarak yaz."},
]}]
inputs = processor.apply_chat_template(messages, add_generation_prompt=True, tokenize=True,
                                       return_dict=True, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=8000, do_sample=False)
print(processor.decode(out[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))

Resolution: the processor accepts images up to 4,194,304 pixels by default, so an A4 page at 200 dpi goes in unscaled (about 3,800 visual tokens). All benchmark numbers above use this setting, which gave the best results; avoid lowering max_pixels.

Output format

Content Format
Text, headings, lists Markdown. One paragraph per line; words hyphenated at line ends are joined.
Tables HTML <table>, merged cells as rowspan / colspan
Formulas LaTeX, inline $...$ and block $$...$$
Running header / footer <header>...</header> and <footer>...</footer>
Figures <figure/>

License

Apache 2.0

Citation

@article{tasdemir2026moganocr,
  title   = {MoganOCR-TR and TurkishOCR-Bench: A Vision-Language OCR Model and Page-Level Evaluation Set for Turkish Document Parsing},
  author  = {Aleyna Tasdemir and Furkan Yilmaz and Muhammed Faruk Gozay},
  year    = {2026}
}


MoganOCR-TR-1.5 (TΓΌrkΓ§e)

MoganOCR-TR-1.5, Türkçe belgeler için 2B parametreli OCR modeli MoganOCR-TR'nin yeni sürümüdür. Tek bir sayfa gârüntüsünü okuyup bütün sayfayı okuma sırasıyla Markdown olarak yazar; tablolar HTML, formüller LaTeX olur. Boyut, istem ve çıktı biçimi aynıdır: doğrudan yerine geçer.

TurkishOCR-Bench'te 91,9 alΔ±r (MoganOCR-TR: 89,9).

Neler değişti

  • Boş sayfada ezber metin yok. MoganOCR-TR boş taranmış sayfalarda sΔ±k sΔ±k ezberlenmiş bir metin ("1. BΓ–LÜM / KALP VE DAMAR HASTALIKLARI…") yazΔ±yor ya da token sΔ±nΔ±rΔ±na kadar dΓΆngΓΌye giriyordu. 1.5 boş Γ§Δ±ktΔ± verir ya da yalnΔ±z sayfada gerΓ§ekten olanΔ± yazar (sayfa numarasΔ±, <figure/>, form kutularΔ±).
  • Daha iyi tablolar. Tablo TEDS 82,5'ten 86,9'a Γ§Δ±ktΔ±.
  • Tekrar dΓΆngΓΌsΓΌ yok. TurkishOCR-Bench'te token sΔ±nΔ±rΔ±na kadar dΓΆngΓΌye giren sayfa 2'den 0'a, ayrΔ±lmış değerlendirme kΓΌmesinin metin sayfalarΔ±nda 8'den 0'a indi.
  • Taranmış sayfalarda daha iyi. Taranmış sayfalarda metin kullanΔ±labilirliği 71,0'dan 78,4'e Γ§Δ±ktΔ±.

SonuΓ§lar

TurkishOCR-Bench: 10 kategoride 488 zor sayfa, yayımlanan hatla (oku_puanla.py + tob_v3.py, CDM dahil) puanlandı. Gârüntü üst sınırı 4.194.304 piksel (işlemcinin varsayılanı; en iyi sonucu bu ayar verdi), en çok 8.000 yeni token.

TurkishOCR-Bench ilk 6: MoganOCR-TR-1.5 91,9 ile yerleşiyor
MoganOCR-TR MoganOCR-TR-1.5
TOB-Skor 89,9 91,9
Metin_TR 89,4 91,0
Tablo (TEDS) 82,5 86,9
FormΓΌl (CDM) 97,8 97,8
Temiz sayfa %65,8 %68,3
GΓΌvenilmez sayfa %26,8 %24,7
TΓΌrkΓ§e karakter testleri 97,6 99,2
Token sΔ±nΔ±rΔ±na kadar dΓΆngΓΌye giren sayfa 2 0

Demo

MoganOCR-TR-1.5'in TurkishOCR-Bench'teki üç sayfada gerçek çıktısı (benchmark koşusundan; model bu sayfaları eğitimde gârmedi): üretilirken akan ham Markdown ve işlenmiş hÒli. Üç sayfa da tam puan alır.

MoganOCR-TR-1.5'in tablo + formül, tablo ve taranmış kitap sayfasında çıktısını üretmesi

Sayfalar: Bayram, Sevilgen, İbiş, GU J Sci Part C 10(1), 2022 (CC BY-SA 4.0); Aşıcıoğlu ve ark., Acta Odontologica Turcica, 2026 (CC BY 4.0); Bektaşi Şairleri ve Nefesleri, s. 160 (kamu malı, Wikimedia Commons).

Nasıl eğitildi

MoganOCR-TR'den başlanarak, gârsel kodlayıcı dondurulmuş hÒlde:

  1. GRPO (DAPO kaybΔ±, TRL + vLLM): 125 adΔ±m, adΔ±m başına 8 sayfa Γ— 8 ΓΆrnek. Sayfalar, modelin kendi ΓΆrneklerinin birbirinden ayrıştığı sayfalardan seΓ§ildi. Γ–dΓΌl: metin benzerliği, tablo satΔ±r ve sayΔ± F1'i, boş sayfada boş Γ§Δ±ktΔ±; dΓΆngΓΌ ve kesik Γ§Δ±ktΔ± sΔ±fΔ±r alΔ±r.
  2. Kısa SFT (1 epoch, 1.086 sayfa): RL'in düzeltemediği boş sayfalar ve unutmayı ânlemek için modelin metin sayfalarındaki kendi yüksek puanlı çıktıları.
  3. Ağırlık ortalaması: %50 RL modeli + %50 SFT modeli. Yalnız SFT modeli boş sayfaları çâzüyor ama metin sayfalarının yaklaşık %5'ini atlıyordu; ortalama ikisinin iyisini korur.

KullanΔ±m

İstem her zaman Sayfayı markdown olarak yaz. olmalıdır. Düşünme kapalı kalır (sohbet şablonunun varsayılanı), çâzme açgâzlüdür ve en çok 8.000 yeni token üretilir. vLLM ve Transformers ârnekleri yukarıdaki İngilizce bâlümle aynıdır.

ÇâzΓΌnΓΌrlΓΌk: İşlemci varsayΔ±lan olarak 4.194.304 piksele kadar gΓΆrΓΌntΓΌ kabul eder; 200 dpi'lik bir A4 sayfa kΓΌΓ§ΓΌltΓΌlmeden girer (yaklaşık 3.800 gΓΆrsel token). YukarΔ±daki bΓΌtΓΌn benchmark sonuΓ§larΔ± bu ayarla ΓΆlΓ§ΓΌldΓΌ ve en iyi sonucu bu ayar verdi; max_pixels değerini düşürmeyin.

MTP: mtp.safetensors, MoganOCR-TR'nin MTP kafasıdır; 1.5 için yeniden eğitilmedi. --speculative-config '{"method": "mtp", "num_speculative_tokens": 3}' ile açılır; hızlanma 1.5 için yeniden âlçülmedi.

Lisans

Apache 2.0

Downloads last month
73
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 moganai/MoganOCR-TR-1.5

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

Space using moganai/MoganOCR-TR-1.5 1

Collection including moganai/MoganOCR-TR-1.5