Skip to main content

📄 3x faster! Thai document AI, two free models

Version 2.2 released 27 November 2026 ¡ 2.1 released 18 November ¡ 2.0 announced 12 November

OpenThai 2.2 OCR, 3x faster: 0.51 s per page on an NVIDIA H100 with DFlash2, down from 1.5 s, and 90.6 on printed Thai text, the highest of every OCR system we tested

OCR Markdown 0.6BOCR Text 8 MBCommercial use allowedThai + Englishv2.2

Sound familiar? You scan a stack of government documents, or take a photo of one with your phone (the paper bent, the picture tilted or upside down), and you want the text. But the OCR turns every table into one long line, you can't tell which number belongs to which row, and you end up typing it all in again.

The OpenThai team at iApp Technology gives away two Thai OCR models, free to download and free for commercial use. Version 2.2 reads about 3x faster with NVIDIA's DFlash2, turns sideways or upside-down pages upright and flattens bent or tilted photos before reading, and OCR Text now reads the old-style āš™ correctly far more often (what's new in 2.2).

OpenThai 2.2 OCR MarkdownOpenThai 2.2 OCR Text
What it doesPage or phone photo → Markdown, tables as HTML (merged cells supported), formulas as LaTeX, with a box and a class for every blockPage → text in reading order, with a box and a confidence for every line
Size0.6B parameters (630.8M), plus an optional 89.3M DFlash2 drafter2.02M parameters (0.002B), ONNX files about 8 MB in all (detector, recognizer, a second recognizer for loopless fonts, and a āš™ classifier)
Runs onOne NVIDIA GPU with vLLM, about 8 GB is enough; or a Mac or CPU with llama.cpp (the GGUF still has 2.1's weights)CPU only, no GPU needed
Speed0.51 s per page on an H100 served with DFlash2 (about 1.5 s with the default serve command); about 6 s per page on an Apple M3 Max (GGUF)0.39 s per page, about 57,000 pages an hour on 8 cores
Built onNVIDIA Nemotron 3.5 ParsePaddlePaddle PP-OCRv6-tiny
LicenceOpenMDW-1.1Apache-2.0
Good forDocuments with tables, phone photos, papers and slides, preparing data for RAGLarge volumes of plain text, machines without a GPU, confidential documents that cannot leave the building

1) OpenThai 2.2 OCR Markdown: 3x faster, tables stay tables​

It reads Thai and English document pages into Markdown, with tables as HTML including rowspan and colspan. It is a full fine-tune of NVIDIA Nemotron 3.5 Parse (0.6B), so it keeps Parse's layout boxes, block classes and reading order, and works with Parse's serving stack anywhere.

New in 2.2

  • About 3x faster with DFlash2, NVIDIA's block drafter, shipped in the model's dflash2/ folder: 0.51 s per page on one H100, against about 1.5 s with the default serve command and 2.6 s with no drafting. Accuracy is unchanged (Thai text 90.35 with it and 90.15 without; no page of 2,528 failed either way).
  • Phone photos, two optional steps (off by default): turn sideways or upside-down pages upright, and flatten a bent or tilted photo before reading. With both, phone photos of documents (MDPBench, 320 pages) go from 82.5 (2.1 without them) to 86.1, and Thai photos only from 80.7 to 84.4. The gain on this set comes from the two steps: 2.1's weights with them score 87.1. Scans, PDFs and screenshots pass through unchanged.
  • New weights, trained further on 9,000 simulated steep phone photos and photographed screens: Thai documents with tables from 94.0 to 95.0, and printed Thai text (12 sets) from 90.24 to 90.55, the highest of every OCR system we tested. ThaiOCRBench tables dip slightly, from 69.5 to 67.9.
  • No page failed out of the 2,270 pages of the text benchmark.

OpenThai2.2-OCR-Markdown-20261127: weights, the DFlash2 drafter and the model card with full resultshuggingface.co/iapp/OpenThai2.2-OCR-Markdown-20261127

