⚖️ Introducing OpenThai 2.0 Legal
Announced 24 July 2026

The Thai legal AI that knows the law by heart — built by Thais, for Thailand.
The OpenThai project is releasing OpenThai 2.0 Legal, an open-weight large language model purpose-built for Thai law, with its full weights freely available on Hugging Face.
It is designed for lawyers, in-house counsel, compliance teams, legal-tech builders and public agencies that need reliable, source-grounded answers on Thai statutes and case law.
Try it live
Talk to the real model in your browser — nothing to install.
Live demo + full documentationiapp.co.th/openmodels/openthai2p0-legal
That page hosts an interactive demo covering all three modes (closed-book / citation-RAG / legal essay), plus a hosted API that is free until 24 August 2026 (a free iApp API key is required).
Download the model
OpenThai 2.0 Legal 30B-A3B — Hugging Facehuggingface.co
iapp/openthai2.0-legal-thaillm-nemotron-3-nano-30b-a3b
🌟 Highlights
- Open weights, self-hostable — a 30B Mixture-of-Experts model activating only ~3B parameters per token, so it runs on a single GPU from 24 GB of VRAM in NVFP4 (4-bit).
- Cites the law, not vibes — returns the exact law name and section (มาตรา) in a fixed JSON contract, ready for RAG pipelines and drafting tools.
- Knows the statute book from memory — asked with no statute in the prompt, it recalls the right section: roughly 4× the closed-book recall of the much larger Qwen3.6-35B on the Civil and Commercial Code.
- Writes like a lawyer — ahead of Qwen3.6-35B on all four legal-essay axes.
- Grounded in real Thai legal sources — trained on published Thai statutes and Supreme Court rulings.
📊 Benchmark results

| Evaluation | OpenThai 2.0 Legal | Qwen3.6-35B | Nemotron-3-30B base |
|---|---|---|---|
| Closed-book: knows the law from memory | |||
| Civil & Commercial Code (n=3,729) | 0.07 | 0.02 | 0.001 |
| Tax — Revenue Code (n=50) | 0.40 | 0.36 | 0.31 |
| Open-book: uses provided law (RAG) | |||
| Civil & Commercial, cite from context (n=3,729) | 0.99 | 0.99 | 0.98 |
| Tax echo (n=50) | 0.84 | 0.84 | 0.64 |
| Tax selection among distractors (n=50) | 0.69 | 0.64 | 0.45 |
| Legal essays (Thai Supreme Court cases) | |||
| Correct citations (n=72) | 0.25 | 0.09 | 0.02 |
| Reaches the right holding (n=72) | 0.57 | 0.50 | 0.31 |
| Covers the key points (n=72) | 0.60 | 0.55 | 0.27 |
| Writing quality (n=72) | 0.46 | 0.43 | 0.13 |
Scores run 0 to 1, higher is better. Citation rows use NitiBench's citation-F1 scorer; holding, coverage and fluency are judged by Gemini 3.1 Flash Lite. Every model was re-run end to end under one identical protocol — single pass, thinking off, citations checked by code.
ℹ️ Scope of the claim
This is the strongest closed-book Thai-law recall measured in a self-hostable model. A closed cloud API still scores higher.
🧾 Model details
| Model name | openthai2.0-legal-thaillm-nemotron-3-nano-30b-a3b |
| Base model | NVIDIA Nemotron-3-Nano-Omni-30B-A3B-Reasoning (text core extracted; Mamba2-Transformer hybrid MoE) |
| Parameters | 30B total, ~3B active per token |
| Context length | 32,768 tested (architecture supports up to 256k) |
| Languages | Thai (primary), English (reasoning) |
| Precision | bfloat16 safetensors, 17 shards · NVFP4 for single-GPU 24 GB serving |
| Training stack | NVIDIA NeMo (Megatron-Bridge for CPT/SFT, NeMo-RL for GRPO) |
| Serving | vLLM (verified) and NVIDIA NIM (OpenAI-compatible) |
| License | NVIDIA Open Model Agreement |
🔬 How it was trained

Three stages on the NVIDIA NeMo stack:
- CPT (continued pretraining) — drills the full text of every section in both directions so the law lives in the weights. 360,985 drills, ~800M Thai-law tokens.
- SFT (supervised fine-tuning) — teaches grounded answering under a fixed JSON contract. 16,436 exam answers and เนติบัณฑิต essays.
- GRPO (reinforcement learning) — reward is the benchmark's own citation F1, penalizing wrong or missing citations. 8,568 graded questions, ~68,500 drafts.
🚀 Getting started
Serve with vLLM on 2 GPUs:
vllm serve iapp/openthai2.0-legal-thaillm-nemotron-3-nano-30b-a3b \
--tensor-parallel-size 2 --trust-remote-code \
--max-model-len 32768 --enforce-eager
Or call the hosted API (free until 24 Aug 2026 with a free iApp API key):
from openai import OpenAI
client = OpenAI(base_url="https://api.iapp.co.th/v3/llm/openthai2p0-legal",
api_key="YOUR_IAPP_API_KEY")
r = client.chat.completions.create(
model="openthai2.0-legal",
messages=[{"role": "user", "content": "ลักทรัพย์ในเวลากลางคืน ผิดมาตราใด"}],
max_tokens=1024,
)
print(r.choices[0].message.content)
🔗 Use it with RAG (strongly recommended)
The model is at its best when the law is in the prompt: open-book citation accuracy is 0.99 versus 0.07–0.40 from pure memory. Always pair it with retrieval for real work.
OpenThaiRAG — Thai-native RAG frameworkopenthai.aieat.or.th/openthairag
Tutorial: Open WebUI & OpenThaiRAGiapp.co.th
Recommended Thai legal datasets for your retrieval corpus: WangchanX-Legal-ThaiCCL-RAG, NitiBench, and authoritative statute text from the Office of the Council of State.
⚠️ Limitations and responsible use
- Retrieval quality drives results — if the retriever supplies the wrong sections, the answer follows them.
- Near-miss rejection is the hardest task — telling a governing section from a closely related one is the lowest-scoring axis for every model, ours included.
- Scope — trained on Thai statutory law and Revenue Department rulings; niche areas and very recent amendments may be thinner.
- Human oversight required — outputs are decision support, not legal advice. Verify every citation against the current law.
🙏 Credits
Built by the OpenThai team (AIEAT / iApp Technology) on the NVIDIA Nemotron and NeMo stack, together with the ThaiLLM initiative and NVIDIA.
Evaluation uses NitiBench (VISAI-AI, MIT); SFT data built from WangchanX-Legal-ThaiCCL (VISTEC, MIT).