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
智启未来,您的人工智能解决方案智库
简体中文