Views
No views yet
transformers or vLLM that support AWQ quantization for the exaone4 architecture.1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_id = "lesj0610/EXAONE-4.0.1-32B-AWQ"
4tokenizer = AutoTokenizer.from_pretrained(model_id)
5model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")vllm serve lesj0610/EXAONE-4.0.1-32B-AWQ --quantization awqexaone4 implementation.
4.54.0.1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "LGAI-EXAONE/EXAONE-4.0.1-32B"
4
5model = AutoModelForCausalLM.from_pretrained(
6 model_name,
7 torch_dtype="bfloat16",
8 device_map="auto"
9)
10tokenizer = AutoTokenizer.from_pretrained(model_name)
11
12# choose your prompt
13prompt = "Explain how wonderful you are"
14prompt = "Explica lo increíble que eres"
15prompt = "너가 얼마나 대단한지 설명해 봐"
16
17messages = [
18 {"role": "user", "content": prompt}
19]
20input_ids = tokenizer.apply_chat_template(
21 messages,
22 tokenize=True,
23 add_generation_prompt=True,
24 return_tensors="pt"
25)
26
27output = model.generate(
28 input_ids.to(model.device),
29 max_new_tokens=128,
30 do_sample=False,
31)
32print(tokenizer.decode(output[0]))enable_thinking=True argument with the tokenizer, which opens a reasoning block that starts with <think> tag without closing it.1messages = [
2 {"role": "user", "content": "Which one is bigger, 3.12 vs 3.9?"}
3]
4input_ids = tokenizer.apply_chat_template(
5 messages,
6 tokenize=True,
7 add_generation_prompt=True,
8 return_tensors="pt",
9 enable_thinking=True,
10)
11
12output = model.generate(
13 input_ids.to(model.device),
14 max_new_tokens=128,
15 do_sample=True,
16 temperature=0.6,
17 top_p=0.95
18)
19print(tokenizer.decode(output[0]))[!IMPORTANT] The model generation with reasoning mode can be affected sensitively by sampling parameters, so please refer to the Usage Guideline for better quality.
1import random
2
3def roll_dice(max_num: int):
4 return random.randint(1, max_num)
5
6tools = [
7 {
8 "type": "function",
9 "function": {
10 "name": "roll_dice",
11 "description": "Roll a dice with the number 1 to N. User can select the number N.",
12 "parameters": {
13 "type": "object",
14 "required": ["max_num"],
15 "properties": {
16 "max_num": {
17 "type": "int",
18 "description": "Max number of the dice"
19 }
20 }
21 }
22 }
23 }
24]
25
26messages = [
27 {"role": "user", "content": "Roll D6 dice twice!"}
28]
29input_ids = tokenizer.apply_chat_template(
30 messages,
31 tokenize=True,
32 add_generation_prompt=True,
33 return_tensors="pt",
34 tools=tools,
35)
36
37output = model.generate(
38 input_ids.to(model.device),
39 max_new_tokens=1024,
40 do_sample=True,
41 temperature=0.6,
42 top_p=0.95,
43)
44print(tokenizer.decode(output[0]))git clone https://github.com/NVIDIA/TensorRT-LLM.git1# extra_llm_api_config.yaml
2kv_cache_config:
3 enable_block_reuse: falsetrtllm-serve serve LGAI-EXAONE/EXAONE-4.0.1-32B --backend pytorch --extra_llm_api_options extra_llm_api_config.yaml0.10.0. You can run the vLLM server by following command:vllm serve LGAI-EXAONE/EXAONE-4.0.1-32B --enable-auto-tool-choice --tool-call-parser hermes --reasoning-parser deepseek_r1[!NOTE] Other inference engines includingsglangdon't support the EXAONE 4.0 officially now. We will update as soon as these libraries are updated.
| EXAONE 4.0.1 32B | Phi 4 reasoning-plus | Magistral Small-2506 | Qwen 3 32B | Qwen 3 235B | DeepSeek R1-0528 | |
|---|---|---|---|---|---|---|
| Model Size | 32.0B | 14.7B | 23.6B | 32.8B | 235B | 671B |
| Hybrid Reasoning | ✅ | ✅ | ✅ | |||
| World Knowledge | ||||||
| MMLU-Pro | 81.8 | 76.0 | 73.4 | 80.0 | 83.0 | 85.0 |
| GPQA-Diamond | 74.3 | 68.9 | 68.2 | 68.4 | 71.1 | 81.0 |
| Math/Coding | ||||||
| AIME 2025 | 84.5 | 78.0 | 62.8 | 72.9 | 81.5 | 87.5 |
| LiveCodeBench v6 | 67.7 | 47.1 | 47.4 | 60.1 | 58.9 | 70.3 |
| Instruction Following | ||||||
| IFEval | 82.3 | 84.9 | 37.9 | 85.0 | 83.4 | 80.8 |
| Agentic Tool Use | ||||||
| BFCL-v3 | 60.7 | N/A | 40.4 | 70.3 | 70.8 | 64.7 |
| Tau-Bench (Airline) | 48.0 | N/A | 38.5 | 34.5 | 37.5 | 53.5 |
| Tau-Bench (Retail) | 65.4 | N/A | 10.2 | 55.2 | 58.3 | 63.9 |
| Multilinguality | ||||||
| KMMLU-Pro | 65.7 | 55.8 | 51.5 | 61.4 | 68.1 | 71.7 |
| KSM | 87.0 | 79.8 | 71.9 | 82.8 | 86.2 | 86.7 |
| MMMLU (ES) | 85.4 | 84.3 | 68.9 | 82.8 | 86.7 | 88.2 |
| EXAONE 4.0.1 32B | Phi 4 | Mistral-Small-2506 | Gemma3 27B | Qwen3 32B | Qwen3 235B | Llama-4-Maverick | DeepSeek V3-0324 | |
|---|---|---|---|---|---|---|---|---|
| Model Size | 32.0B | 14.7B | 24.0B | 27.4B | 32.8B | 235B | 402B | 671B |
| Hybrid Reasoning | ✅ | ✅ | ✅ | |||||
| World Knowledge | ||||||||
| MMLU-Pro | 77.4 | 70.4 | 69.1 | 67.5 | 74.4 | 77.4 | 80.5 | 81.2 |
| GPQA-Diamond | 61.6 | 56.1 | 46.1 | 42.4 | 54.6 | 62.9 | 69.8 | 68.4 |
| Math/Coding | ||||||||
| AIME 2025 | 36.3 | 17.8 | 30.2 | 23.8 | 20.2 | 24.7 | 18.0 | 50.0 |
| LiveCodeBench v6 | 43.3 | 27.4 | 26.9 | 29.7 | 28.0 | 31.4 | 32.7 | 44.0 |
| Instruction Following | ||||||||
| IFEval | 84.7 | 63.0 | 77.8 | 82.6 | 83.2 | 83.2 | 85.4 | 81.2 |
| Agentic Tool Use | ||||||||
| BFCL-v3 | 63.9 | N/A | 57.7 | N/A | 63.0 | 68.0 | 52.9 | 63.8 |
| Tau-Bench (Airline) | 18.5 | N/A | 36.1 | N/A | 16.0 | 27.0 | 38.0 | 40.5 |
| Tau-Bench (Retail) | 52.0 | N/A | 35.5 | N/A | 47.6 | 56.5 | 6.5 | 68.5 |
| Multilinguality | ||||||||
| KMMLU-Pro | 59.8 | 44.8 | 51.0 | 50.7 | 58.3 | 64.4 | 68.8 | 67.3 |
| KSM | 56.3 | 29.1 | 35.5 | 36.1 | 41.3 | 46.6 | 40.6 | 63.5 |
| MMMLU (ES) | 80.3 | 81.2 | 78.4 | 78.7 | 82.1 | 83.7 | 86.9 | 86.7 |
[!IMPORTANT] To achieve the expected performance, we recommend using the following configurations:
- For non-reasoning mode, we recommend using a lower temperature value such as
temperature<0.6for better performance.- For reasoning mode (using
<think>block), we recommend usingtemperature=0.6andtop_p=0.95.
- If you suffer from the model degeneration, we recommend using
presence_penalty=1.5.- For Korean general conversation with 1.2B model, we suggest to use
temperature=0.1to avoid code switching.
[!NOTE] The main difference from the older version is as below:
- We removed the claim of model output ownership from the license.
- We restrict the model use against the development of models that compete with EXAONE.
- We allow the model to be used for educational purposes, not just research.
@article{exaone-4.0,
title={EXAONE 4.0: Unified Large Language Models Integrating Non-reasoning and Reasoning Modes},
author={{LG AI Research}},
journal={arXiv preprint arXiv:2507.11407},
year={2025}
}