Views
No views yet
[!NOTE] 🚀 2025-02-01 Update: We have released a new version of Typhoon T1 3B (Research Preview) with the ability to 🇹🇭 generate Thai reasoning traces, improved Thai performance in general, and enhanced instruction following. This version has the a comparative level of English performance tov2025-01-23.
v2025-02-01 is the first reasoning model where we intentionally equipped the model with the ability to generate Thai reasoning traces, improving transparency and interpretability of the model.llama-3.2 in the model name.| Model name | GSM8K (↑), 8-shot | HumanEval+ (↑), Pass@10 | GPQA (↑), 0CoT | AIME (↑) |
|---|---|---|---|---|
| Typhoon 2 3B Instruct | 56.63 | 66 | 27.01 | 0 |
| Typhoon T1 3B (semi) | 59.59 | 68.99 | 25.89 | 0 |
| Typhoon T1 3B (Research Preview) v2025-01-23 | 62.40 | 69.87 | 31.7 | 2.22 |
| Model name | Average | Math | Health | Physics | Business | Biology | Chemistry | Computer Science | Economics | Engineering | Philosophy | Other | History | Psychology | Law |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Typhoon 2 3B Instruct | 26.7 | 26.8 | 33.62 | 23.4 | 25.35 | 43.38 | 19.88 | 28.29 | 35.43 | 18.37 | 28.06 | 27.92 | 25.72 | 37.84 | 13.17 |
| Typhoon T1 3B (Research Preview) v2025-01-23 | 30.65 | 30.57 | 36.19 | 27.1 | 31.69 | 50.77 | 22.17 | 31.22 | 38.86 | 21.98 | 30.66 | 32.79 | 26.51 | 43.36 | 17.26 |
transformers 4.46.1 or newer.max_new_tokens should be at least 512, but is recommended at a minimum of 1,024 to provide space for complete generation.1from transformers import AutoTokenizer, AutoModelForCausalLM
2import torch
3
4model_id = "scb10x/llama-3.2-typhoon-t1-3b-research-preview"
5revision = "main" # To use the previous version comment this line
6# revision = "v2025-01-23" # To use the previous version uncomment this line
7
8tokenizer = AutoTokenizer.from_pretrained(model_id, revision=revision)
9model = AutoModelForCausalLM.from_pretrained(
10 model_id,
11 torch_dtype=torch.bfloat16,
12 device_map="auto",
13 revision=revision
14)
15
16messages = [
17 {"role": "user", "content": "หากแปลคำว่า \"ไต้ฝุ่น\" เป็นภาษาอังกฤษ ในคำที่ถูกแปลแล้วจะมีตัวอักษร \"o\" ทั้งหมดกี่ตัว"},
18]
19
20input_ids = tokenizer.apply_chat_template(
21 messages,
22 add_generation_prompt=True,
23 return_tensors="pt"
24).to(model.device)
25
26terminators = [
27 tokenizer.eos_token_id,
28 tokenizer.convert_tokens_to_ids("<|eot_id|>")
29]
30
31outputs = model.generate(
32 input_ids,
33 max_new_tokens=1024,
34 eos_token_id=terminators,
35 do_sample=False,
36 temperature=0.0,
37 top_p=0.9,
38)
39response = outputs[0][input_ids.shape[-1]:]
40print(tokenizer.decode(response, skip_special_tokens=True))1pip install vllm
2vllm serve scb10x/llama-3.2-typhoon-t1-3b-research-preview
3
4# To serve the previous version, add the revision parameter as shown below
5# vllm serve scb10x/llama-3.2-typhoon-t1-3b-research-preview --revision v2025-01-23
6# see more information at https://docs.vllm.ai/@misc{taveekitworachai2025typhoont1openthai,
title={Typhoon T1: An Open Thai Reasoning Model},
author={Pittawat Taveekitworachai and Potsawee Manakul and Kasima Tharnpipitchai and Kunat Pipatanakul},
year={2025},
eprint={2502.09042},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2502.09042},
}