OpenThai Β· iApp Technology

OpenThai2.2-OCR-Markdown-20261127

Thai and English document pages to Markdown, with tables as HTML. A 0.6B Thai fine-tune of NVIDIA Nemotron 3.5 Parse, from OpenThai (formerly OpenThaiGPT). Developed by iApp, launched with AIEAT. It keeps Parse's layout boxes, block classes, reading order and serving stack, so it runs anywhere Parse does.

Against Typhoon OCR V2 0.8B

Same pages, same scoring, Typhoon run as its own card says. Higher scores are better.

OpenThai2.2 0.6B Typhoon OCR V2 0.8B Result
Thai documents with tables 95.0 89.0 Win, +6.0
Thai printed text (12 sets) 90.55 85.06 Win, +5.5
ThaiOCRBench tables 67.9 67.9 Tie
Phone photos (MDPBench) † 86.1 84.7 Tie
  Thai photos only 84.4 81.0 Tie
Pages that failed 0 of 2,270
Speed, one page at a time ‑ 0.51 s 1.71 s 3.4Γ— faster
Speed, 16 pages at once ‑ 2.35 s 4.70 s 2.0Γ— faster

Win means we are ahead even at the low end of the 95% confidence range; Tie means the range includes zero, so neither model is clearly better. The ranges, from re-sampling the test pages: documents with tables +2.8 to +9.8, Thai text +4.0 to +7.1, ThaiOCRBench tables βˆ’3.9 to +4.1, MDPBench βˆ’0.9 to +3.6, Thai photos βˆ’0.1 to +6.8.

† With the optional turning and flattening of phone photos (see Use). ‑ One H100, each model with its own draft model (ours: NVIDIA's DFlash2, 32 tokens; Typhoon: its EAGLE-3 head, 3 tokens, as its card), alternating fresh servers; median time per page on Thai document pages, 27 November 2026.

Where Typhoon OCR V2 0.8B is ahead: English and formula-heavy benchmarks. By the Typhoon report's numbers, olmOCR-bench 81.7 against our 72.4 and OmniDocBench v1.6 89.4 against 77.9 (formulas are our weakest part), and SEA-DocBench page error 0.108 against 0.124.

What is new in 2.2

  • New weights, trained further on 9,000 simulated steep phone photos and photographed screens. Against 2.1: Thai documents with tables 95.0 (94.0), Thai text 90.55 (90.24), ThaiOCRBench tables 67.9 (69.5).
  • Phone photos, two optional steps (off by default): turn sideways or upside-down pages upright, and flatten a bent or tilted photo. With both, MDPBench rises from 82.5 (2.1 without them) to 86.1.
  • About 3Γ— faster with DFlash2, NVIDIA's block drafter in dflash2/: 0.51 s per page on one H100, against about 1.5 s with the default serve command (the model's built-in one-token draft head) and 2.6 s with no drafting. Accuracy is unchanged: Thai text 90.35 with it and 90.15 without, th-docs-tables 95.7 and 95.2, ThaiOCRBench tables 68.1 and 67.1; no page of 2,528 failed either way.

Use

Install the package from the model folder, serve with vLLM, and parse pages with NVIDIA's DocumentParser.

hf download iapp/OpenThai2.2-OCR-Markdown-20261127 --local-dir OpenThai2.2-OCR-Markdown
pip install -e "./OpenThai2.2-OCR-Markdown[vllm,client]"
vllm serve ./OpenThai2.2-OCR-Markdown --served-model-name nemotron-parse --trust-remote-code
from nemotron_parse.inference import DocumentParser

with DocumentParser(base_url="http://localhost:8000/v1", model="nemotron-parse") as parser:
    doc = parser.parse("page.png", mode="single")
    print(doc["markdown"])   # Markdown; tables as HTML with rowspan/colspan; formulas as $$...$$
    doc["blocks"]            # a box and a class for every block, in reading order

