File size: 19,739 Bytes
19c678e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 |
---
base_model: LGAI-EXAONE/EXAONE-4.0-32B
base_model_relation: finetune
license: other
license_name: exaone
license_link: LICENSE
language:
- en
- ko
- es
tags:
- lg-ai
- exaone
- exaone-4.0
pipeline_tag: text-generation
library_name: transformers
---
<p align="center">
<img src="assets/EXAONE_Symbol+BI_3d.png", width="300", style="margin: 40 auto;">
✈️ Try on <a href="https://friendli.ai/suite/~/serverless-endpoints/LGAI-EXAONE/EXAONE-4.0-32B/overview">FriendliAI</a>
<br><br><i>📢 EXAONE 4.0 is officially supported by HuggingFace transformers! Please check out the guide <a href="#quickstart">below</a></i>
<br>
# EXAONE-4.0.1-32B
*The version 4.0.1 is a patch version to reduce unintended or inappropriate responses.*
## Introduction
We introduce **EXAONE 4.0**, which integrates a **Non-reasoning mode** and **Reasoning mode** to achieve both the excellent usability of [EXAONE 3.5](https://github.com/LG-AI-EXAONE/EXAONE-3.5) and the advanced reasoning abilities of [EXAONE Deep](https://github.com/LG-AI-EXAONE/EXAONE-Deep). To pave the way for the agentic AI era, EXAONE 4.0 incorporates essential features such as agentic tool use, and its multilingual capabilities are extended
to support Spanish in addition to English and Korean.
The EXAONE 4.0 model series consists of two sizes: a mid-size **32B** model optimized for high performance, and a small-size **1.2B** model designed for on-device applications.
In the EXAONE 4.0 architecture, we apply new architectural changes compared to previous EXAONE models as below:
1. **Hybrid Attention**: For the 32B model, we adopt hybrid attention scheme, which combines *Local attention (sliding window attention)* with *Global attention (full attention)* in a 3:1 ratio. We do not use RoPE (Rotary Positional Embedding) for global attention for better global context understanding.
2. **QK-Reorder-Norm**: We reorder the LayerNorm position from the traditional Pre-LN scheme by applying LayerNorm directly to the attention and MLP outputs, and we add RMS normalization right after the Q and K projection. It helps yield better performance on downstream tasks despite consuming more computation.
For more details, please refer to our [technical report](https://arxiv.org/abs/2507.11407), [HuggingFace paper](https://huggingface.co/papers/2507.11407), [blog](https://www.lgresearch.ai/blog/view?seq=576), and [GitHub](https://github.com/LG-AI-EXAONE/EXAONE-4.0).
### Model Configuration
- Number of Parameters (without embeddings): 30.95B
- Number of Layers: 64
- Number of Attention Heads: GQA with 40-heads and 8-KV heads
- Vocab Size: 102,400
- Context Length: 131,072 tokens
## Quickstart
You should install the transformers library with version >= `4.54.0`.
### Non-reasoning mode
For general use, you can use the EXAONE 4.0 models with the following example:
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "LGAI-EXAONE/EXAONE-4.0.1-32B"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="bfloat16",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
# choose your prompt
prompt = "Explain how wonderful you are"
prompt = "Explica lo increíble que eres"
prompt = "너가 얼마나 대단한지 설명해 봐"
messages = [
{"role": "user", "content": prompt}
]
input_ids = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt"
)
output = model.generate(
input_ids.to(model.device),
max_new_tokens=128,
do_sample=False,
)
print(tokenizer.decode(output[0]))
```
### Reasoning mode
The EXAONE 4.0 models have reasoning capabilities for handling complex problems. You can activate reasoning mode by using the `enable_thinking=True` argument with the tokenizer, which opens a reasoning block that starts with `<think>` tag without closing it.
```python
messages = [
{"role": "user", "content": "Which one is bigger, 3.12 vs 3.9?"}
]
input_ids = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt",
enable_thinking=True,
)
output = model.generate(
input_ids.to(model.device),
max_new_tokens=128,
do_sample=True,
temperature=0.6,
top_p=0.95
)
print(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](#usage-guideline) for better quality.
### Agentic tool use
The EXAONE 4.0 models can be used as agents with their tool calling capabilities. You can provide tool schemas to the model for effective tool calling.
```python
import random
def roll_dice(max_num: int):
return random.randint(1, max_num)
tools = [
{
"type": "function",
"function": {
"name": "roll_dice",
"description": "Roll a dice with the number 1 to N. User can select the number N.",
"parameters": {
"type": "object",
"required": ["max_num"],
"properties": {
"max_num": {
"type": "int",
"description": "Max number of the dice"
}
}
}
}
}
]
messages = [
{"role": "user", "content": "Roll D6 dice twice!"}
]
input_ids = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt",
tools=tools,
)
output = model.generate(
input_ids.to(model.device),
max_new_tokens=1024,
do_sample=True,
temperature=0.6,
top_p=0.95,
)
print(tokenizer.decode(output[0]))
```
## Deployment
### TensorRT-LLM
TensorRT-LLM officially supports EXAONE 4.0 models in the latest commits. Before it is released, you need to clone the TensorRT-LLM repository to build from source.
```bash
git clone https://github.com/NVIDIA/TensorRT-LLM.git
```
After cloning the repository, you need to build the source for installation. Please refer to [the official documentation](https://nvidia.github.io/TensorRT-LLM/installation/build-from-source-linux.html) for a guide to build the TensorRT-LLM environment.
You can run the TensorRT-LLM server by following steps:
1. Write extra configuration YAML file
```yaml
# extra_llm_api_config.yaml
kv_cache_config:
enable_block_reuse: false
```
2. Run server with the configuration
```bash
trtllm-serve serve [MODEL_PATH] --backend pytorch --extra_llm_api_options extra_llm_api_config.yaml
```
For more details, please refer to [the documentation](https://github.com/NVIDIA/TensorRT-LLM/tree/main/examples/models/core/exaone) of EXAONE from TensorRT-LLM.
> [!NOTE]
> Other inference engines including `vllm` and `sglang` don't support the EXAONE 4.0 officially now. We will update as soon as these libraries are updated.
## Performance
The following tables show the evaluation results of each model, with reasoning and non-reasoning mode. The evaluation details can be found in the [technical report](https://arxiv.org/abs/2507.11407).
- ✅ denotes the model has a hybrid reasoning capability, evaluated by selecting reasoning / non-reasoning on the purpose.
- To assess Korean **practical** and **professional** knowledge, we adopt both the [KMMLU-Redux](https://huggingface.co/datasets/LGAI-EXAONE/KMMLU-Redux) and [KMMLU-Pro](https://huggingface.co/datasets/LGAI-EXAONE/KMMLU-Pro) benchmarks. Both datasets are publicly released!
### 32B Reasoning Mode
<table>
<tr>
<th> </th>
<th>EXAONE 4.0.1 32B </th>
<th>Phi 4 reasoning-plus</th>
<th>Magistral Small-2506</th>
<th>Qwen 3 32B </th>
<th>Qwen 3 235B </th>
<th>DeepSeek R1-0528</th>
</tr>
<tr>
<td align="center">Model Size</td>
<td align="center">32.0B</td>
<td align="center">14.7B</td>
<td align="center">23.6B</td>
<td align="center">32.8B</td>
<td align="center">235B</td>
<td align="center">671B</td>
</tr>
<tr>
<td align="center">Hybrid Reasoning</td>
<td align="center">✅</td>
<td align="center"> </td>
<td align="center"> </td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center"> </td>
</tr>
<tr>
<td align="center" colspan='7'><i>World Knowledge</i></td>
</tr>
<tr>
<td >MMLU-Pro</td>
<td align="center">81.8</td>
<td align="center">76.0</td>
<td align="center">73.4</td>
<td align="center">80.0</td>
<td align="center">83.0</td>
<td align="center">85.0</td>
</tr>
<tr>
<td >GPQA-Diamond</td>
<td align="center">74.3</td>
<td align="center">68.9</td>
<td align="center">68.2</td>
<td align="center">68.4</td>
<td align="center">71.1</td>
<td align="center">81.0</td>
</tr>
<tr>
<td align="center" colspan='7'><i>Math/Coding</i></td>
</tr>
<tr>
<td >AIME 2025</td>
<td align="center">84.5</td>
<td align="center">78.0</td>
<td align="center">62.8</td>
<td align="center">72.9</td>
<td align="center">81.5</td>
<td align="center">87.5</td>
</tr>
<tr>
<td >LiveCodeBench v6</td>
<td align="center">67.7</td>
<td align="center">47.1</td>
<td align="center">47.4</td>
<td align="center">60.1</td>
<td align="center">58.9</td>
<td align="center">70.3</td>
</tr>
<tr>
<td align="center" colspan='7'><i>Instruction Following</i></td>
</tr>
<tr>
<td >IFEval</td>
<td align="center">82.3</td>
<td align="center">84.9</td>
<td align="center">37.9</td>
<td align="center">85.0</td>
<td align="center">83.4</td>
<td align="center">80.8</td>
</tr>
<tr>
<td align="center" colspan='7'><i>Agentic Tool Use</i></td>
</tr>
<tr>
<td >BFCL-v3</td>
<td align="center">60.7</td>
<td align="center">N/A</td>
<td align="center">40.4</td>
<td align="center">70.3</td>
<td align="center">70.8</td>
<td align="center">64.7</td>
</tr>
<tr>
<td >Tau-Bench (Airline)</td>
<td align="center">48.0</td>
<td align="center">N/A</td>
<td align="center">38.5</td>
<td align="center">34.5</td>
<td align="center">37.5</td>
<td align="center">53.5</td>
</tr>
<tr>
<td >Tau-Bench (Retail)</td>
<td align="center">65.4</td>
<td align="center">N/A</td>
<td align="center">10.2</td>
<td align="center">55.2</td>
<td align="center">58.3</td>
<td align="center">63.9</td>
</tr>
<tr>
<td align="center" colspan='7'><i>Multilinguality</i></td>
</tr>
<tr>
<td >KMMLU-Pro</td>
<td align="center">65.7</td>
<td align="center">55.8</td>
<td align="center">51.5</td>
<td align="center">61.4</td>
<td align="center">68.1</td>
<td align="center">71.7</td>
</tr>
<tr>
<td >KSM</td>
<td align="center">87.0</td>
<td align="center">79.8</td>
<td align="center">71.9</td>
<td align="center">82.8</td>
<td align="center">86.2</td>
<td align="center">86.7</td>
</tr>
<tr>
<td >MMMLU (ES)</td>
<td align="center">85.4</td>
<td align="center">84.3</td>
<td align="center">68.9</td>
<td align="center">82.8</td>
<td align="center">86.7</td>
<td align="center">88.2</td>
</tr>
</table>
### 32B Non-Reasoning Mode
<table>
<tr>
<th> </th>
<th>EXAONE 4.0.1 32B </th>
<th>Phi 4</th>
<th>Mistral-Small-2506</th>
<th>Gemma3 27B</th>
<th>Qwen3 32B </th>
<th>Qwen3 235B </th>
<th>Llama-4-Maverick</th>
<th>DeepSeek V3-0324</th>
</tr>
<tr>
<td align="center">Model Size</td>
<td align="center">32.0B</td>
<td align="center">14.7B</td>
<td align="center">24.0B</td>
<td align="center">27.4B</td>
<td align="center">32.8B</td>
<td align="center">235B</td>
<td align="center">402B</td>
<td align="center">671B</td>
</tr>
<tr>
<td align="center">Hybrid Reasoning</td>
<td align="center">✅</td>
<td align="center"> </td>
<td align="center"> </td>
<td align="center"> </td>
<td align="center">✅</td>
<td align="center">✅</td>
<td align="center"> </td>
<td align="center"> </td>
</tr>
<tr>
<td align="center" colspan='9'><i>World Knowledge</i></td>
</tr>
<tr>
<td >MMLU-Pro</td>
<td align="center">77.4</td>
<td align="center">70.4</td>
<td align="center">69.1</td>
<td align="center">67.5</td>
<td align="center">74.4</td>
<td align="center">77.4</td>
<td align="center">80.5</td>
<td align="center">81.2</td>
</tr>
<tr>
<td >GPQA-Diamond</td>
<td align="center">61.6</td>
<td align="center">56.1</td>
<td align="center">46.1</td>
<td align="center">42.4</td>
<td align="center">54.6</td>
<td align="center">62.9</td>
<td align="center">69.8</td>
<td align="center">68.4</td>
</tr>
<tr>
<td align="center" colspan='9'><i>Math/Coding</i></td>
</tr>
<tr>
<td >AIME 2025</td>
<td align="center">36.3</td>
<td align="center">17.8</td>
<td align="center">30.2</td>
<td align="center">23.8</td>
<td align="center">20.2</td>
<td align="center">24.7</td>
<td align="center">18.0</td>
<td align="center">50.0</td>
</tr>
<tr>
<td >LiveCodeBench v6</td>
<td align="center">43.3</td>
<td align="center">27.4</td>
<td align="center">26.9</td>
<td align="center">29.7</td>
<td align="center">28.0</td>
<td align="center">31.4</td>
<td align="center">32.7</td>
<td align="center">44.0</td>
</tr>
<tr>
<td align="center" colspan='9'><i>Instruction Following</i></td>
</tr>
<tr>
<td >IFEval</td>
<td align="center">84.7</td>
<td align="center">63.0</td>
<td align="center">77.8</td>
<td align="center">82.6</td>
<td align="center">83.2</td>
<td align="center">83.2</td>
<td align="center">85.4</td>
<td align="center">81.2</td>
</tr>
<tr>
<td align="center" colspan='9'><i>Agentic Tool Use</i></td>
</tr>
<tr>
<td >BFCL-v3</td>
<td align="center">63.9</td>
<td align="center">N/A</td>
<td align="center">57.7</td>
<td align="center">N/A</td>
<td align="center">63.0</td>
<td align="center">68.0</td>
<td align="center">52.9</td>
<td align="center">63.8</td>
</tr>
<tr>
<td >Tau-Bench (Airline)</td>
<td align="center">18.5</td>
<td align="center">N/A</td>
<td align="center">36.1</td>
<td align="center">N/A</td>
<td align="center">16.0</td>
<td align="center">27.0</td>
<td align="center">38.0</td>
<td align="center">40.5</td>
</tr>
<tr>
<td >Tau-Bench (Retail)</td>
<td align="center">52.0</td>
<td align="center">N/A</td>
<td align="center">35.5</td>
<td align="center">N/A</td>
<td align="center">47.6</td>
<td align="center">56.5</td>
<td align="center">6.5</td>
<td align="center">68.5</td>
</tr>
<tr>
<td align="center" colspan='9'><i>Multilinguality</i></td>
</tr>
<tr>
<td >KMMLU-Pro</td>
<td align="center">59.8</td>
<td align="center">44.8</td>
<td align="center">51.0</td>
<td align="center">50.7</td>
<td align="center">58.3</td>
<td align="center">64.4</td>
<td align="center">68.8</td>
<td align="center">67.3</td>
</tr>
<tr>
<td >KSM</td>
<td align="center">56.3</td>
<td align="center">29.1</td>
<td align="center">35.5</td>
<td align="center">36.1</td>
<td align="center">41.3</td>
<td align="center">46.6</td>
<td align="center">40.6</td>
<td align="center">63.5</td>
</tr>
<tr>
<td >MMMLU (ES)</td>
<td align="center">80.3</td>
<td align="center">81.2</td>
<td align="center">78.4</td>
<td align="center">78.7</td>
<td align="center">82.1</td>
<td align="center">83.7</td>
<td align="center">86.9</td>
<td align="center">86.7</td>
</tr>
</table>
## Usage Guideline
> [!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.6` for better performance.
> - For reasoning mode (using `<think>` block), we recommend using `temperature=0.6` and `top_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.1` to avoid code switching.
## Limitation
The EXAONE language model has certain limitations and may occasionally generate inappropriate responses. The language model generates responses based on the output probability of tokens, and it is determined during learning from training data. While we have made every effort to exclude personal, harmful, and biased information from the training data, some problematic content may still be included, potentially leading to undesirable responses. Please note that the text generated by EXAONE language model does not reflect the views of LG AI Research.
- Inappropriate answers may be generated, which contain personal, harmful or other inappropriate information.
- Biased responses may be generated, which are associated with age, gender, race, and so on.
- The generated responses rely heavily on statistics from the training data, which can result in the generation of
semantically or syntactically incorrect sentences.
- Since the model does not reflect the latest information, the responses may be false or contradictory.
LG AI Research strives to reduce potential risks that may arise from EXAONE language models. Users are not allowed
to engage in any malicious activities (e.g., keying in illegal information) that may induce the creation of inappropriate
outputs violating LG AI's ethical principles when using EXAONE language models.
## License
The model is licensed under [EXAONE AI Model License Agreement 1.2 - NC](./LICENSE)
> [!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.
## Citation
```
@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}
}
```
## Contact
LG AI Research Technical Support: contact[email protected]
|