- OpenThai2.0 - Opensource Thai Knowledge, Document, and Agentic AI
- โก Run it locally
- Highlights
- Benchmark results
- Evaluation protocol
- Prompt templates by use case
- What it looks like โ 5 real cases
- How it was trained
- Model details
- Deployment notes (read before serving)
- Quickstart
- Limitations (please read)
- ๐ฃ Press & social assets
- Citation
- Developed by OpenThai Team (iApp Technology / AIEAT)
- เธเธนเนเธชเธเธฑเธเธชเธเธธเธ (Sponsor)
OpenThai2.0 - Opensource Thai Knowledge, Document, and Agentic AI
Release notes
- v2.0.3 (1 Sep 2026) โ Thai factual recall repaired: the freerecall training data carried a phantom-citation register ("เธเธเธเธงเธฒเธกเธฃเธฐเธเธธ...") and single-shape questions; cleaned and re-drilled with model-written paraphrases. Paraphrase battery 85/104 (from 79), Thai knowledge battery 21/21, OCR-Eval-104 CER 0.084 (from 0.093), HumanEval 0.982, IFEval-TH 0.837. Known residual: some numeric facts still scatter at temperature 0.7 โ use low temperature for factual queries.
- v2.0.2 (31 Aug 2026) โ identifies as OpenThai 2.0 (iApp Technology + AIEAT) and adds a Thai-language safety guardrail; stock chat template. Printed-OCR CER about +0.02 vs v2.0.1, other benchmarks unchanged.
- v2.0.1 (30 Aug 2026) โ restores closed-book Thai knowledge lost in v2.0.0 (thanks to Dr. Panutat Tejasen's ThaiEval-2026 v3).
- v2.0.0 โ initial release. Earlier builds: revision tags
v2.0.1,v2.0.0.Per-version benchmark tables: CHANGELOGS.md.
เนเธกเนเธเธฅ AI เนเธญเนเธเธเธเธญเธฃเนเธช เธเนเธฒเธเธเธงเธฒเธกเธฃเธนเนเธ เธฒเธฉเธฒเนเธเธข เนเธญเธเธชเธฒเธฃเนเธเธข เนเธฅเธฐเธเธฒเธเนเธญเนเธเธเธเน ยท เนเธเธดเธเธเธฑเธงเนเธเธข iApp Technology เธฃเนเธงเธกเธเธฑเธ เธชเธกเธฒเธเธกเธเธนเนเธเธฃเธฐเธเธญเธเธเธฒเธฃเธเธฑเธเธเธฒเธเธฃเธฐเธเธดเธฉเธเนเธเธฃเธฐเนเธเธจเนเธเธข (AIEAT) ยท Apache 2.0
An open all-in-one Thai AI: reads Thai documents and handwriting at specialist level, answers with Thai knowledge in natural, explanatory Thai, leads its base model and Typhoon on agentic tool use (BFCL) โ and keeps its base model's general intelligence.
๐ Try it FREE right now โ no install: chinda3.iapp.co.th ๐ฆ Or one command on your own machine: ollama.com/openthai/openthai2.0-qwen3.8-27b
โก Run it locally
ollama run openthai/openthai2.0-qwen3.8-27b
Or serve the full bf16 weights with vLLM:
vllm serve iapp/openthai2.0-qwen3.8-27b \
--max-model-len 32768 --gpu-memory-utilization 0.85 \
--max-num-seqs 128 --reasoning-parser qwen3 --trust-remote-code
One 80 GB GPU (~56 GB bf16). The LoRA adapter alone (7 GB, rank 64) is in adapter/ for
serving on top of Qwen/Qwen3.8-27B with dynamic LoRA.
Available formats
| Format | Repo | Runs on |
|---|---|---|
| bf16 (this repo) | iapp/openthai2.0-qwen3.8-27b | vLLM / transformers ยท 1ร 80 GB GPU |
| GGUF Q4_K_M / Q8_0 + vision mmproj | iapp/openthai2.0-qwen3.8-27b-GGUF | llama.cpp ยท CPU or consumer GPU (17 / 29 GB) |
| GGUF IQ2_M (2-bit, 9.8 GB, imatrix) | same repo | recommended 2-bit โ importance-matrix calibrated (Thai+EN), passes factual sanity where plain Q2_K slips; still prefer Q4_K_M when it fits |
| MLX 4-bit | iapp/openthai2.0-qwen3.8-27b-MLX-4bit | Apple silicon, 24 GB+ unified memory (~16 GB) |
| INT8 W8A8 | iapp/openthai2.0-qwen3.8-27b-INT8-W8A8 | vLLM ยท ~40 GB-class GPUs |
| NVFP4 | iapp/openthai2.0-qwen3.8-27b-NVFP4 | vLLM ยท NVIDIA Blackwell |
| Ollama | openthai/openthai2.0-qwen3.8-27b | ollama run openthai/openthai2.0-qwen3.8-27b โ one command, vision + thinking included |
Multi-token prediction (MTP) โ faster decoding, identical outputs
The checkpoint ships the Qwen3.8 MTP draft head (mtp.* tensors,
text_config.mtp_num_hidden_layers: 1), so vLLM can run self-speculative decoding:
vllm serve iapp/openthai2.0-qwen3.8-27b \
--max-model-len 32768 --max-num-seqs 128 --reasoning-parser qwen3 \
--speculative-config '{"method":"qwen3_5_mtp","num_speculative_tokens":2}' \
--trust-remote-code
Speculative decoding is verified token-by-token by the main model, so outputs are identical
with or without it โ the draft head only accelerates decoding. Measured: 75.2 tok/s with MTP
vs 50.1 tok/s without (+50%, single-stream, H100, identical prompts, all outputs clean).
Without the flag the head is simply skipped (no overhead). Per format: GGUF exports the head as nextn layers (llama.cpp);
INT8/NVFP4 keep it in bf16; the MLX build omits it (mlx-vlm has no drafter support for this
architecture yet).
INT8-W8A8 / NVFP4 before 2026-08-31 had no draft head. The quantisation export dropped the
mtp.*tensors while the config still advertised them, so--speculative-configran a draft head with no weights: every draft rejected (mean acceptance length 1.00) and decoding ~1.6ร slower. Found by Dr. Panutat Tejasen. The repaired repos carry the head in bf16 (model-mtp.safetensors,re:.*mtp.*in the quantisation ignore list) and were verified under vLLM speculative decoding. If your INT8/NVFP4 download predates that, re-download โ or serve it without--speculative-config. bf16 weights were never affected.
Highlights
๐น๐ญ Thai knowledge & instruction-following
- Thai national exams (OpenThaiEval): 0.842 โ above base (0.820), Typhoon 2.5 (0.742), Pathumma (0.660)
- Thai instruction-following (IFEval-TH): 0.795 โ above the base model (0.772) and Typhoon (0.749)
- English instruction-following (IFEval): 0.914 โ above base (0.902) ยท code-switching 0.985 (ties Pathumma's 0.990 within one sample)
๐ Thai documents
- Thai handwriting: 0.261 CER vs 0.649 base โ a 60% error reduction
- Books & Royal Gazette: 0.126 vs 0.370 base โ a 66% error reduction ยท printed docs 0.077 vs 0.103
๐ค Agentic
- Tool use (BFCL): 0.820 overall โ beats base (0.811) and Typhoon 2.5 (0.792); multi-turn agentic 0.775 vs Typhoon's 0.550 ยท Coding (HumanEval): 0.957 โ ties Typhoon's best
โ๏ธ In practice
- Answers in natural, explanatory Thai โ switches to terse/JSON output on request
- 1.5ร faster decoding with the bundled MTP draft head (75 vs 50 tok/s measured)
- Five formats โ bf16 ยท GGUF ยท MLX ยท INT8 ยท NVFP4 โ from a MacBook to Blackwell
- Runs entirely inside your own infrastructure โ no data leaves your organization
Benchmark results
(The tables in this section were measured on v2.0.0. For the v2.0.1 numbers see the changelog table at the top of this card.)
All numbers measured under identical serving conditions, with the same answer-unwrap scoring pass applied to every model (verified: unwrapping changes OpenThai 2.0's scores by โค0.001 on every track โ it already answers OCR prompts cleanly).
Thai knowledge & language (higher is better)
| Benchmark | OpenThai 2.0 (27B) | Qwen3.8-27B (base) | Typhoon 2.5 (30B-A3B) | Pathumma think 3.0 (8B) |
|---|---|---|---|---|
| OpenThaiEval (Thai national exams) | 0.842 | 0.820 | 0.742 | 0.660 |
| Code-switching (THโEN) 0.985 vs 0.990 = one sample on n=200 โ a statistical tie |
0.985 | 0.895 | 0.940 | 0.990 |
| HumanEval (coding) | 0.957 | 0.939 | 0.957 | 0.805 |
| MMLU-Redux (5.7k, world knowledge) | 0.916 | 0.924 | 0.884 | 0.762 |
| IFEval-TH (Thai instruction-following) | 0.795 | 0.772 | 0.749 | 0.498 |
| IFEval (EN instruction-following) | 0.914 | 0.902 | 0.846 | 0.630 |
Thai document & handwriting reading (CER โ lower is better)
| Benchmark | OpenThai 2.0 (27B) | Qwen3.8-27B (base) | Typhoon-OCR 1.5 (2B) | Pathumma-vision 2.0 (7B) |
|---|---|---|---|---|
| Wikisource TH โ books/gazette (n=608) | 0.126 | 0.370 | 0.271 | 0.931 |
| DocBench โ government docs (n=906) | 0.327 | 0.530 | 0.551 | 0.691 |
| SEA-DocBench-TH (n=1,499) | 0.497 | 0.559 | 0.575 | 0.832 |
| ThaiOCRBench (n=2,808) | 0.743 | 0.750 | 0.793 | 0.894 |
| MTVQA-TH โ scene text (n=231) | 0.819 | 0.737 | 1.000 | 0.905 |
| Thai handwriting โ text-disjoint (n=916) | 0.261 | 0.649 | 0.054 | 0.821 |
| OCR-Eval-104 โ printed (n=104) | 0.077 | 0.103 | 0.014 | 0.352 |
Reading the comparison
All four models measured by us on the same suite, each with its own recommended prompts/parameters (Typhoon-OCR via its exact model-card protocol), so the experiment can be repeated with the linked checkpoints above. Read it honestly: Typhoon-OCR 1.5 is an excellent transcription specialist โ on clean printed lines and isolated handwriting it beats every model here, including this one. It is also only a transcriber: it accepts a single fixed OCR prompt, so document Q&A and scene-text questions score at or near total error (MTVQA 1.000), and it has no knowledge or assistant ability. OpenThai 2.0 leads on books/gazette reading and on Thai knowledge and instruction-following โ the only Thai open model in these tables that reads documents at specialist level and answers questions about them in the same model. Scene text (MTVQA) is its weakest reading track.
English retention: Benchmarking (previous build: 0.333 CER) on a held-out CoSyn-400K English document set. English document reading is functional but is not this model's focus; for EN-primary workloads prefer the base model.
Agentic tool use โ BFCL (higher is better)
Official Berkeley Function-Calling Leaderboard harness (bfcl-eval 2026.3.23):
3,841 cases across 14 categories, identical OpenAI-function-calling protocol for every model
(tool parser qwen3_xml for the Qwen3.8 family, hermes for Typhoon, per each family's spec).
| Benchmark | OpenThai 2.0 (27B) | Qwen3.8-27B (base) | Typhoon 2.5 (30B-A3B) |
|---|---|---|---|
| BFCL overall โ weighted (n=3,841) | 0.820 | 0.811 | 0.792 |
| Multi-turn agentic episodes (n=200) | 0.775 | 0.750 | 0.550 |
| Irrelevance detection โ knowing when not to call a tool (n=1,124) | 0.779 | 0.763 | 0.726 |
Thai-document fine-tuning did not tax tool use: OpenThai 2.0 leads every summary row, with the
largest gap on multi-turn agentic episodes (+22.5 points over Typhoon 2.5). Typhoon is stronger
on several single-turn AST categories; full per-category
results ship in the repo (results/agentic-2026-08/).
Evaluation protocol
| Mode | What it tests | Setup |
|---|---|---|
| Transcription | reading accuracy | image + fixed OCR prompt, thinking disabled, raw CER vs human-verified ground truth |
| Knowledge (MCQ) | Thai/world knowledge | OpenThaiEval / MMLU-Redux via EvalScope, temperature 0 |
| Instruction-following | arbitrary format constraints | IFEval / IFEval-TH |
| Style canary | keeps the explanatory voice | verbosity ratio vs base, terse-on-request rate, OCR-preamble rate |
Benchmark sets are held out from training by an n-gram leakage guard run on every corpus change. Handwriting uses a text-disjoint split: no transcription string in training appears in the test set.
Prompt templates by use case
The exact prompts our benchmark numbers were measured with. Where the template is "โ", no special prompt is needed โ ask naturally in Thai.
| Use case | Prompt template | Thinking |
|---|---|---|
| Full-page transcription (Markdown) | Extract all text from this image as Markdown.- Preserve the reading order and all information on the page.- Render tables as HTML <table> blocks; equations as LaTeX ($...$ inline, $$...$$ block).- Keep the original language of the text (Thai stays Thai, English stays English).- Return only the Markdown, no explanations. |
off (enable_thinking: false, image attached) |
| Plain-text transcription | Extract all text from this image as plain text in natural reading order.- Keep the original language of the text.- No markup, no formatting symbols, no explanations โ text content only. |
off |
| JSON layout extraction | Extract the full content and layout of this document image as JSON with this schema:{"blocks": [{"type": "title|heading|paragraph|table|figure|list|page_number|other", "reading_order": <int>, "content": "..."}]}- Return only valid JSON, no explanations. |
off |
| Document Q&A | โ (image + natural Thai question) | on (default) |
| Thai knowledge / general assistant | โ (plain question; leave max_tokens unset or โฅ 8k) | on (default) |
| Terse / machine-parsed answers | append เธเธญเธเธชเธฑเนเธเน or เธเธญเธเนเธเนเธ JSON เนเธเนเธฒเธเธฑเนเธ |
on |
| Agentic tool use | standard OpenAI tools=[...] โ no prompt template needed |
on |
What it looks like โ 5 real cases
Verbatim model outputs on held-out benchmark items, same image and prompt for both models โ all five use the Full-page transcription (Markdown) template above with thinking off.
Case 1 โ Thai handwriting (hw_disjoint/48)
- Ground truth: เนเธเธตเธขเธเธฃเธฒเธข
- Qwen3.8-27B (base) โ CER 1.00: 3.1.4 เธเธฒเธฃเธเนเธฒเธข
- OpenThai 2.0 โ CER 0.00: เนเธเธตเธขเธเธฃเธฒเธข
Case 2 โ Thai handwriting (CPE-OPH) (hw_cpeoph/20)
- Ground truth: เธเธเธฃเธเธเธก
- Qwen3.8-27B (base) โ CER 1.00: เธเธธเธเธเธฑเธงเธเธฃเธดเธ
- OpenThai 2.0 โ CER 0.00: เธเธเธฃเธเธเธก
Case 3 โ Book / Royal Gazette page (wikisource_l4/ws4_53969)
- Ground truth: เธเธญเธเธญเนเธฒเธขเนเธฅเนเธเธเนเธญเธเธเธฑเธเธญเนเธฒเธขเนเธงเธตเธขเธเธเธฑเธเธเนเธงเนเธฒเธญเนเธฒเธขเนเธฅเนเธกเนเนเธเนเธฒเธเนเธงเธขเธญเนเธฒเธขเนเธงเธตเธขเธเธเธฑเธเธเน เน เนเธเธฃเธเธงเนเธฒเธเธฐเธเนเธฒเธญเนเธฒเธขเนเธฅเนเธชเธตเธข เธเธฃเธฑเนเธเธญเนเธฒเธขเนเธฅเนเธเธเธถเธ เธเธนเธเธเธฒเธเธฃเธฐเธชเธกเธเธฃเธฐเธชเธฒเธ เธญเนเธฒเธขเนเธงเธตเธขเธเธเธฑเธเธเนเธซเธฒเธขเนเธเธฃเธ เธเธถเธเนเธซเนเธญเนเธฒเธขเนเธฅเธเธณเธเธณเธฃเธงเธเนเธงเธตเธขเธเธเธฑเธเธเนเธกเธฒเธเธงเธฒเธเธเธฃเธฑเธงเนเธกเธทเธญเธเนเธเธขเธ เธนเธกเธดเธ โฆ
- Qwen3.8-27B (base) โ CER 1.00: เนเน เธเธญเธเธญเนเธฒเธขเนเธฅเธฐเนเธเธเธฑเธเธเธญเธเธญเนเธฒเธขเธเธญเธเธเธเธเธงเนเธฒ เธญเนเธฒเธขเนเธฅเธฐเนเธกเนเนเธเนเธฒ เธเนเธงเธขเธญเนเธฒเธขเธเธญเธเธเธเธเน เนเธซเธเนเธญเนเธงเนเธฒเธเธฐเธเนเธฒเธญเนเธฒเธขเนเธฅเธฐเนเธชเธตเธข เธเธฃเธฑเนเธ เธญเนเธฒเธขเนเธฅเธฐเนเธเธฅเธเธเธฑเธเธเธฒเธเธฃเธฐเธชเธกเธเธฃเธฐเธชเธฒเธเธญเนเธฒเธขเธเธญเธเธเธเธเธซเธฒเธขเนเธซเธเนเธญเธด เธเธถเธเนเธซเนเธญเนเธฒเธขเนเธฅเธฐเธเธณเธเธฑเธงเธฃเธงเธงเธเธเธญเธเธเธเธเธกเธฒเธเธเธงเนเธฒเธเธฃเธงเนเธกเธทเนเธญเธเนเธเธขเธ เธกเธด เธเธถเนเธ โฆ
- OpenThai 2.0 โ CER 0.01: เธเธญเธเธญเนเธฒเธขเนเธฅเนเธเธเนเธญเธเธเธฑเธเธญเนเธฒเธขเนเธงเธตเธขเธเธเธฑเธเธเนเธงเนเธฒ เธญเนเธฒเธขเนเธฅเนเธกเนเนเธเนเธฒเธเนเธงเธขเธญเนเธฒเธขเนเธงเธตเธขเธเธเธฑเธเธเน เน เนเธเธฃเธเธงเนเธฒเธเธฐเธเนเธฒเธญเนเธฒเธขเนเธฅเนเธชเธตเธข เธเธฃเธฑเนเธเธญเนเธฒเธขเนเธฅเนเธเธเธถเธเธเธนเธเธเธฒเธเธฃเธฐเธชเธกเธเธฃเธฐเธชเธฒเธเธญเนเธฒเธขเนเธงเธตเธขเธเธเธฑเธเธเนเธซเธฒเธขเนเธเธฃเธ เธเธถเธเนเธซเนเธญเนเธฒเธขเนเธฅเธเธณเธเธณเธฃเธงเธเนเธงเธตเธขเธเธเธฑเธเธเนเธกเธฒเธเธงเธฒเธเธเธฃเธฑเธงเนเธกเธทเธญเธเนเธเธขเธ เธนเธกเธดเธเธถ โฆ
Case 4 โ Government document (parliament budget) (docbench/parliament_year_60_00000903_p0181)
- Ground truth: 175 (52) เธเธเธเธชเธฒเธข เธชเธ.2055 เนเธขเธ เธเธฅ.35 - เนเธกเธทเธญเธเธชเธกเธธเธเธฃเธชเธเธเธฃเธฒเธก (เธเธญเธเธชเธกเธธเธเธฃเธชเธเธเธฃเธฒเธก) เธญ.เนเธกเธทเธญเธ เธ.เธชเธกเธธเธเธฃเธชเธเธเธฃเธฒเธก 0.753 เธเธก. 40,021,200 เธเธฒเธ เธเธเธเธฃเธฐเธกเธฒเธเธเธฑเนเธเธชเธดเนเธ 81,600,000 เธเธฒเธ เธเธต 2559 เธเธฑเนเธเธเธเธเธฃเธฐเธกเธฒเธ 21,178,800 เธเธฒเธ เธเธต 2560 เธเธฑเนเธเธเธเธ โฆ
- Qwen3.8-27B (base) โ CER 1.00: 175 (52) เธเธเธเธชเธฒเธข เธชเธ.2055 เนเธขเธ เธเธฅ.35 - เนเธกเธทเธญเธเธชเธเธนเธฅ เธชเธเธนเธฅ (เธเธญเธเธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ เธชเธเธนเธฅ โฆ
- OpenThai 2.0 โ CER 0.02: (52) เธเธเธเธชเธฒเธข เธชเธ.2055 เนเธขเธ เธเธฅ.35 - เนเธกเธทเธญเธเธชเธกเธธเธเธฃเธชเธเธเธฃเธฒเธก (เธเธญเธเธชเธกเธธเธเธฃเธชเธเธเธฃเธฒเธก) เธญ.เนเธกเธทเธญเธ เธ.เธชเธกเธธเธเธฃเธชเธเธเธฃเธฒเธก 0.753 เธเธก. 40,021,200 เธเธฒเธ เธเธเธเธฃเธฐเธกเธฒเธเธเธฑเนเธเธชเธดเนเธ 81,600,000 เธเธฒเธ เธเธต 2559 เธเธฑเนเธเธเธเธเธฃเธฐเธกเธฒเธ 21,178,800 เธเธฒเธ เธเธต 2560 เธเธฑเนเธเธเธเธเธฃเธฐเธกเธฒเธ 40,021,200 เธเธฒเธ โฆ
Case 5 โ Thai national exam (OpenThaiEval item 200)
เธเธณเธเธฒเธก: เธเนเธฒเธเธกเธตเธเธงเธฒเธกเนเธซเนเธเธญเธขเนเธฒเธเนเธฃเธเนเธญเนเธเธเธขเนเธเธตเนเธชเธฑเนเธเธขเธฒเธเธฒเธเธเธฃเธดเธฉเธฑเธเธเธตเนเธกเธฑเธเธเธฒเนเธเธเธขเนเนเธเนเธเธตเนเธขเธงเธเนเธฒเธเธเธฃเธฐเนเธเธจ (เธเนเธญเธชเธญเธเธเธฃเธดเธขเธเธฃเธฃเธกเนเธเธเธขเน เธเธต 65) Choice: (1) เนเธเนเธเธเธฒเธฃเธเธญเธเนเธเธเนเธฅเนเธเธเนเธญเธขเธกเธดเนเธเนเธซเธฃเธทเธญ (2) เธเนเธฒเธขเธฒเธเธตเธเธฃเธดเธ เธเนเนเธเนเธเธชเธดเนเธเธเธตเนเธเนเธฒเนเธเนเธกเธดเนเธเนเธซเธฃเธทเธญ (3) เนเธเธเธขเนเธเธเธเธตเนเนเธซเนเธเนเธเนเธเธฃเธฐเนเธขเธเธเนเธชเนเธงเธเธเธฑเธงเนเธเนเธซเธฃเธทเธญเนเธกเน (4) เธซเธฒเธเนเธเธเธขเนเธชเธฑเนเธเธขเธฒเธเธฒเธเธเธฃเธดเธฉเธฑเธเธเธตเนเธญเธตเธ เนเธเนเธฒเธเธฑเธเธงเนเธฒเนเธเธเธขเนเธชเธเธฑเธเธชเธเธธเธเธเธฒเธฃเธเธฃเธฐเธเนเธฒเนเธเธชเธดเนเธเธเธตเนเนเธกเนเธเธนเธเธเนเธญเธ เนเธเนเธซเธฃเธทเธญเนเธกเน (5) เนเธเนเธเธเธฒเธฃเธเธฃเธฐเธเนเธฒเธเธตเนเธเธนเธเธนเธเธจเธฑเธเธเธดเนเธจเธฃเธตเธเธงเธฒเธกเนเธเนเธเนเธเธเธขเนเนเธเนเธซเธฃเธทเธญเนเธกเน
- Qwen3.8-27B (base): เธเธณเธเธญเธเธเธตเนเธเธนเธเธเนเธญเธเธเธทเธญ (5) โ
- OpenThai 2.0: เธเธณเธเธญเธเธเธตเนเธเธนเธเธเนเธญเธเธเธทเธญ (4) โ
How it was trained
Three stages of LoRA fine-tuning (r=64, ฮฑ=64, all-linear) on ~143k verified rows:
- Scale SFT teaches reading: verified transcription + explanatory document-QA over Thai handwriting, books, gazettes, and government documents (92,893 rows, 2 epochs).
- Knowledge layer teaches Thai reasoning: grounded MCQ chain-of-thought built from Thai law/government corpora, leak-checked against evaluation questions.
- Adherence layer teaches control: instruction rows kept only if the answer passed a programmatic constraint check (bullet counts, must-include words, JSON-only, length caps) โ zero-hallucination instruction data.
Every stage used a verify-everything pipeline: answers checked against human-confirmed ground truth by n-gram containment; images the model could not read were routed away from explanatory training (anti-hallucination); malformed-Thai, scaffolding-leak, and markup filters on every row; benchmark-leakage guard on the whole corpus.
Model details
| Property | Value |
|---|---|
| Base model | Qwen/Qwen3.8-27B (dense VLM, hybrid Mamba-attention) |
| Parameters | 27B |
| Context length | 262,144 tokens (max_position_embeddings); production API serves 131,072; benchmarks run at 16k |
| Modality | image + text โ text |
| Languages | Thai (primary), English |
| Precision | bfloat16 safetensors (~52 GB incl. MTP shard) + LoRA adapter (7 GB) |
| MTP draft head | included (1 layer) โ self-speculative decoding via qwen3_5_mtp |
| Knowledge cutoff | Inherited from Qwen3.8-27B โ Qwen publishes no exact date for this release (โ early 2026 per third-party tracking; model self-reports are unreliable). OpenThai fine-tuning (to Sep 2026) adds Thai skills, not world events. For anything time-sensitive, pair the model with web search. |
| Training stack | ms-swift 4.3 ยท LoRA r64/ฮฑ64 all-linear ยท 3ร H100 |
| Serving | vLLM โฅ 0.19 (verified), OpenAI-compatible |
| License | Apache 2.0 |
Deployment notes (read before serving)
--max-num-seqs 128is required: the hybrid architecture allocates one Mamba cache block per decode sequence; vLLM's default (1024) aborts engine startup.- Serve with
--reasoning-parser qwen3and leave thinking ON for all text-only requests. Measured (QA 2026-08-24, 36 prompts/config): thinking on withmax_tokensunset gives 94% usable answers and 0% reasoning leakage; sendingenable_thinking:falseon text-only requests degrades to 42% usable. enable_thinking:falseis for image-attached OCR/transcription requests only (measured safe there: 0% leakage across 84 image requests) โ it keeps reasoning text out of transcriptions.- Leave
max_tokensunset, or set it โฅ 8192. Small caps starve generation: at 1024 roughly a third of replies come back empty (finish_reason=length); unset brings this to ~6% (base model behaves the same). Budget ~3.5k output tokens per long answer. - Always send
repetition_penalty: 1.05for long-form Thai generation, and trim the leading blank line some responses start with (content.lstrip()).
Recommended sampling parameters
Inherited from the base Qwen3.8-27B recommendations, with one OpenThai-specific change:
repetition_penalty 1.05 in non-thinking mode (measured: prevents rare long-form Thai
repetition collapse; short OCR outputs are unaffected).
| Parameter | Thinking mode (assistant work) | Non-thinking mode (image-attached OCR/extraction only) |
|---|---|---|
| Temperature | 1.0 | 0.7 โ or 0.0 for deterministic OCR/extraction |
| Top-P | 0.95 | 0.80 |
| Top-K | 20 | 20 |
| Repetition penalty | 1.0 | 1.05 |
| Presence penalty | โ | 1.5 |
{"temperature": 0.0, "top_p": 0.8, "top_k": 20, "repetition_penalty": 1.05, "max_tokens": 8192}
All benchmark numbers in this card were measured in non-thinking mode at temperature 0.
Tested configuration: vLLM 0.19, single H100 80GB, --max-model-len 16384โ32768,
--gpu-memory-utilization 0.85. All benchmark numbers in this card were produced under
this configuration.
Quickstart
import base64
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="none")
img = base64.b64encode(open("thai_document.jpg", "rb").read()).decode()
r = client.chat.completions.create(
model="iapp/openthai2.0-qwen3.8-27b",
messages=[{"role": "user", "content": [
{"type": "image_url", "image_url": {"url": f"data:image/jpeg;base64,{img}"}},
{"type": "text", "text": "เธญเนเธฒเธเธเนเธญเธเธงเธฒเธกเนเธเนเธญเธเธชเธฒเธฃเธเธตเนเธเธฑเนเธเธซเธกเธ"},
]}],
temperature=0.0,
extra_body={"repetition_penalty": 1.05,
"chat_template_kwargs": {"enable_thinking": False}},
)
print(r.choices[0].message.content)
Ask in natural Thai and it explains; add "เธเธญเธเธชเธฑเนเธ เน" or "เธเธญเธเนเธเนเธ JSON เนเธเนเธฒเธเธฑเนเธ" for terse or structured output.
โ ๏ธ Give it room to generate โ this is the #1 setup mistake. The model reasons before it answers, so a short context window or a small
max_tokenscap gets eaten by reasoning and the reply comes back empty. Serve with--max-model-len 32768(or more) and leavemax_tokensunset, or set it โฅ 8192. Measured:max_tokens 1024โ ~33% empty replies; unset โ ~6%.
Limitations (please read)
- Structured extraction is at parity with the base model, no better. On judged ThaiOCRBench this build scores 0.568 vs the base model's 0.570 (n=2,808 โ a statistical tie); the loss concentrates in table parsing, key-information extraction/mapping, and diagram VQA. It reads text better while organizing extracted data about as reliably as the base. For heavy form/table extraction pipelines, evaluate on your own documents.
- Long free-form answers vary between generations. For reproducible outputs set temperature 0 and repetition_penalty 1.05 (our benchmark protocol); for natural prose use the sampling table below. Verify facts independently either way.
- Terse-on-request compliance โ 40% (v9 canary: 42%). The model answers in an explanatory style by default; a bare "answer in one word" request is honored less than half the time. Use explicit formats ("เธเธญเธเนเธเนเธ JSON เนเธเนเธฒเธเธฑเนเธ") for machine-parsed outputs.
- Scene text is the weakest reading track (previous build 0.812 vs base 0.737; this build re-benchmarking) โ for photos of signs/storefronts, prefer the base model or a scene-text specialist.
- Not evaluated for: Thai dialects, vertical/rotated text, medical or legal advice. Handwriting remains genuinely hard โ 0.261 CER means roughly one character in four is still wrong on difficult samples.
- The model can still hallucinate on illegible input.
Recommended: pair with RAG for factual and regulated domains
This model is strongest at reading, explaining, and answering over documents you give it. For tax, legal, medical, or any compliance-sensitive work, we recommend running it with retrieval-augmented generation (RAG) over authoritative sources โ e.g. current statutes, official announcements, or your organization's verified knowledge base โ plus human review, rather than relying on closed-book statutory recall.
For the legal domain specifically, use our purpose-built Thai legal model:
iapp/openthai2.0-legal-thaillm-nemotron-3-nano-30b-a3b.
๐ฃ Press & social assets
Citation
@misc{openthai2_2026,
title = {OpenThai 2.0: An Open Thai Knowledge and Document AI},
author = {iApp Technology and Artificial Intelligence Entrepreneur Association of Thailand},
year = {2026},
url = {https://openthai.aieat.or.th}
}
Built by iApp Technology, launched jointly with AIEAT. Base model: Qwen/Qwen3.8-27B (Apache 2.0).
Developed by OpenThai Team (iApp Technology / AIEAT)
เธเธนเนเธชเธเธฑเธเธชเธเธธเธ (Sponsor)
เนเธเนเธฃเธฑเธเธเธฒเธฃเธชเธเธฑเธเธชเธเธธเธ GPU NVIDIA H100 ร 8 เนเธ เธเธฒเธ เธเธฃเธดเธฉเธฑเธ เธชเธขเธฒเธก เนเธญเนเธญ เธเธญเธฃเนเนเธเธญเนเธฃเธเธฑเนเธ เธเธณเธเธฑเธ โ เธเธญเธเธญเธเธเธธเธเนเธเนเธเธญเธขเนเธฒเธเธขเธดเนเธเธชเธณเธซเธฃเธฑเธเธเธฒเธฃเธชเธเธฑเธเธชเธเธธเธเนเธเธฃเธเธชเธฃเนเธฒเธเธเธทเนเธเธเธฒเธเธเธฒเธฃเธเธฃเธฐเธกเธงเธฅเธเธฅเธเธฅเธญเธเนเธเธฃเธเธเธฒเธฃ ยท siam.ai
Training and evaluation for this model ran on 8ร NVIDIA H100 GPUs generously provided by Siam AI Corporation โ thank you for supporting open Thai AI.
- Downloads last month
- 389





