🇹🇭 OpenThaiGPT 72b Version 1.5 is an advanced 72-billion-parameter Thai language chat model based on Qwen v2.5 released on September 30, 2024. It has been specifically fine-tuned on over 2,000,000 Thai instruction pairs and is capable of answering Thai-specific domain questions.
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
Qwen License: Allow Research and Commercial uses but if your user base exceeds 100 million monthly active users, you need to negotiate a separate commercial license. Please see LICENSE file for more information.
OpenAI Client Library (Hosted by VLLM, please see below.)
python
1import openai
23# Configure OpenAI client to use vLLM server4openai.api_base ="http://127.0.0.1:8000/v1"5openai.api_key ="dummy"# vLLM doesn't require a real API key67prompt ="<|im_start|>system\nคุณคือผู้ช่วยตอบคำถามที่ฉลาดและซื่อสัตย์<|im_end|>\n<|im_start|>user\nกรุงเทพมหานครคืออะไร<|im_end|>\n<|im_start|>assistant\n"89try:10 response = openai.Completion.create(11 model=".",# Specify the model you're using with vLLM12 prompt=prompt,13 max_tokens=512,14 temperature=0.7,15 top_p=0.8,16 top_k=40,17 stop=["<|im_end|>"]18)19print("Generated Text:", response.choices[0].text)20except Exception as e:21print("Error:",str(e))
The current config.json is set for context length up to 32,768 tokens.
To handle extensive inputs exceeding 32,768 tokens, we utilize YaRN, a technique for enhancing model length extrapolation, ensuring optimal performance on lengthy texts.
For supported frameworks, you could add the following to config.json to enable YaRN:
The Tool Calling feature in OpenThaiGPT 1.5 enables users to efficiently call various functions through intelligent responses. This includes making external API calls to retrieve real-time data, such as current temperature information, or predicting future data simply by submitting a query.
For example, a user can ask OpenThaiGPT, “What is the current temperature in San Francisco?” and the AI will execute a pre-defined function to provide an immediate response without the need for additional coding.
This feature also allows for broader applications with external data sources, including the ability to call APIs for services such as weather updates, stock market information, or data from within the user’s own system.
Example:
python
1import openai
23defget_temperature(location, date=None, unit="celsius"):4"""Get temperature for a location (current or specific date)."""5if date:6return{"temperature":25.9,"location": location,"date": date,"unit": unit}7return{"temperature":26.1,"location": location,"unit": unit}89tools =[10{11"name":"get_temperature",12"description":"Get temperature for a location (current or by date).",13"parameters":{14"location":"string","date":"string (optional)","unit":"enum [celsius, fahrenheit]"15},16}17]1819messages =[{"role":"user","content":"อุณหภูมิที่ San Francisco วันนี้ีและพรุ้่งนี้คือเท่าไร่?"}]2021# Simulated response flow using OpenThaiGPT Tool Calling22response = openai.ChatCompletion.create(23 model=".", messages=messages, tools=tools, temperature=0.7, max_tokens=51224)2526print(response)
If OpenThaiGPT has been beneficial for your work, kindly consider citing it as follows:
Bibtex
bibtex
1@misc{yuenyong2024openthaigpt15thaicentricopen,
2 title={OpenThaiGPT 1.5: A Thai-Centric Open Source Large Language Model},
3 author={Sumeth Yuenyong and Kobkrit Viriyayudhakorn and Apivadee Piyatumrong and Jillaphat Jaroenkantasima},
4 year={2024},
5 eprint={2411.07238},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL},
8 url={https://arxiv.org/abs/2411.07238},
9}
APA Style (for TXT, MS Word)
Yuenyong, S., Viriyayudhakorn, K., Piyatumrong, A., & Jaroenkantasima, J. (2024). OpenThaiGPT 1.5: A Thai-Centric Open Source Large Language Model. arXiv [Cs.CL]. Retrieved from http://arxiv.org/abs/2411.07238
Disclaimer: Provided responses are not guaranteed.