OpenThai 2.2 Qwen4 35B-A3B: Qwen4 that answers in Thai and English without stray Chinese, as open weights and an API
OpenThai (formerly OpenThaiGPT) and iApp release OpenThai 2.2 Qwen4 35B-A3B, a fine-tune of Qwen4-35B-A3B that answers in Thai and English without Chinese words, or letters of any other script, turning up inside the answer. On 4,060 Thai and English prompts that neither model saw in training, the original puts such characters into 30% of its answers with thinking off and 59% with thinking on; this model does so in 0.15% and 0.12%. It still writes Chinese when the user asks for it. The weights are open under Apache-2.0, and from today the model is also an iApp API.
API: documentation and price · Weights: huggingface.co/iapp/OpenThai2.2-Qwen4-35b-a3b
The problem it fixes
Qwen4-35B-A3B is a strong open model with 35 billion parameters, of which 3 billion work on each token. In Thai and English it often drops Chinese words into the middle of a sentence, as in "แต่เมื่ออ่าน仔细ดู" or "เราต้อง遍历ตัวอักษร". For a Thai customer-facing assistant, a report or a tool-calling agent, each of those words is a defect a person has to find and remove.
OpenThai 2.2 Qwen4 35B-A3B keeps the original's architecture, tokenizer and chat template, so it runs wherever Qwen4-35B-A3B runs, with the same commands. Only the language of the output changes.
How it was made
- A gate on the output layer. The 100,525 tokens that write letters of other scripts are held back in an ordinary chat and released when the user asks for another language.
- LoRA training merged into the weights on 60,084 conversations: 31,794 everyday chats answered by the model itself and kept only when they passed program checks (unit tests for code, gold answers for maths and tool calls, format and clean-language checks), 22,936 Thai-knowledge questions from the OpenThai 2.0 training data, and 5,354 requests for another language, which teach it to open the gate when asked.
Training on top of the gate also changed how the model writes Thai: the share of Thai answers with a word from another language inside a sentence fell from 37% to 21%.
Benchmarks
The OpenThai team ran the original and this model through one harness on vLLM with BF16 weights, question by question. No benchmark measured is below the original's by more than twice its standard error, apart from prompts that demand a whole answer in another language (see Limits).
Thai knowledge rises a little, as a side effect: ThaiExam with thinking off goes from 71.54 to 75.19, and OpenThaiEval from 74.11 to 75.65. With thinking on, the Thai tests are level with the original (ThaiExam 79.70 against 80.49). Tool calling on BFCL v3 rises from 73.24 to 76.05. The full tables, with every standard error, are on the model card.
Compared with Wisp by Centillex
Wisp by Centillex repairs the same fault of Qwen4-35B-A3B without training: an edit of the output layer, published as one 4-bit GGUF file for llama.cpp, which keeps Chinese inside brackets, quotes and tables on purpose. OpenThai 2.2 is trained and ships full BF16 weights for serving with vLLM, and writes no other script unless the user asks, in Thai answers and in English answers alike.
| Prompts | This model | Wisp |
|---|---|---|
| All plain prompts (4,060) | 5 | 249 |
| Ordinary Thai prompts (2,150) | 2 | 25 |
| Thai prompts on Chinese topics (280) | 2 | 139 |
| English prompts (1,630) | 1 | 85 |
Wisp's card reports leak counts and an OpenThaiEval accuracy (76.40% on 356 questions) for its own versions, without the original's figure beside them, and no English, reasoning or tool-calling benchmark; we have not run those benchmarks on Wisp. Choose Wisp for clean Thai prose on a workstation with no training involved; choose OpenThai 2.2 when any character that was not asked for is a defect, in Thai or in English, and for a served API.
Use it through the API
The API takes the OpenAI chat-completions format; the full reference and a live chat are on the API page:
curl -X POST https://api.iapp.co.th/v3/llm/openthai2p2-qwen4/chat/completions \
-H "apikey: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [{"role": "user", "content": "อธิบายภาษีมูลค่าเพิ่มโดยสังเขป"}],
"temperature": 0.7, "top_p": 0.8, "top_k": 20, "presence_penalty": 1.5,
"chat_template_kwargs": {"enable_thinking": false}
}'
from openai import OpenAI
client = OpenAI(base_url="https://api.iapp.co.th/v3/llm/openthai2p2-qwen4", api_key="YOUR_API_KEY")
r = client.chat.completions.create(
model="openthai2.2-qwen4-35b-a3b",
messages=[{"role": "user", "content": "อธิบายภาษีมูลค่าเพิ่มโดยสังเขป"}],
temperature=0.7, top_p=0.8, presence_penalty=1.5,
extra_body={"top_k": 20, "chat_template_kwargs": {"enable_thinking": False}},
)
print(r.choices[0].message.content)
- Price: 0.01 IC per 1,000 input tokens and 0.02 IC per 1,000 output tokens, the price of OpenThai 2.0. A million output tokens cost 20 IC, about 25 THB.
- Thinking is on by default.
"chat_template_kwargs": {"enable_thinking": false}gives a direct answer and uses fewer output tokens. - Sampling: use the Qwen card's settings, as the benchmarks did: thinking off temperature 0.7, top-p 0.8, top-k 20, presence penalty 1.5; thinking on temperature 1.0, top-p 0.95, top-k 20. Avoid temperature 0: with greedy decoding, prompts written in Chinese loop more often.
- Long answers: with thinking on, send
"stream": truewith"stream_options": {"include_usage": true}, so tokens arrive as they are generated and the call is billed by its tokens. - Limits: text only on the API (the model's vision tower is not served), a context of 65,536 tokens, 30 requests a minute per API key.
Limits
- Whole answers in a language other than Chinese are unreliable. Of 23 prompts that demand the whole answer in Hindi, Korean, Russian, Arabic or another language, it met 6; the original met 20. A word or a sentence in Japanese or Korean on request works about as often as with the original.
- Prompts written in Chinese can loop. They are answered in English, and with greedy decoding 27 of 200 such answers ended in a repeating loop (original 0). Use the sampling settings above, set
max_tokens, and for work written in Chinese use the original model. - A stray English word inside a Thai sentence remains in about one Thai answer in five (18.8%).
- It knows only a little more about Thailand than the original: on 600 Thai facts it was not trained on, 27.0% against 24.3%. For Thai law, official letters and local facts, use a model trained on them, such as OpenThai 2.0 or OpenThai 2.0 Legal.
- Not measured: quantised builds (NVFP4, FP8, GGUF) beyond one language test, retrieval (RAG) prompts and long multi-turn chats.
- A
strictrevision of the weights, which cannot write other scripts at all, is on Hugging Face for those who need that guarantee; the API serves the main revision.
Licence and credits
The weights are released under Apache-2.0, as the base model. Developed by iApp, launched with AIEAT. Built on Qwen4-35B-A3B by the Qwen team, Alibaba Cloud. Thank you to Siam AI Corporation for the compute used to train this model.