GGUF for llama.cpp (2.1's weights): run on a Mac, a CPU or an ordinary graphics card, no vLLM neededhuggingface.co/iapp/OpenThai2.1-OCR-Markdown-20261118-GGUF

Rather not run a GPU? iApp's OCR Markdown API is served with DFlash2, takes 32,600 pages an hour, 0.15 IC per pageiapp.co.th/en/docs/ocr/document-markdown

Modelth-docs-tables v1 (65 pages)ThaiOCRBench tables (193 images)Printed Thai text (12 sets)MDPBench Thai+English (320 pages)MDPBench ThaiolmOCR-benchOmniDocBench v1.6
OpenThai2.2-OCR-Markdown †95.067.990.5586.184.472.477.9
OpenThai2.1-OCR-Markdown94.069.590.2482.580.773.179.6
Typhoon OCR V2 0.8B89.067.985.0684.781.081.7 *89.4 *
Typhoon OCR V2 2B91.669.489.5187.085.084.791.5
Nemotron 3.5 Parse (base)91.368.389.0279.677.462.480.1

Bold is the best in each column. † With the photo turning and flattening steps on MDPBench. * 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 model card (images under 1,600 px enlarged).

With 95% confidence intervals: against Typhoon OCR V2 0.8B, we are ahead on Thai documents with tables, +6.0 [+2.8, +9.8], and on Thai text, +5.5 [+4.0, +7.1]; ThaiOCRBench tables and MDPBench are not significantly different. Reading one page at a time on the same H100 we are 3.4x faster (0.51 against 1.71 s, each model with its own draft model). Against Typhoon OCR V2 2B, we are ahead on Thai documents with tables, +3.4 [+1.3, +6.1], and on Thai text, +1.04 [+0.49, +1.66]; level on MDPBench; behind on ThaiOCRBench tables by 1.4, not significant; and well behind on olmOCR-bench and OmniDocBench, mostly on formulas. Table scores combine text and table structure (TEDS); Thai text is 100 × (1 − CER); MDPBench uses its own scorer with the formula metric off. Everything is in the model card.

How to use it​

Serve it with vLLM like the base model, then read pages with NVIDIA's DocumentParser from the nemotron_parse package that ships with the model. vLLM runs on Linux; on Windows, run it under WSL2.

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

3x faster with DFlash2: use vLLM 0.34.0 (or another build with native Nemotron Parse and DFlash2) in its own environment, and install this package there with [client] only, without [vllm].

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.

Phone photos: download the UVDoc flattener (32 MB) and OCR Text (8 MB, used for turning pages), then set orient=True and dewarp=True.

pip install onnxruntime opencv-python-headless pyclipper
hf download PaddlePaddle/UVDoc_onnx inference.onnx --local-dir OpenThai2.2-OCR-Markdown/dewarp
hf download iapp/OpenThai2.2-OCR-Text-20261127 --local-dir OpenThai2.2-OCR-Text
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.

  • To get 2.0-style output (page headers and footers kept in the Markdown, formulas as \(...\)), set PostprocessOptions; see the model card.
  • On a Mac or CPU: use the GGUF files (still 2.1's weights) with our llama.cpp fork (iapp-technology/llama.cpp, branch nemotron-parse); upstream llama.cpp does not support this architecture yet.
  • A step-by-step guide for Windows, Mac and Linux, with a script for pictures and PDFs: on the iApp blog (written for 2.0; it works for 2.2 with the new model name).

2) OpenThai 2.2 OCR Text: an 8 MB model, no GPU needed​

A Thai and English printed-text OCR that runs on an ordinary CPU. 2.02M parameters, about 8 MB of ONNX files: a PP-OCRv6-tiny line detector, a Thai line recognizer trained by iApp, a second recognizer for loopless fonts and a āš™ classifier, run with OpenVINO or ONNX Runtime. It is the engine behind iApp Document OCR.

New in 2.2

  • The old-style āš™ of typewriters and old letterpress is read as āš• far less often: on 918 old pages it never saw in training, āš™ read as āš• fell from 19 times to 6. The āš™ classifier (judge9.onnx) can only change āš• to āš™, and nothing else moved on the benchmark (v2.2.1).
  • Optional flattening of bent or tilted photos before reading, off by default; scans and PDFs are left alone. On 200 simulated phone photos, accuracy went from 86.7 to 90.5 (v2.2.0).
  • The same speed, 0.39 s per page, offline, so confidential documents stay on the machine.

The runtime turns sideways and upside-down pages upright, deskews, reads two- and three-column pages column by column while keeping tables and lists in row order, handles light-on-dark and coloured text, and puts the floating tone marks of old letterpress back on their line.

OpenThai2.2-OCR-Text-20261127: ONNX models, runtime and comparisonhuggingface.co/iapp/OpenThai2.2-OCR-Text-20261127

iApp Document OCR API is built on this model: plain text 0.049 IC per page; Word / Excel / searchable PDF 0.15 IC per pageiapp.co.th/en/docs/ocr/document

Both models read the same pages and are scored the same way. The score is character accuracy, 100 × (1 − CER); higher is better.

OpenThai 2.2 OCR Text (0.002B)Typhoon OCR V2 0.8B
Average of 12 printed Thai and English sets88.285.1
Administrative Court judgments97.095.6
Royal Gazette (verified set, 54 pages)97.896.0
Parliament budget documents (verified set, 74 pages)99.685.9
Old books (Thai Wikisource)78.876.3
OCR104 Thai+English crops87.982.1
ThaiOCRBench full pages83.886.1
Runs ona CPUan NVIDIA GPU
Seconds per page0.39 on a CPU1.71 on an H100

The 12-set average is ahead by +3.1 [+1.4, +4.9] at 95% confidence; a page a model fails on counts as empty. The speeds are not on the same pages (ours: 24 pages on an Intel Xeon CPU; Typhoon: Thai document pages on an H100), so read them as a rough guide, not a ratio. Typhoon OCR V2 0.8B is ahead on handwriting (69.8 against 10.3; this model does not target handwriting), receipts (77.8 against 68.3), scene text and ThaiOCRBench full pages. The 15-engine comparison with speeds (measured at v2.1.1) is in the 2.1 model card. Court judgments are a document type in the training data (different documents from the test).

How to use it​

hf download iapp/OpenThai2.2-OCR-Text-20261127 --local-dir OpenThai2.2-OCR-Text
pip install -r OpenThai2.2-OCR-Text/requirements.txt
cd OpenThai2.2-OCR-Text
from runtime.line_engine import LineOCR

ocr = LineOCR(".", threads=1)
r = ocr.read("page.png") # path, bytes, ndarray or PIL image
print(r["text"]) # text in reading order (column by column)
r["lines"] # [{"text", "confidence", "row", "box"}]
  • For high throughput, run one worker process per core with threads=1.
  • Phone photos: pip install onnxruntime, then hf download PaddlePaddle/UVDoc_onnx inference.onnx --local-dir dewarp and LineOCR(".", pre={"dewarp": True}).

🔁 Using an earlier version?​

  • The old links and model names still work (iapp/OpenThai2.0-OCR-â€Ļ and iapp/OpenThai2.1-OCR-â€Ļ-20261118). Hugging Face redirects them to the new names, and you get 2.2.
  • To keep an earlier version, pass revision="v2.1.0" (OCR Markdown) or revision="v2.1.4" (OCR Text) when you download; for 2.0, revision="v2.0.0".
  • So that an update never changes your output unnoticed, pin revision="v2.2.2" (OCR Markdown) or revision="v2.2.1" (OCR Text).

🤔 Why free?​

Millions of pages of Thai documents in government offices, hospitals and companies cannot be sent to a foreign cloud. We want every one of them to be able to run OCR on their own machines. And anyone building an AI chatbot on their organisation's documents has to start by reading those documents correctly.

âš ī¸ Honestly: what it is not good at yet​

  • English pages and formulas: Typhoon OCR V2 is clearly ahead (olmOCR-bench 72.4 against 81.7 for the 0.8B and 84.7 for the 2B). Formulas are OCR Markdown's weakest part (OmniDocBench formula CDM 64.2 against 95.1 for Typhoon OCR V2 2B).
  • ThaiOCRBench tables dipped slightly from 2.1 (67.9, from 69.5).
  • Phone photos are level with Typhoon OCR V2 2B (MDPBench 86.1 against 87.0), you have to switch the turning and flattening steps on, and 2 of 320 pages were cut off at the token limit.
  • Pictures and figures with no text can still come back with invented text (blank pages are skipped).
  • Chinese is not a target language; it reads noticeably worse than English.
  • Full handwritten pages are not a target. OCR Markdown reads handwriting at line level; OCR Text reads print only.
  • Tables unlike Thai government documents can still come out with rows missing or a row span wrong.
  • Thai digits occasionally come out as Arabic digits.
  • OCR Text: receipts photographed at an angle and scene text read poorly, heavily decorative fonts can be misread, stamps come out as text, a āš™ that the detector or recognizer loses is not recovered by the classifier, and the bf16 speed needs a CPU with AMX (Sapphire Rapids or later).

The team is working on it. Thanks to the Typhoon team for raising the bar for Thai OCR with us.

👨‍👩‍👧 The OpenThai 2 family​

ModelWhat it doesSizeStatus
OpenThai 2.0Thai chat and reasoning LLM that reads images27BReleased
OpenThai 2.0 LegalThai legal model for RAG30B-A3BReleased
OpenThai-SystemOneThai + English decision model (does not generate text)0.8BReleased
OpenThai 2.2 OCR MarkdownDocument pages to Markdown, tables stay tables0.6BUpdated 27 Nov
OpenThai 2.2 OCR TextPrinted-text OCR on a CPU8 MBUpdated 27 Nov
OpenThai 2.0 ASR StreamingLive Thai speech to text0.64BReleased

đŸˇī¸ Apps built on OpenThai OCR​

If your app uses this model, send it in at openthai.ai/powered-by to be listed. The Powered by badge for your app is there too.

Powered by OpenThai OCR

🤝 Get involved​

  • Have a Thai document that no OCR can read (with no personal data in it)? Send it to us to try.
  • Talk to us on Discord and in the Facebook group.

📄 Licence and credits​

  • OpenThai 2.2 OCR Markdown: OpenMDW-1.1, which allows any use, including commercial use. It is a derivative of NVIDIA Nemotron 3.5 Parse, also OpenMDW-1.1; the DFlash2 drafter is NVIDIA's, unchanged; the tokenizer is MIT-licensed, and our llama.cpp fork is MIT-licensed, as llama.cpp is. Built on NVIDIA Nemotron.
  • OpenThai 2.2 OCR Text: Apache-2.0. The detector and the recognizer's starting point are PaddlePaddle's PP-OCRv6-tiny (Apache-2.0).
  • Flattening photos: UVDoc (Apache-2.0), downloaded from PaddlePaddle, and a page mask that iApp exported to ONNX from MonkeyOCRv2 (Apache-2.0).

Developed by iApp, launched with AIEAT.

🙏 Thank you, Siam AI​

Siam AI Corporation

Both models were trained on NVIDIA H100 GPUs supported by Siam AI Corporation. Our sincere thanks for their continued support of open Thai AI, and thanks to NVIDIA for Nemotron 3.5 Parse and DFlash2.