Model reference · open weights
llama3.1-typhoon2 is an open-weight language model from typhoon-ai. llama3.1-typhoon2-8b-instruct (BF16) weighs 16.1 GB; the smallest configuration that runs it is 2× RTX 3060 12 GB.
For self-hosting, compare this build's requirements below with the GPU you plan to rent.
Summary of the typhoon-ai/llama3.1-typhoon2-8b-instruct model card, 2026-10-01
What it is
| Released by | typhoon-ai |
|---|---|
| Released | 2024-12-15 |
| Parameters | 8.0B |
| VRAM | 16.1 GB for the weights |
What it runs on
| Card | Requests at once | Context max | Memory | |
|---|---|---|---|---|
| 8K each | 32K each | |||
| RTX 3060 12 GB … RTX 4060 Ti 16 GB 2 smaller cards | ||||
| RTX 3090 24 GB | 6 | 1 | 49K | 23.4 GB |
| RTX 4090 24 GB | 6 | 1 | 48K | 23.4 GB |
| RTX 5090 32 GB | 13 | 3 | 105K | 31.0 GB |
| L40S 48 GB | 25 | 6 | all 128K | 44.0 GB |
| A100 80 GB | 57 | 14 | all 128K | 78.2 GB |
| H100 80 GB | 53 | 13 | all 128K | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | 67 | 16 | all 128K | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | 80 | 20 | all 128K | 107 GB |
| H200 141 GB | 109 | 27 | all 128K | 138 GB |
| B200 180 GB | 143 | 35 | all 128K | 176 GB |
| 2× RTX 3060 12 GB tensor parallel | 5 | 1 | 42K | 11.6 GB a card |
| 2× RTX 4060 Ti 16 GB tensor parallel | 12 | 3 | 98K | 15.4 GB a card |
| 2× RTX 4090 24 GB tensor parallel | 27 | 6 | all 128K | 23.4 GB a card |
| 2× RTX 3090 24 GB tensor parallel | 27 | 6 | all 128K | 23.4 GB a card |
| Requests at once | 8K tokens each | 32K tokens each |
|---|---|---|
| 1 | 17.9 GB | 21.1 GB |
| 5 | 22.2 GB | 38.3 GB |
| 8 | 25.4 GB | 51.2 GB |
| 16 | 34.0 GB | 85.5 GB |
| 32 | 51.2 GB | 154 GB |
| 64 | 85.5 GB | 292 GB |
One card, with vLLM's small-card settings.
From the model card
Llama3.1-Typhoon2-8B: Thai Large Language Model (Instruct)
Llama3.1-Typhoon2-8B-instruct is a instruct Thai 🇹🇭 large language model with 8 billion parameters, and it is based on Llama3.1-8B.
For technical-report. please see our arxiv. *To acknowledge Meta's effort in creating the foundation model and to comply with the license, we explicitly include "llama-3.1" in the model name.
Instruction-Following & Function Call Performance
Specific Domain Performance (Math & Coding)
Long Context Performance
Detail Performance
| Model | IFEval - TH | IFEval - EN | MT-Bench TH | MT-Bench EN | Thai Code-Switching(t=0.7) | Thai Code-Switching(t=1.0) | FunctionCall-TH | FunctionCall-EN | GSM8K-TH | GSM8K-EN | MATH-TH | MATH-EN | HumanEval-TH | HumanEval-EN | MBPP-TH | MBPP-EN |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Llama3.1 8B Instruct | 58.04% | 77.64% | 5.109 | 8.118 | 93% | 11.2% | 36.92% | 66.06% | 45.18% | 62.4% | 24.42% | 48% | 51.8% | 67.7% | 64.6% | 66.9% |
| Typhoon2 Llama3 8B Instruct | 72.60% | 76.43% | 5.7417 | 7.584 | 98.8% | 98% | 75.12% | 79.08% | 71.72% | 81.0% | 38.48% | 49.04% | 58.5% | 68.9% | 60.8% | 63.0% |
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "scb10x/llama3.1-typhoon2-8b-instruct"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
messages = [
{"role": "system", "content": "You are a male AI assistant named Typhoon created by SCB 10X to be helpful, harmless, and honest. Typhoon is happy to help with analysis, question answering, math, coding, creative writing, teaching, role-play, general discussion, and all sorts of other tasks. Typhoon responds directly to all human messages without unnecessary affirmations or filler phrases like “Certainly!”, “Of course!”, “Absolutely!”, “Great!”, “Sure!”, etc. Specifically, Typhoon avoids starting responses with the word “Certainly” in any way. Typhoon follows this information in all languages, and always responds to the user in the language they use or request. Typhoon is now being connected with a human. Write in fluid, conversational prose, Show genuine interest in understanding requests, Express appropriate emotions and empathy. Also showing information in term that is easy to understand and visualized."},
{"role": "user", "content": "ขอสูตรไก่ย่าง"},
]
input_ids = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt"
).to(model.device)
terminators = [
tokenizer.eos_token_id,
tokenizer.convert_tokens_to_ids("")
]
outputs = model.generate(
input_ids,
max_new_tokens=512,
eos_token_id=terminators,
do_sample=True,
temperature=0.7,
top_p=0.95,
)
response = outputs[0][input_ids.shape[-1]:]
print(tokenizer.decode(response, skip_special_tokens=True))
pip install vllm
vllm serve scb10x/llama3.1-typhoon2-8b-instruct
# see more information at https://docs.vllm.ai/
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
import ast
model_name = "scb10x/llama3.1-typhoon2-8b-instruct"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name, torch_dtype=torch.bfloat16, device_map='auto'
)
get_weather_api = {
"name": "get_weather",
"description": "Get the current weather for a location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, New York",
},
"unit": {
"type": "string",
"enum": ["celsius", "fahrenheit"],
"description": "The unit of temperature to return",
},
},
"required": ["location"],
},
}
search_api = {
"name": "search",
"description": "Search for information on the internet",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "The search query, e.g. 'latest news on AI'",
}
},
"required": ["query"],
},
}
get_stock = {
"name": "get_stock_price",
"description": "Get the stock price",
"parameters": {
"type": "object",
"properties": {
"symbol": {
"type": "string",
"description": "The stock symbol, e.g. AAPL, GOOG",
}
},
"required": ["symbol"],
},
}
# Tool input are same format with OpenAI tools
openai_format_tools = [get_weather_api, search_api, get_stock]
messages = [
{"role": "system", "content": "You are an expert in composing functions."},
{"role": "user", "content": "ขอราคาหุ้น Tasla (TLS) และ Amazon (AMZ) ?"},
]
inputs = Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.