Instructions to use openthaigpt/openthaigpt-1.6-72b-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openthaigpt/openthaigpt-1.6-72b-instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="openthaigpt/openthaigpt-1.6-72b-instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("openthaigpt/openthaigpt-1.6-72b-instruct") model = AutoModelForCausalLM.from_pretrained("openthaigpt/openthaigpt-1.6-72b-instruct", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use openthaigpt/openthaigpt-1.6-72b-instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "openthaigpt/openthaigpt-1.6-72b-instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openthaigpt/openthaigpt-1.6-72b-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/openthaigpt/openthaigpt-1.6-72b-instruct
- SGLang
How to use openthaigpt/openthaigpt-1.6-72b-instruct with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "openthaigpt/openthaigpt-1.6-72b-instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openthaigpt/openthaigpt-1.6-72b-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "openthaigpt/openthaigpt-1.6-72b-instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openthaigpt/openthaigpt-1.6-72b-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use openthaigpt/openthaigpt-1.6-72b-instruct with Docker Model Runner:
docker model run hf.co/openthaigpt/openthaigpt-1.6-72b-instruct
πΉπ OpenThaiGPT 1.6 72b
πΉπ OpenThaiGPT 1.6 72b is a 72-billion-parameter Thai language model designed for general purpose tasks with strong reasoning capabilities. Building upon the foundation of OpenThaiGPT 1.5, this latest version demonstrates improved performance across a variety of benchmarks, particularly in code reasoning and general language tasks.
π’ OpenThaiGPT is now OpenThai
The project was renamed in July 2026. Released models keep their original names, and this repository path is unchanged and permanent. β openthai.aieat.or.th
Other models in the family
| Need | Model |
|---|---|
| βοΈ Thai law, statute citation, legal RAG | OpenThai 2.0 Legal 30B-A3B β newest |
| π§ Reasoning, maths, logic, code | OpenThaiGPT R1 32B |
| π¬ General Thai chat and coding | OpenThaiGPT 1.6 72B |
| π» Limited GPU | OpenThaiGPT 1.5 7B |
β‘ Run it locally
ollama run openthai/openthai-1.6-72b
Official GGUF quants (Q4_K_M / Q5_K_M / Q8_0): openthaigpt/openthaigpt-1.6-72b-instruct-GGUF β ~48 GB RAM/VRAM in 4-bit. Step-by-step guide: openthai.aieat.or.th/ollama
Highlights
- Advanced Thai language model with 72 billion parameters
- Strong reasoning capabilities in both Thai and English
- Improved performance over previous OpenThaiGPT versions
- Balanced capabilities across mathematical, coding, and general language tasks
- Enhanced understanding of Thai language and cultural context
Benchmark Results
| Benchmarks | OpenThaiGPT 1.6 72b | OpenThaiGPT 1.5 7b | OpenThaiGPT 1.5 14b | OpenThaiGPT 1.5 72b | Typhoon2 Qwen2.5 7b | Typhoon2 Llama3.1 8b | Typhoon2 Llama3.1 70b | NECTEC Pathumma LLM Text 1.0.0 7b |
|---|---|---|---|---|---|---|---|---|
| AIME24-TH | 6.67 | 0 | 0 | 6.67 | 3.33 | 3.33 | 13.33 | 0 |
| AIME24 | 23.33 | 6.67 | 10 | 23.33 | 6.67 | 3.33 | 10 | 0 |
| MATH500-TH | 43.2 | 24.2 | 26.2 | 62 | 51.8 | 31 | 55.8 | 21.8 |
| MATH500 | 82 | 40.4 | 47.4 | 83.2 | 65.4 | 49.6 | 67.4 | 42.8 |
| LiveCodeBench-TH | 32.43 | 22.52 | 21.62 | 12.61 | 9.91 | 8.11 | 27.03 | 0 |
| LiveCodeBench | 54.21 | 31.12 | 37.96 | 46.38 | 0.98 | 5.87 | 37.38 | 0 |
| OpenThaiEval | 78.7 | 64.5 | 71.26 | 77.16 | 64.76 | 56.63 | 72.54 | 65.27 |
| Language Accuracy | 98.2 | 97.6 | 98.4 | 99.4 | 99.4 | 98.6 | 99.8 | 98.6 |
| AVERAGE | 52.34 | 35.88 | 39.11 | 51.34 | 37.78 | 32.06 | 47.91 | 28.56 |
Recommended System Prompt
<No system prompt>
Model Technical Report
https://arxiv.org/abs/2504.01789
If OpenThaiGPT has been beneficial for your work, kindly consider citing it as follows:
@misc{yuenyong2025openthaigpt16r1thaicentric,
title={OpenThaiGPT 1.6 and R1: Thai-Centric Open Source and Reasoning Large Language Models},
author={Sumeth Yuenyong and Thodsaporn Chay-intr and Kobkrit Viriyayudhakorn},
year={2025},
eprint={2504.01789},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2504.01789},
}
How to use
Online Web Interface
Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "openthaigpt/openthaigpt-1.6-72b"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
prompt = "ΰΈΰΈ£ΰΈΈΰΈΰΉΰΈΰΈΰΈ‘ΰΈ«ΰΈ²ΰΈΰΈΰΈ£ΰΈΰΈ·ΰΈΰΈΰΈ°ΰΉΰΈ£"
messages = [
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(
**model_inputs,
max_new_tokens=16384,
temperature=0.6
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
vLLM
Install VLLM (https://github.com/vllm-project/vllm)
Run server
vllm serve openthaigpt/openthaigpt-1.6-72b --tensor-parallel-size 2
- Note, change
--tensor-parallel-size 2to the amount of available GPU cards.
- Run inference (CURL example)
curl -X POST 'http://127.0.0.1:8000/v1/chat/completions' \
-H 'Content-Type: application/json' \
-d '{
"model": "openthaigpt/openthaigpt-1.6-72b",
"messages": [
{
"role": "user",
"content": "ΰΈΰΈ£ΰΈΈΰΈΰΉΰΈΰΈΰΈ‘ΰΈ«ΰΈ²ΰΈΰΈΰΈ£ΰΈΰΈ·ΰΈΰΈΰΈ°ΰΉΰΈ£"
}
],
"max_tokens": 16384,
"temperature": 0.6,
"top_p": 0.95,
"top_k": 40
}'
GPU Memory Requirements
| Number of Parameters | FP 16 bits | 8 bits (Quantized) | 4 bits (Quantized) |
|---|---|---|---|
| 72b | 144 GB | 72 GB | 36 GB |
Chat Template
{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}\n {%- endif %}\n {{- \"\\n\\n# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0]['role'] == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0]['content'] + '<|im_end|>\\n' }}\n {%- else %}\n {{- '<|im_start|>system\\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) or (message.role == \"assistant\" and not message.tool_calls) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + message.content }}\n {%- endif %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '\\n<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n
Key Improvements in OpenThaiGPT 1.6 72b
Compared to OpenThaiGPT 1.5 72b, the 1.6 version shows:
- Significantly better code reasoning performance in both Thai (LiveCodeBench-TH: 32.43 vs 12.61) and English (LiveCodeBench: 54.21 vs 46.38)
- Comparable general language understanding with a high language accuracy of 98.2%
- Better balanced capabilities across mathematical and coding tasks
This model maintains strong performance in general language tasks while improving specialized capabilities, making it suitable for a wide range of applications.
Licenses
- This model is available for Research and Commercial uses under the specified terms. Please see the LICENSE file for more information.
Supports
- Official website: https://openthai.aieat.or.th
- Facebook page: https://web.facebook.com/groups/openthaigpt
- A Discord server for discussion and support here
- E-mail: kobkrit@iapp.co.th
OpenThaiGPT Team
- Kobkrit Viriyayudhakorn (kobkrit@iapp.co.th / kobkrit@aieat.or.th)
- Sumeth Yuenyong (sumeth.yue@mahidol.edu)
- Thodsaporn Chay-intr (thodsaporn@iapp.co.th)
Sponsors
ΰΉΰΈΰΉΰΈ£ΰΈ±ΰΈΰΈΰΈ²ΰΈ£ΰΈͺΰΈΰΈ±ΰΈΰΈͺΰΈΰΈΈΰΈ GPU Nvidia H100 x 8 ΰΉΰΈ ΰΈΰΈ²ΰΈΰΈΰΈ£ΰΈ΄ΰΈ©ΰΈ±ΰΈ ΰΈͺΰΈ’ΰΈ²ΰΈ‘ ΰΉΰΈΰΉΰΈ ΰΈΰΈΰΈ£ΰΉΰΉΰΈΰΈΰΉΰΈ£ΰΈΰΈ±ΰΉΰΈ ΰΈΰΈ³ΰΈΰΈ±ΰΈ: https://siam.ai/
ΰΉΰΈΰΉΰΈ£ΰΈ±ΰΈΰΈΰΈΈΰΈΰΈ§ΰΈ΄ΰΈΰΈ±ΰΈ’ΰΈͺΰΈΰΈ±ΰΈΰΈͺΰΈΰΈΈΰΈΰΈΰΈ²ΰΈΰΈΰΈΰΈΰΈΰΈΈΰΈΰΈͺΰΉΰΈΰΉΰΈͺΰΈ£ΰΈ΄ΰΈ‘ΰΈ§ΰΈ΄ΰΈΰΈ’ΰΈ²ΰΈ¨ΰΈ²ΰΈͺΰΈΰΈ£ΰΉ ΰΈ§ΰΈ΄ΰΈΰΈ±ΰΈ’ΰΉΰΈ₯ΰΈ°ΰΈΰΈ§ΰΈ±ΰΈΰΈΰΈ£ΰΈ£ΰΈ‘ ΰΉΰΈΰΈ’ΰΈ«ΰΈΰΉΰΈ§ΰΈ’ΰΈΰΈ£ΰΈ΄ΰΈ«ΰΈ²ΰΈ£ΰΉΰΈ₯ΰΈ°ΰΈΰΈ±ΰΈΰΈΰΈ²ΰΈ£ΰΈΰΈΈΰΈΰΈΰΉΰΈ²ΰΈΰΈΰΈ²ΰΈ£ΰΉΰΈΰΈ΄ΰΉΰΈ‘ΰΈΰΈ§ΰΈ²ΰΈ‘ΰΈͺΰΈ²ΰΈ‘ΰΈ²ΰΈ£ΰΈΰΉΰΈΰΈΰΈ²ΰΈ£ΰΉΰΈΰΉΰΈΰΈΰΈ±ΰΈΰΈΰΈΰΈΰΈΰΈ£ΰΈ°ΰΉΰΈΰΈ¨ (ΰΈΰΈΰΈ.) ΰΈ£ΰΉΰΈ§ΰΈ‘ΰΈΰΈ±ΰΈ ΰΈΰΈ£ΰΈ΄ΰΈ©ΰΈ±ΰΈ ΰΉΰΈΰΉΰΈΰΈΰΈΰΉΰΉΰΈΰΈΰΉΰΈΰΉΰΈ₯ΰΈ’ΰΈ΅ ΰΈΰΈ³ΰΈΰΈ±ΰΈ ΰΈΰΈΆΰΉΰΈΰΈ‘ΰΈ΅ ΰΈͺΰΈ‘ΰΈ²ΰΈΰΈ‘ΰΈΰΈΉΰΉΰΈΰΈ£ΰΈ°ΰΈΰΈΰΈΰΈΰΈ²ΰΈ£ΰΈΰΈ±ΰΈΰΈΰΈ²ΰΈΰΈ£ΰΈ°ΰΈΰΈ΄ΰΈ©ΰΈΰΉΰΈΰΈ£ΰΈ°ΰΉΰΈΰΈ¨ΰΉΰΈΰΈ’ ΰΉΰΈΰΉΰΈΰΈΰΈΉΰΉΰΈΰΈ³ΰΉΰΈΰΈ΄ΰΈΰΈΰΈ²ΰΈΰΉΰΈΰΈ£ΰΈΰΈΰΈ²ΰΈ£
Disclaimer: Provided responses are not guaranteed.
- Downloads last month
- 99
Model tree for openthaigpt/openthaigpt-1.6-72b-instruct
Collections including openthaigpt/openthaigpt-1.6-72b-instruct
Paper for openthaigpt/openthaigpt-1.6-72b-instruct
Evaluation results
- OpenThaiGPT on SkyThoughtπΉπ OpenThaiGPT Benchmark78.700
- AIME24 on SkyThoughtπΉπ OpenThaiGPT Benchmark23.330
