Instructions to use openthaigpt/openthaigpt-1.0.0-beta-7b-chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openthaigpt/openthaigpt-1.0.0-beta-7b-chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="openthaigpt/openthaigpt-1.0.0-beta-7b-chat")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("openthaigpt/openthaigpt-1.0.0-beta-7b-chat", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use openthaigpt/openthaigpt-1.0.0-beta-7b-chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "openthaigpt/openthaigpt-1.0.0-beta-7b-chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openthaigpt/openthaigpt-1.0.0-beta-7b-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/openthaigpt/openthaigpt-1.0.0-beta-7b-chat
- SGLang
How to use openthaigpt/openthaigpt-1.0.0-beta-7b-chat 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.0.0-beta-7b-chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openthaigpt/openthaigpt-1.0.0-beta-7b-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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.0.0-beta-7b-chat" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openthaigpt/openthaigpt-1.0.0-beta-7b-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use openthaigpt/openthaigpt-1.0.0-beta-7b-chat with Docker Model Runner:
docker model run hf.co/openthaigpt/openthaigpt-1.0.0-beta-7b-chat
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("openthaigpt/openthaigpt-1.0.0-beta-7b-chat", dtype="auto")πΉπ OpenThaiGPT 1.0.0-beta

πΉπ OpenThaiGPT Version 1.0.0-beta is a Thai language 7B-parameter LLaMA v2 Chat model finetuned to follow Thai translated instructions and extend more than 24,554 most popular Thai words vocabularies into LLM's dictionary for turbo speed.
---- Lora Adapter Format of OpenThaiGPT 1.0.0-beta ----
Upgrade from OpenThaiGPT 1.0.0-alpha
- Add more than 24,554 most popular Thai words vocabularies into LLM's dictionary and re-pretrain embedding layers which make it generate Thai text 10 times faster than previous version.
Pretrain Model
Support
- Official website: https://openthaigpt.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
License
Source Code: License Apache Software License 2.0.
Weight: Research and Commercial uses.
Code and Weight
Web Demo: https://demo-beta.openthaigpt.aieat.or.th/
Colab Demo: https://colab.research.google.com/drive/1NkmAJHItpqu34Tur9wCFc97A6JzKR8xo?usp=sharing
Finetune Code: https://github.com/OpenThaiGPT/openthaigpt-finetune-010beta
Inference Code: https://github.com/OpenThaiGPT/openthaigpt
Weight (Lora Adapter): https://huggingface.co/openthaigpt/openthaigpt-1.0.0-beta-7b-chat
Weight (Huggingface Checkpoint): https://huggingface.co/openthaigpt/openthaigpt-1.0.0-beta-7b-chat-ckpt-hf
Sponsors
Pantip.com, ThaiSC, Promes

Powered by
OpenThaiGPT Volunteers, Artificial Intelligence Entrepreneur Association of Thailand (AIEAT), and Artificial Intelligence Association of Thailand (AIAT)
Authors
- Kobkrit Viriyayudhakorn (kobkrit@aieat.or.th)
- Sumeth Yuenyong (sumeth.yue@mahidol.edu)
- Prachya Boonkwan (prachya.boonkwan@nectec.or.th, kaamanita@gmail.com)
- Thaweewat Rugsujarit (thaweewr@scg.com)
- Jillaphat Jaroenkantasima (autsadang41@gmail.com)
- Norapat Buppodom (new@norapat.com)
- Koravich Sangkaew (kwankoravich@gmail.com)
- Peerawat Rojratchadakorn (peerawat.roj@gmail.com)
- Surapon Nonesung (nonesungsurapon@gmail.com)
- Chanon Utupon (chanon.utupon@gmail.com)
- Sadhis Wongprayoon (sadhis.tae@gmail.com)
- Nucharee Thongthungwong (nuchhub@hotmail.com)
- Chawakorn Phiantham (mondcha1507@gmail.com)
- Patteera Triamamornwooth (patt.patteera@gmail.com)
- Nattarika Juntarapaoraya (natt.juntara@gmail.com)
- Kriangkrai Saetan (kraitan.ss21@gmail.com)
- Pitikorn Khlaisamniang (pitikorn32@gmail.com)
Disclaimer: Provided responses are not guaranteed.
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="openthaigpt/openthaigpt-1.0.0-beta-7b-chat")