vLLM runs on Linux (on Windows, under WSL2). Step-by-step guide for Linux, Windows and Mac, with a script for pictures and PDFs: English Β· ΰΈ ΰΈ²ΰΈ©ΰΈ²ΰΉ„ΰΈ—ΰΈ’ Β· δΈ­ζ–‡ (written for 2.0; use this repository's name).

Faster: serve with DFlash2

Needs vLLM 0.34.0 (or another build with native Nemotron Parse and DFlash2) in its own environment, without this package's [vllm] extra; install the package there with [client] only. See docs/serving.md.

vllm serve ./OpenThai2.2-OCR-Markdown --served-model-name nemotron-parse --trust-remote-code \
  --max-model-len 16384 --limit-mm-per-prompt '{"image":1}' \
  --speculative-config '{"method":"dflash","model":"./OpenThai2.2-OCR-Markdown/dflash2","num_speculative_tokens":32}'
  • Keep the word "dflash" out of the model folder's path: vLLM picks the drafting method from the path.
  • These vLLM builds return ΰΈ³ as two characters; DocumentParser puts it back together (standard_output=True, the default).

Phone photos

pip install onnxruntime opencv-python-headless pyclipper
hf download PaddlePaddle/UVDoc_onnx inference.onnx --local-dir OpenThai2.2-OCR-Markdown/dewarp    # UVDoc, 32 MB
hf download iapp/OpenThai2.2-OCR-Text-20261127 --local-dir OpenThai2.2-OCR-Text                  # for turning, 8 MB
with DocumentParser(base_url="http://localhost:8000/v1", model="nemotron-parse",
                    orient=True, orient_models="OpenThai2.2-OCR-Text",
                    dewarp=True, dewarp_models="OpenThai2.2-OCR-Markdown/dewarp") as parser:
    doc = parser.parse("photo.jpg")

Scans, PDFs and screenshots pass through unchanged. Turning costs about 0.7 s of CPU for a 12-megapixel photo, flattening about 0.45 s.

Options

PostprocessOptions Default Effect
keep_page_headers_footers False Page headers and footers stay out of the Markdown (they remain in doc["blocks"]).
standard_output True ΰΈ³ written as one character (U+0E33); no rowspan="1" / colspan="1".
formula_display_dollars True Formulas as $$...$$; False gives Parse's \(...\).

Blank pages come back empty without being sent to the model (skip_blank=False turns this off).

Other ways to run it

All results

Model th-docs-tables ThaiOCRBench tables Thai text (12 sets) MDPBench MDPBench Thai olmOCR-bench OmniDocBench v1.6
OpenThai2.2 0.6B † 95.0 67.9 90.55 86.1 84.4 72.4 77.9
OpenThai2.1 0.6B 94.0 69.5 90.24 82.5 80.7 73.1 79.6
Typhoon OCR V2 0.8B 89.0 67.9 85.06 84.7 81.0 81.7 * 89.4 *
Typhoon OCR V2 2B 91.6 69.4 89.51 87.0 85.0 84.7 91.5
Nemotron 3.5 Parse 0.6B (base) 91.3 68.3 89.02 79.6 77.4 62.4 80.1

* From the Typhoon OCR 2 report (arXiv:2611.27494); we did not run the 0.8B on these two. Typhoon's other figures are our own reads under its current card (images under 1,600 px enlarged), except MDPBench, read on 13 November 2026.

  • Against Typhoon OCR V2 2B: ahead on Thai documents with tables (+3.4 [+1.3, +6.1]) and Thai text (+1.04 [+0.49, +1.66]), level on MDPBench, behind on ThaiOCRBench tables (βˆ’1.4 [βˆ’4.9, +1.9], not significant) and well behind on olmOCR-bench and OmniDocBench.
  • The MDPBench gain is the two photo steps': 2.1's weights with them score 87.1.
  • Scores: th-docs-tables and ThaiOCRBench tables are text and table structure (TEDS) together; Thai text is 100 Γ— (1 βˆ’ CER), a failed page counting as empty; MDPBench with its own scorer, formula metric off.

Model at a glance

Parameters630.8M: vision encoder 439.0M (C-RADIOv4-SO400M), text decoder 191.8M (10-layer mBART); DFlash2 drafter 89.3M
Input / outputone page image (fitted to 1,664 Γ— 2,048) β†’ Markdown with HTML tables and LaTeX formulas, plus a box and a class per block
LanguagesThai and English
Hardwareone NVIDIA GPU with vLLM; about 8 GB is enough
Trainingfull fine-tune of Nemotron 3.5 Parse on 88,073 rows with exact text labels (never another model's reading), one epoch on one H100; released weights = 80% fine-tune + 20% base
Versions2.2.2 = tag v2.2.2 (weights sha256 3ce18a76…); 2.1 = tag v2.1.0; 2.0 = tag v2.0.0. Earlier names (OpenThai2.0-OCR-Markdown, OpenThai2.1-OCR-Markdown-20261118) redirect here.

Limits

  • Formulas are the weakest part (OmniDocBench formula CDM 64.2 against Typhoon OCR V2 2B's 95.1).
  • English benchmarks: well behind Typhoon on olmOCR-bench and OmniDocBench.
  • Tables unlike Thai official documents can come out with a row missing or a span wrong.
  • Handwriting only at text-line level; full handwritten pages are not a target.
  • On MDPBench 2 of 320 pages were cut off at the token limit (DocumentParser raises GenerationError).

Built on NVIDIA Nemotron

The base model, tokenizer and serving code are NVIDIA's (nvidia/Nemotron-3.5-Parse, OpenMDW-1.1). Their licence, notices and tokenizer attribution are included unchanged, and NVIDIA's model card is kept as NVIDIA_NEMOTRON_PARSE_README.md. Our changes to NVIDIA's code are the Markdown options in nemotron_parse/postprocessing.py, the blank-page check and the optional turning and flattening in nemotron_parse/inference.py, and nemotron_parse/dewarp.py and nemotron_parse/orient.py. The dflash2/ drafter is NVIDIA's, unchanged. The page mask in dewarp/ is iApp's ONNX export of the MonkeyOCRv2 preprocessor's page mask (zenosai/MonkeyOCRv2-S-Parsing, Apache-2.0); UVDoc (Apache-2.0) is downloaded from PaddlePaddle.

Acknowledgements

Trained on NVIDIA H100 GPUs provided by Siam AI. Thanks to NVIDIA for Nemotron 3.5 Parse and DFlash2, to the authors of MDPBench and of Typhoon's evaluation harness, and to the people behind the public data we trained on.

Licence

A derivative of NVIDIA Nemotron 3.5 Parse, distributed under the OpenMDW License Agreement, version 1.1. The tokenizer is MIT-licensed (see TOKENIZER_ATTRIBUTION.md).

Downloads last month
158,727
Safetensors
Model size
0.6B params
Tensor type
I64
Β·
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for iapp/OpenThai2.2-OCR-Markdown-20261127

Quantized
(9)
this model
Finetunes
1 model
Quantizations
3 models

Spaces using iapp/OpenThai2.2-OCR-Markdown-20261127 3

Collection including iapp/OpenThai2.2-OCR-Markdown-20261127

Paper for iapp/OpenThai2.2-OCR-Markdown-20261127