LG AI Research/Dense

EXAONE 4.0 32B

chatcodingreasoningmultilingualThinkingTool Use
32B
Parameters
128K
Context length
14
Benchmarks
4
Quantizations
30K
HF downloads
Architecture
Dense
Released
2025-07-15
Layers
64
KV Heads
8
Head Dim
128
Family
exaone
<p align="center">

πŸŽ‰ License Updated! We are pleased to announce our more flexible licensing terms πŸ€—

✈️ Try on <a href="https://friendli.ai/suite/~/serverless-endpoints/LGAI-EXAONE/EXAONE-4.0-32B/overview">FriendliAI</a> (licensed under commercial purposes)

<i>πŸ“’ EXAONE 4.0 is officially supported by HuggingFace transformers! Please check out the guide <a href="#quickstart">below</a></i>

EXAONE-4.0-32B

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 and the advanced reasoning abilities of 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, HuggingFace paper, blog, and GitHub.

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:

from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "LGAI-EXAONE/EXAONE-4.0-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.

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 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.

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.

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 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

    # extra_llm_api_config.yaml
    kv_cache_config:
      enable_block_reuse: false
    
  2. Run server with the configuration

    trtllm-serve serve LGAI-EXAONE/EXAONE-4.0-32B --backend pytorch --extra_llm_api_options extra_llm_api_config.yaml
    

For more details, please refer to the documentation of EXAONE from TensorRT-LLM.

vLLM

vLLM officially supports EXAONE 4.0 models in the version of 0.10.0. You can run the vLLM server by following command:

vllm serve LGAI-EXAONE/EXAONE-4.0-32B --enable-auto-tool-choice --tool-call-parser hermes --reasoning-parser deepseek_r1

For more details, please refer to the vLLM documentation.

[!NOTE] Other inference engines including 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.

  • βœ… 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 and KMMLU-Pro benchmarks. Both datasets are publicly released!

32B Reasoning Mode

...

Quantizations & VRAM

Q4_K_M4.5 bpw
18.5 GB
VRAM required
94%
Quality
Q6_K6.5 bpw
26.5 GB
VRAM required
97%
Quality
Q8_08 bpw
32.5 GB
VRAM required
100%
Quality
FP1616 bpw
64.5 GB
VRAM required
100%
Quality

Benchmarks (14)

MATH-50097.7
IFEval83.7
MMLU-PRO81.8
AIME80.0
AA Math80.0
LiveCodeBench74.7
GPQA Diamond73.9
MATH51.3
BBH39.8
AA Intelligence16.7
AA Coding14.0
HLE10.5
MUSR5.2
GPQA5.0

GPUs that can run this model

At Q4_K_M quantization. Sorted by minimum VRAM.

AMD RX 7900 XT
20 GB VRAM β€’ 800 GB/s
AMD
$849
NVIDIA RTX 4000 Ada 20GB
20 GB VRAM β€’ 432 GB/s
NVIDIA
$1250
NVIDIA A10M
20 GB VRAM β€’ 500 GB/s
NVIDIA
NVIDIA GeForce RTX 3080 Ti 20 GB
20 GB VRAM β€’ 760 GB/s
NVIDIA
$1199
AMD Radeon RX 7900 XT
20 GB VRAM β€’ 800 GB/s
AMD
$899
NVIDIA RTX 4000 Ada Generation
20 GB VRAM β€’ 360 GB/s
NVIDIA
NVIDIA RTX 4000 SFF Ada Generation
20 GB VRAM β€’ 280 GB/s
NVIDIA
NVIDIA RTX A4500
20 GB VRAM β€’ 640 GB/s
NVIDIA
NVIDIA RTX 4090
24 GB VRAM β€’ 1008 GB/s
NVIDIA
$1599
NVIDIA RTX 3090 Ti
24 GB VRAM β€’ 1008 GB/s
NVIDIA
$999
NVIDIA RTX 3090
24 GB VRAM β€’ 936 GB/s
NVIDIA
$850
AMD RX 7900 XTX
24 GB VRAM β€’ 960 GB/s
AMD
$999
Apple M4 Pro (24GB)
24 GB VRAM β€’ 273 GB/s
APPLE
$1399
NVIDIA L4 24GB
24 GB VRAM β€’ 300 GB/s
NVIDIA
$2500
NVIDIA A10 24GB
24 GB VRAM β€’ 600 GB/s
NVIDIA
$3500
Apple M2 (24GB)
24 GB VRAM β€’ 100 GB/s
APPLE
$999
Apple M3 (24GB)
24 GB VRAM β€’ 100 GB/s
APPLE
$999
Apple M4 (24GB)
24 GB VRAM β€’ 120 GB/s
APPLE
$699
NVIDIA Tesla M40 24 GB
24 GB VRAM β€’ 288 GB/s
NVIDIA
NVIDIA Tesla P10
24 GB VRAM β€’ 694 GB/s
NVIDIA
NVIDIA Tesla P40
24 GB VRAM β€’ 347 GB/s
NVIDIA
NVIDIA Quadro RTX 6000
24 GB VRAM β€’ 672 GB/s
NVIDIA
NVIDIA Quadro RTX 6000 Passive
24 GB VRAM β€’ 624 GB/s
NVIDIA
NVIDIA GeForce RTX 3090
24 GB VRAM β€’ 936 GB/s
NVIDIA
$1499
NVIDIA A10 PCIe
24 GB VRAM β€’ 600 GB/s
NVIDIA
NVIDIA A10G
24 GB VRAM β€’ 600 GB/s
NVIDIA
NVIDIA RTX A5000
24 GB VRAM β€’ 768 GB/s
NVIDIA
NVIDIA GeForce RTX 3090 Ti
24 GB VRAM β€’ 1010 GB/s
NVIDIA
$1999
NVIDIA GeForce RTX 4090
24 GB VRAM β€’ 1010 GB/s
NVIDIA
$1599
NVIDIA L40 CNX
24 GB VRAM β€’ 864 GB/s
NVIDIA

Find the best GPU for EXAONE 4.0 32B

Build Hardware for EXAONE 4.0 32B