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
-
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
1 model

Collection including moganai/MoganOCR-TR-1.5