Openthaigpt R1 32b Instruct
模型概述
先進的320億參數泰語推理模型,專為泰語和英語的複雜推理任務優化,包括數學、邏輯和代碼推理。
模型特點
頂尖的泰語推理能力
在數學和邏輯推理任務中超越更大規模的模型,如DeepSeek R1 70b和Typhoon R1 70b
顯式推理過程
能夠展示逐步的思考過程,增強推理的可解釋性
高效模型體積
僅32b參數規模,性能卻優於70b模型,資源效率更高
泰語優化
專門針對泰語推理任務優化,包括複雜的數學和邏輯問題
模型能力
泰語文本生成
英語文本生成
數學推理
邏輯推理
代碼推理
使用案例
教育
數學問題解答
解決泰語數學問題,如計算圓形面積
在MATH500-TH數據集上達到83.8的準確率
編程
代碼生成與理解
生成和理解泰語和英語代碼
在LiveCodeBench-TH上達到62.16的準確率
邏輯推理
複雜邏輯問題解決
處理需要多步推理的邏輯問題
在AIME24-TH上達到56.67的準確率
🚀 🇹🇭 OpenThaiGPT R1 32b
🇹🇭 OpenThaiGPT R1 32b 是一款先進的 320 億參數泰語推理模型。儘管其規模不到 DeepSeek R1 70b 和 Typhoon R1 70b 等大模型的一半,但在性能上卻更勝一籌。該模型在複雜推理任務中表現出色,能夠處理泰語環境下的數學、邏輯和代碼推理問題。
🚀 快速開始
在線網頁界面
你可以通過 此鏈接 訪問在線網頁界面使用該模型。
Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "openthaigpt/openthaigpt-r1-32b-instruct"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
prompt = "จงหาพื้นที่ของวงกลมที่มีรัศมี 7 หน่วย"
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
- 安裝 VLLM(安裝鏈接)。
- 運行服務器:
vllm serve openthaigpt/openthaigpt-r1-32b --tensor-parallel-size 2
- 注意:將
--tensor-parallel-size 2
更改為可用的 GPU 卡數量。
- 運行推理(CURL 示例):
curl -X POST 'http://127.0.0.1:8000/v1/chat/completions' \
-H 'Content-Type: application/json' \
-d '{
"model": "openthaigpt/openthaigpt-r1-32b-instruct",
"messages": [
{
"role": "user",
"content": "จงหาพื้นที่ของวงกลมที่มีรัศมี 7 หน่วย"
}
],
"max_tokens": 16384,
"temperature": 0.6,
"top_p": 0.95,
"top_k": 40
}'
✨ 主要特性
- 最先進的泰語推理模型:在數學和邏輯推理任務上超越了更大規模的模型。
- 顯式推理能力:能夠展示逐步的思維過程。
- 顯著的小模型優勢:參數規模僅 320 億,卻能勝過 700 億參數的模型。
- 專注泰語推理:擅長處理複雜的數學和邏輯問題。
- 代碼推理高性能:在泰語和英語代碼推理方面均表現出色。
📊 基準測試結果
SkyThought | OpenThaiGPT R1 32b | DeepSeek R1 70b | Typhoon R1 Distill 70b |
---|---|---|---|
AIME24 - TH | 56.67 | 33.33 | 53.33 |
AIME24 | 63.36 | 53.33 | 53.33 |
MATH500 - TH | 83.8 | 75.4 | 81 |
MATH500 | 89.4 | 88.88 | 90.2 |
LiveCodeBench - TH | 62.16 | 53.15 | 47.75 |
LiveCodeBench | 69.67 | 64.97 | 54.79 |
OpenThaiEval | 76.05 | 74.17 | 77.59 |
AVERAGE | 71.58 | 63.31 | 65.42 |
📦 安裝指南
GPU 內存要求
參數數量 | FP 16 位 | 8 位(量化) | 4 位(量化) |
---|---|---|---|
32b | 64 GB | 32 GB | 16 GB |
📚 詳細文檔
推薦系統提示
<No system prompt>
模型技術報告
你可以通過 此鏈接 查看模型技術報告。
引用方式
如果你在工作中使用了 OpenThaiGPT,請考慮按以下方式引用:
@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},
}
聊天模板
{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% set ns = namespace(is_first=false, is_tool=false, is_output_first=true, system_prompt='') %}{%- for message in messages %}{%- if message['role'] == 'system' %}{% set ns.system_prompt = message['content'] %}{%- endif %}{%- endfor %}{{bos_token}}{{ns.system_prompt}}{%- for message in messages %}{%- if message['role'] == 'user' %}{%- set ns.is_tool = false -%}{{'<|User|>' + message['content']}}{%- endif %}{%- if message['role'] == 'assistant' and message['content'] is none %}{%- set ns.is_tool = false -%}{%- for tool in message['tool_calls']%}{%- if not ns.is_first %}{{'<|Assistant|><|tool▁calls▁begin|><|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\\n' + '```json' + '\\n' + tool['function']['arguments'] + '\\n' + '```' + '<|tool▁call▁end|>'}}{%- set ns.is_first = true -%}{%- else %}{{'\\n' + '<|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\\n' + '```json' + '\\n' + tool['function']['arguments'] + '\\n' + '```' + '<|tool▁call▁end|>'}}{{'<|tool▁calls▁end|><|end▁of▁sentence|>'}}{%- endif %}{%- endfor %}{%- endif %}{%- if message['role'] == 'assistant' and message['content'] is not none %}{%- if ns.is_tool %}{{'<|tool▁outputs▁end|>' + message['content'] + '<|end▁of▁sentence|>'}}{%- set ns.is_tool = false -%}{%- else %}{% set content = message['content'] %}{% if '</think>' in content %}{% set content = content.split('</think>')[-1] %}{% endif %}{{'<|Assistant|>' + content + '<|end▁of▁sentence|>'}}{%- endif %}{%- endif %}{%- if message['role'] == 'tool' %}{%- set ns.is_tool = true -%}{%- if ns.is_output_first %}{{'<|tool▁outputs▁begin|><|tool▁output▁begin|>' + message['content'] + '<|tool▁output▁end|>'}}{%- set ns.is_output_first = false %}{%- else %}{{'\\n<|tool▁output▁begin|>' + message['content'] + '<|tool▁output▁end|>'}}{%- endif %}{%- endif %}{%- endfor -%}{% if ns.is_tool %}{{'<|tool▁outputs▁end|>'}}{% endif %}{% if add_generation_prompt and not ns.is_tool %}{{'<|Assistant|>'}}{% endif %}
📄 許可證
本模型可在指定條款下用於 研究 和 商業用途。更多信息請查看 LICENSE 文件。
👨💻 支持與反饋
- 官方網站:https://openthaigpt.aieat.or.th
- Facebook 頁面:https://web.facebook.com/groups/openthaigpt
- Discord 服務器:點擊加入
- 郵箱:kobkrit@iapp.co.th
OpenThaiGPT 團隊
- Kobkrit Viriyayudhakorn (kobkrit@iapp.co.th / kobkrit@aieat.or.th)
- Sumeth Yuenyong (sumeth.yue@mahidol.edu)
- Thodsaporn Chay - intr (thodsaporn@iapp.co.th)
贊助商
- 獲得了暹羅 AI 有限公司提供的 8 塊 Nvidia H100 GPU 支持:https://siam.ai/
- 獲得了國家競爭力提升基金管理辦公室與 iApp Technology Co., Ltd. 聯合提供的研究資助,由泰國發明企業家協會負責項目實施。
免責聲明:不保證所提供的回覆一定準確。
Phi 2 GGUF
其他
Phi-2是微軟開發的一個小型但強大的語言模型,具有27億參數,專注於高效推理和高質量文本生成。
大型語言模型 支持多種語言
P
TheBloke
41.5M
205
Roberta Large
MIT
基於掩碼語言建模目標預訓練的大型英語語言模型,採用改進的BERT訓練方法
大型語言模型 英語
R
FacebookAI
19.4M
212
Distilbert Base Uncased
Apache-2.0
DistilBERT是BERT基礎模型的蒸餾版本,在保持相近性能的同時更輕量高效,適用於序列分類、標記分類等自然語言處理任務。
大型語言模型 英語
D
distilbert
11.1M
669
Llama 3.1 8B Instruct GGUF
Meta Llama 3.1 8B Instruct 是一個多語言大語言模型,針對多語言對話用例進行了優化,在常見的行業基準測試中表現優異。
大型語言模型 英語
L
modularai
9.7M
4
Xlm Roberta Base
MIT
XLM-RoBERTa是基於100種語言的2.5TB過濾CommonCrawl數據預訓練的多語言模型,採用掩碼語言建模目標進行訓練。
大型語言模型 支持多種語言
X
FacebookAI
9.6M
664
Roberta Base
MIT
基於Transformer架構的英語預訓練模型,通過掩碼語言建模目標在海量文本上訓練,支持文本特徵提取和下游任務微調
大型語言模型 英語
R
FacebookAI
9.3M
488
Opt 125m
其他
OPT是由Meta AI發佈的開放預訓練Transformer語言模型套件,參數量從1.25億到1750億,旨在對標GPT-3系列性能,同時促進大規模語言模型的開放研究。
大型語言模型 英語
O
facebook
6.3M
198
1
基於transformers庫的預訓練模型,適用於多種NLP任務
大型語言模型
Transformers

1
unslothai
6.2M
1
Llama 3.1 8B Instruct
Llama 3.1是Meta推出的多語言大語言模型系列,包含8B、70B和405B參數規模,支持8種語言和代碼生成,優化了多語言對話場景。
大型語言模型
Transformers 支持多種語言

L
meta-llama
5.7M
3,898
T5 Base
Apache-2.0
T5基礎版是由Google開發的文本到文本轉換Transformer模型,參數規模2.2億,支持多語言NLP任務。
大型語言模型 支持多種語言
T
google-t5
5.4M
702
精選推薦AI模型
Llama 3 Typhoon V1.5x 8b Instruct
專為泰語設計的80億參數指令模型,性能媲美GPT-3.5-turbo,優化了應用場景、檢索增強生成、受限生成和推理任務
大型語言模型
Transformers 支持多種語言

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-Tiny是一個基於SODA數據集訓練的超小型對話模型,專為邊緣設備推理設計,體積僅為Cosmo-3B模型的2%左右。
對話系統
Transformers 英語

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
基於RoBERTa架構的中文抽取式問答模型,適用於從給定文本中提取答案的任務。
問答系統 中文
R
uer
2,694
98