Table with columns: Content, 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> |
Everything visible on the page is transcribed as it appears, including page numbers, footnotes and watermarks. Handwriting is transcribed as written; the writer's spelling mistakes are not corrected.
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.
vLLM
vllm serve moganai/MoganOCR-TR --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", "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: The repository includes an MTP head trained for this model (mtp.safetensors). Enable it in vLLM with --speculative-config '{"method": "mtp", "num_speculative_tokens": 3}'. Decoding is 1.73× faster for single requests and 1.22× faster with 64 concurrent requests (RTX PRO 6000).
from PIL import Imagefrom transformers import AutoModelForImageTextToText, AutoProcessor model_id = "moganai/MoganOCR-TR"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))
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).
Repetition: on some pages the model can get stuck repeating the same text until it reaches the token limit. If this happens, try repetition_penalty=1.15. The results below were obtained without it.
Examples
Model outputs on TurkishOCR-Bench pages, rendered. The model has not seen these pages in training.
Results
TurkishOCR-Bench has 488 hard pages from 368 documents in 10 categories (academic, table, formula, scanned, old and new Official Gazette, book, receipt/invoice/form, slide, handwriting), with human-verified ground truth and 115,116 unit tests. The main score is TOB = (Text_TR + Table + Formula) / 3: tables by TEDS, block formulas by CDM, and Text_TR as the geometric mean of unit-test accuracy and page usability on Turkish text.
The pages were chosen because models struggle on them, so these scores compare models; they are not the accuracy to expect on an average document. MoganOCR-TR was built by the team that built the benchmark. The training set was checked for overlap with it, every model is scored by the same deterministic rules, and the raw outputs of all 18 models are released with the benchmark.
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 (Türkçe)
MoganOCR-TR, Türkçe belgeler için 2B parametreli bir OCR modelidir. Tek bir sayfa görüntüsü alır ve bütün sayfayı okuma sırasıyla Markdown olarak yazar; tablolar HTML, formüller LaTeX olur. Qwen3.5-2B üzerine, görsel kodlayıcı dahil tam ince ayardır; %77'si Türkçe olan 357.763 sayfayla eğitildi.
TurkishOCR-Bench'te 89,9 alır: 18 model içinde dördüncü, OCR'a özel modeller içinde birinci; kendisinden yüzlerce kat büyük genel modellerin önündedir. Yalnız Türkçe metinde, GPT-6.1 Sol'un ardından ikincidir.
Çıktı biçimi
Table with columns: İçerik, Biçim| İçerik | Biçim |
|---|
| Metin, başlık, liste | Markdown. Her paragraf tek satırdır; satır sonunda bölünen kelimeler birleştirilir. |
| Tablo | HTML <table>, birleşik hücreler rowspan / colspan ile |
| Formül | LaTeX, satır içi $...$ ve blok $$...$$ |
| Sayfa üst / alt bilgisi | <header>...</header> ve <footer>...</footer> |
Sayfada görünen her şey göründüğü gibi yazılır: sayfa numarası, dipnot ve filigran dahil. El yazısı yazıldığı gibi aktarılır; yazarın yazım hataları düzeltilmez.
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
vllm serve moganai/MoganOCR-TR --max-model-len 32768 --limit-mm-per-prompt '{"image": 1, "video": 0}'
import base64, requests img = base64.b64encode(open("sayfa.png", "rb").read()).decode()r = requests.post("http://localhost:8000/v1/chat/completions", json={ "model": "moganai/MoganOCR-TR", "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: Depoda bu model için eğitilmiş bir MTP kafası (mtp.safetensors) bulunur. vLLM'de --speculative-config '{"method": "mtp", "num_speculative_tokens": 3}' ile açılır. Çözme tek istekte 1,73×, 64 eşzamanlı istekte 1,22× hızlanır (RTX PRO 6000).
from PIL import Imagefrom transformers import AutoModelForImageTextToText, AutoProcessor model_id = "moganai/MoganOCR-TR"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("sayfa.png")}, {"type": "text", "text": "Sayfayı markdown olarak yaz."},]}]girdi = processor.apply_chat_template(messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt").to(model.device)cikti = model.generate(**girdi, max_new_tokens=8000, do_sample=False)print(processor.decode(cikti[0, girdi["input_ids"].shape[1]:], skip_special_tokens=True))
İş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).
Tekrar sorunu: Model bazı sayfalarda aynı metni token sınırına kadar tekrarlayabilir. Bu durumda repetition_penalty=1.15 deneyin. Aşağıdaki sonuçlar bu ayar olmadan alınmıştır.
Örnekler
TurkishOCR-Bench sayfalarında model çıktıları, işlenmiş hâlde. Model bu sayfaları eğitimde görmedi.
Sonuçlar
TurkishOCR-Bench, 10 kategorideki (akademik, tablo, formül, taranmış, eski ve yeni Resmî Gazete, kitap, fiş/fatura/form, slayt, el yazısı) 368 belgeden 488 zor sayfa, insan onaylı doğru metin ve 115.116 birim testten oluşur. Ana skor TOB = (Metin_TR + Tablo + Formül) / 3'tür: tablolar TEDS, blok formüller CDM ile ölçülür; Metin_TR ise Türkçe metinde birim test doğruluğu ile sayfa kullanılabilirliğinin geometrik ortalamasıdır.
Sayfalar modellerin zorlandığı sayfalardan seçildi; bu skorlar modelleri karşılaştırır, ortalama bir belgede beklenecek doğruluğu göstermez. MoganOCR-TR, benchmarkı hazırlayan ekip tarafından geliştirildi. Eğitim kümesi benchmarkla örtüşme açısından denetlendi, bütün modeller aynı deterministik kurallarla puanlandı ve 18 modelin ham çıktıları benchmarkla birlikte yayımlandı.
Lisans
Apache 2.0
Atıf
@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}}