OpenThai 2.0

One open model that reads Thai documents and handwriting, knows Thailand, and does agentic work — built by Thais, for Thailand.
openthai2.0-qwen3.8-27b
An open all-in-one Thai AI: it reads Thai documents and handwriting at specialist level, answers with Thai knowledge in natural, explanatory Thai, leads its base model and Typhoon 2.5 on agentic tool use (BFCL) — and keeps its base model's general intelligence.
Built by iApp Technology, launched jointly with the Artificial Intelligence Entrepreneur Association of Thailand (AIEAT). Training and evaluation ran on 8× NVIDIA H100 GPUs provided by Siam AI Corporation. Base model: Qwen/Qwen3.8-27B (Apache 2.0).
Free hosted API — free until 30 September 2026 (free iApp API key required)
Don't want to run GPUs? We host the model for you. The endpoint is OpenAI-compatible and free until 30 September 2026 — you just need a free iApp API key: register → API Keys → Create New API Key. Rate-limited to 30 requests/minute per key. After the promo it stays available at 0.01 / 0.02 IC per 1K input/output tokens.
| Base URL | https://api.iapp.co.th/v3/llm/openthai2p0 |
| Endpoint | POST /chat/completions (OpenAI-compatible) |
| Model | openthai2.0 (the route always serves this model) |
| Context length | 262,144 tokens (256K) |
| Auth | iApp API key (apikey header or Authorization: Bearer) |
| Input | text, or text + image (image_url content parts — base64 data URI or public URL, up to 50 MB) |
import base64
from openai import OpenAI
client = OpenAI(base_url="https://api.iapp.co.th/v3/llm/openthai2p0",
api_key="YOUR_IAPP_API_KEY")
# Text — ask anything in Thai
r = client.chat.completions.create(
model="openthai2.0",
messages=[{"role": "user", "content": "อากรแสตมป์กับภาษีมูลค่าเพิ่มต่างกันอย่างไร"}],
)
print(r.choices[0].message.content)
# Vision — read a Thai document
img = base64.b64encode(open("thai_document.jpg", "rb").read()).decode()
r = client.chat.completions.create(
model="openthai2.0",
messages=[{"role": "user", "content": [
{"type": "image_url", "image_url": {"url": f"data:image/jpeg;base64,{img}"}},
{"type": "text", "text": "อ่านข้อความในเอกสารนี้ทั้งหมด"},
]}],
temperature=0.0,
extra_body={"chat_template_kwargs": {"enable_thinking": False}},
)
print(r.choices[0].message.content)
curl -s https://api.iapp.co.th/v3/llm/openthai2p0/chat/completions \
-H "Content-Type: application/json" -H "apikey: YOUR_IAPP_API_KEY" \
-d '{"model":"openthai2.0","messages":[{"role":"user","content":"สวัสดี"}]}'
Leave max_tokens unset — the model reasons before it answers, and a small cap starves the reply. Switch thinking off only for image transcription requests, as in the vision example. The hosted engine already applies the recommended repetition_penalty of 1.05.
Highlights
1. Reads Thai documents and handwriting at specialist level
Thai handwriting character error rate drops from the base model's 0.649 to 0.261 — a 60% error reduction. Books and Royal Gazette pages: 0.126 CER versus 0.370 base (66% reduction). Printed documents: 0.077 versus 0.103.
2. Knows Thailand
0.842 on OpenThaiEval (Thai national exams) — above the base model (0.820), Typhoon 2.5 (0.742) and Pathumma (0.660). Thai instruction-following (IFEval-TH): 0.795, again ahead of base (0.772) and Typhoon (0.749).
3. Does agentic work
0.820 overall on the Berkeley Function-Calling Leaderboard — ahead of both its base model (0.811) and Typhoon 2.5 (0.792), with the largest lead on multi-turn agentic episodes (0.775 versus Typhoon's 0.550). Coding (HumanEval): 0.957.
4. One model, not a pipeline
It is the only Thai open model in these tables that reads documents at specialist level and answers questions about them in the same model — no separate OCR stage, no hand-off, vision and knowledge in one set of weights.
5. Runs anywhere, decodes fast
Five formats — bf16, GGUF, MLX 4-bit, INT8, NVFP4 — from a MacBook to an NVIDIA Blackwell server. The bundled multi-token-prediction draft head speeds decoding by 50% (75.2 versus 50.1 tokens/s measured on H100) with token-identical outputs.
Benchmark results

All four models were measured by us on the same suite under identical serving conditions, each with its own recommended prompts and parameters, so the experiment can be repeated with the linked checkpoints.
Thai knowledge and 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 | 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 |
¹ 0.985 versus 0.990 is one sample on n=200 — a statistical tie.
Thai document and handwriting reading (character error rate — 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 and Royal Gazette (n=608) | 0.126 | 0.370 | 0.271 | 0.931 |
| DocBench — government documents (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 |
Read the comparison 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, and it has no knowledge or assistant ability. OpenThai 2.0 leads on books and gazette reading and on Thai knowledge and instruction-following. Scene text is its weakest reading track — for photos of signs and storefronts, prefer the base model or a scene-text specialist.
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.

| 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 a 22.5-point lead over Typhoon 2.5 on multi-turn agentic episodes.
Transcription tracks report raw character error rate against human-verified ground truth, thinking disabled, temperature 0. Knowledge tracks run via EvalScope at temperature 0. BFCL uses the official harness. Benchmark sets are held out from training by an n-gram leakage guard, and the handwriting split is text-disjoint: no transcription string in training appears in the test set. Full per-category results ship in the Hugging Face repository.
Choose your format
| Format | Repository | Runs on |
|---|---|---|
| bf16 | openthai2.0-qwen3.8-27b | vLLM / transformers · 1× 80 GB GPU |
| GGUF Q4_K_M / Q8_0 + vision mmproj | openthai2.0-qwen3.8-27b-GGUF | llama.cpp · CPU or consumer GPU (17 / 29 GB) |
| Ollama | ollama.com/openthai/openthai2.0-qwen3.8-27b | ollama run openthai/openthai2.0-qwen3.8-27b — one command, laptop-friendly |
| MLX 4-bit | openthai2.0-qwen3.8-27b-MLX-4bit | Apple silicon, 24 GB+ unified memory (~16 GB) |
| INT8 W8A8 | openthai2.0-qwen3.8-27b-INT8-W8A8 | vLLM · ~40 GB-class GPUs |
| NVFP4 | openthai2.0-qwen3.8-27b-NVFP4 | vLLM · NVIDIA Blackwell |
The repository also ships the LoRA adapter alone (7 GB, rank 64) for serving on top of Qwen/Qwen3.8-27B with dynamic LoRA.
Run it locally
The fastest local start is Ollama:
ollama run openthai/openthai2.0-qwen3.8-27b
For production serving, use vLLM — one 80 GB GPU (~56 GB bf16):
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
The model exposes an OpenAI-compatible API:
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.
Faster decoding with the bundled draft head
The checkpoint ships a multi-token-prediction draft head, so vLLM can run self-speculative decoding. Outputs are verified token by token by the main model, so they are identical with or without it — measured 75.2 tokens/s with the head versus 50.1 without (+50%, single stream, H100):
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
Deployment notes (read before serving)
--max-num-seqs 128is required: the hybrid architecture allocates one state-cache block per decode sequence, and vLLM's default (1,024) aborts engine startup.- Leave thinking on for all text-only requests (serve with
--reasoning-parser qwen3). Measured: thinking on withmax_tokensunset gives 94% usable answers with 0% reasoning leakage; forcing thinking off on text-only requests degrades to 42% usable. enable_thinking: falseis for image-attached OCR and transcription requests only — it keeps reasoning text out of transcriptions (0% leakage measured across 84 image requests).- Leave
max_tokensunset, or set it to at least 8,192. The model reasons before it answers; at a 1,024 cap roughly a third of replies come back empty, unset brings this to about 6%. - Send
repetition_penalty: 1.05for long-form Thai generation, and trim the leading blank line some responses start with.
How it was trained
Three stages of LoRA fine-tuning (rank 64, all-linear) on ~143,000 verified rows:
- Scale SFT teaches reading: verified transcription and explanatory document Q&A over Thai handwriting, books, gazettes and government documents (92,893 rows).
- Knowledge layer teaches Thai reasoning: grounded multiple-choice chain-of-thought built from Thai law and 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).
Every stage used a verify-everything pipeline: answers checked against human-confirmed ground truth, images the model could not read routed away from explanatory training, malformed-Thai and scaffolding-leak filters on every row, and a benchmark-leakage guard on the whole corpus.
Model details
| Base model | Qwen/Qwen3.8-27B (dense vision-language model, hybrid Mamba-attention) |
| Parameters | 27B |
| Context length | 262,144 tokens; serving verified at 32k |
| Modality | image + text → text |
| Languages | Thai (primary), English |
| Precision | bfloat16 safetensors (~52 GB) + LoRA adapter (7 GB) |
| Draft head | included (1 layer) — self-speculative decoding via qwen3_5_mtp |
| Serving | vLLM ≥ 0.19 (verified), OpenAI-compatible |
| License | Apache 2.0 |
Limitations (please read)
- Structured extraction is at parity with the base model, no better. On judged ThaiOCRBench this build scores 0.568 versus the base model's 0.570 (a statistical tie); the gap to specialists concentrates in table parsing and key-information extraction. For heavy form and table pipelines, evaluate on your own documents.
- Scene text is the weakest reading track — for photos of signs and storefronts, prefer the base model or a scene-text specialist.
- Terse-on-request compliance is roughly 40%. The model answers in an explanatory style by default; use explicit formats ("ตอบเป็น JSON เท่านั้น") for machine-parsed outputs.
- Not evaluated for Thai dialects, vertical or rotated text, or medical and legal advice. Handwriting remains genuinely hard: 0.261 CER means roughly one character in four is still wrong on difficult samples, and the model can still hallucinate on illegible input.
This model is strongest at reading, explaining and answering over documents you give it. For tax, legal, medical or any compliance-sensitive work, run it with retrieval over authoritative sources plus human review. For the legal domain specifically, use our purpose-built OpenThai 2.0 Legal.
Sponsor
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.
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}
}