LG-AI-EXAONE/EXAONE-4.0

Official repository for EXAONE 4.0 built by LG AI Research

107

stars

15

commits

Aug 4, 2025

updated

README

EXAONE-4.0







πŸŽ‰ License Updated! We are pleased to announce our more flexible licensing terms πŸ€— What's Different?

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.


News

  • 2025.07.26 : 🌟 EXAONE 4.0 is officially supported by HuggingFace transformers! Please check out the v4.54.0 release.
  • 2025.07.18 : EXAONE 4.0 is officially supported by llama.cpp! Please check out the released version here.
  • 2025.07.15 : We release EXAONE 4.0, a hybrid reasoning model with enhanced usability including 32B and 1.2B. Please check out these models!

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

EXAONE 4.0 32B Phi 4 reasoning-plusMagistral Small-2506Qwen 3 32B Qwen 3 235B DeepSeek R1-0528
Model Size32.0B14.7B23.6B32.8B235B671B
Hybrid Reasoningβœ… βœ…βœ…
World Knowledge
MMLU-Redux92.390.886.890.992.793.4
MMLU-Pro81.876.073.480.083.085.0
GPQA-Diamond75.468.968.268.471.181.0
Math/Coding
AIME 202585.378.062.872.981.587.5
HMMT Feb 202572.953.643.550.462.579.4
LiveCodeBench v572.651.755.865.770.775.2
LiveCodeBench v666.747.147.460.158.970.3
Instruction Following
IFEval83.784.937.985.083.480.8
Multi-IF (EN)73.556.127.473.473.472.0
Agentic Tool Use
BFCL-v363.9N/A40.470.370.864.7
Tau-Bench (Airline)51.5N/A38.534.537.553.5
Tau-Bench (Retail)62.8N/A10.255.258.363.9
Multilinguality
KMMLU-Pro67.755.851.561.468.171.7
KMMLU-Redux72.762.754.667.574.577.0
KSM87.679.871.982.886.286.7
MMMLU (ES)85.684.368.982.886.788.2
MATH500 (ES)95.894.283.594.395.196.0

32B Non-Reasoning Mode

EXAONE 4.0 32B Phi 4Mistral-Small-2506Gemma3 27BQwen3 32B Qwen3 235B Llama-4-MaverickDeepSeek V3-0324
Model Size32.0B14.7B24.0B27.4B32.8B235B402B671B
Hybrid Reasoningβœ… βœ…βœ…
World Knowledge
MMLU-Redux89.888.385.985.085.789.292.392.3
MMLU-Pro77.670.469.167.574.477.480.581.2
GPQA-Diamond63.756.146.142.454.662.969.868.4
Math/Coding
AIME 202535.917.830.223.820.224.718.050.0
HMMT Feb 202521.84.016.910.39.811.97.329.2
LiveCodeBench v543.324.625.827.531.335.343.446.7
LiveCodeBench v643.127.426.929.728.031.432.744.0
Instruction Following
IFEval84.863.077.882.683.283.285.481.2
Multi-IF (EN)71.647.763.272.171.972.577.968.3
Long Context
HELMET58.3N/A61.958.354.563.313.7N/A
RULER88.2N/A71.866.085.690.62.9N/A
LongBench v148.1N/A51.551.544.245.334.7N/A
Agentic Tool Use
BFCL-v365.2N/A57.7N/A63.068.052.963.8
Tau-Bench (Airline)25.5N/A36.1N/A16.027.038.040.5
Tau-Bench (Retail)55.9N/A35.5N/A47.656.56.568.5
Multilinguality
KMMLU-Pro60.044.851.050.758.364.468.867.3
KMMLU-Redux64.850.153.653.364.471.776.972.2
KSM59.829.135.536.141.346.640.663.5
Ko-LongBench76.9N/A55.472.073.974.665.6N/A
MMMLU (ES)80.681.278.478.782.183.786.986.7
MATH500 (ES)87.378.283.486.884.787.278.789.2
WMT24++ (ES)90.789.392.293.191.492.992.794.3

1.2B Reasoning Mode

EXAONE 4.0 1.2B EXAONE Deep 2.4BQwen 3 0.6B Qwen 3 1.7B SmolLM 3 3B
Model Size1.28B2.41B596M1.72B3.08B
Hybrid Reasoningβœ… βœ…βœ…βœ…
World Knowledge
MMLU-Redux71.568.955.673.974.8
MMLU-Pro59.356.438.357.757.8
GPQA-Diamond52.054.327.940.141.7
Math/Coding
AIME 202545.247.915.136.836.7
HMMT Feb 202534.027.37.021.826.0
LiveCodeBench v544.647.212.333.227.6
LiveCodeBench v645.343.116.429.929.1
Instruction Following
IFEval67.871.059.272.571.2
Multi-IF (EN)53.954.537.553.547.5
Agentic Tool Use
BFCL-v352.9N/A46.456.637.1
Tau-Bench (Airline)20.5N/A22.031.037.0
Tau-Bench (Retail)28.1N/A3.36.55.4
Multilinguality
KMMLU-Pro42.724.621.638.330.5
KMMLU-Redux46.925.024.538.033.7
KSM60.660.922.852.949.7
MMMLU (ES)62.451.448.864.564.7
MATH500 (ES)88.884.570.687.987.5

1.2B Non-Reasoning Mode

EXAONE 4.0 1.2B Qwen 3 0.6B Gemma 3 1BQwen 3 1.7B SmolLM 3 3B
Model Size1.28B596M1.00B1.72B3.08B
Hybrid Reasoningβœ…βœ… βœ…βœ…
World Knowledge
MMLU-Redux66.944.640.963.465.0
MMLU-Pro52.026.614.743.743.6
GPQA-Diamond40.122.919.228.635.7
Math/Coding
AIME 202523.52.62.19.89.3
HMMT Feb 202513.01.01.55.14.7
LiveCodeBench v526.43.61.811.611.4
LiveCodeBench v630.16.92.316.620.6
Instruction Following
IFEval74.754.580.268.276.7
Multi-IF (EN)62.137.532.551.051.9
Long Context
HELMET41.221.1N/A33.838.6
RULER77.455.1N/A65.966.3
LongBench v136.932.4N/A41.939.9
Agentic Tool Use
BFCL-v355.744.1N/A52.247.3
Tau-Bench (Airline)10.031.5N/A13.538.0
Tau-Bench (Retail)21.75.7N/A4.66.7
Multilinguality
KMMLU-Pro37.524.69.729.527.6
KMMLU-Redux40.422.819.429.826.4
KSM26.30.122.816.316.1
Ko-LongBench69.816.4N/A57.115.7
MMMLU (ES)54.639.535.954.355.1
MATH500 (ES)71.238.541.266.062.4
WMT24++ (ES)65.958.276.976.784.0

Run EXAONE 4.0

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

Quantized Models

We provide EXAONE 4.0 in various quantized formats including GPTQ, AWQ, and GGUF.

For AWQ quantization, we omitted layernorm smoothing due to our use of Reorder-LN architecture.

All quantized models are available on our HuggingFace collections.


Run Locally

llama.cpp

You can run EXAONE models locally using llama.cpp by following these steps:

  1. Install the latest version of llama.cpp (version >= b5932). Please check the official installation guide from llama.cpp.

  2. Download the EXAONE 4.0 model weights in GGUF format.

    huggingface-cli download LGAI-EXAONE/EXAONE-4.0-32B-GGUF \
        --include "EXAONE-4.0-32B-Q4_K_M.gguf" \
        --local-dir .
    
Generation with `llama-cli`
  1. Apply chat template using transformers.

    This process is necessary to avoid issues with current EXAONE modeling code in llama.cpp. This is work in progress at our PR. We will update this once these issues are solved.

    from transformers import AutoModelForCausalLM, AutoTokenizer
    
    model_name = "LGAI-EXAONE/EXAONE-4.0-32B"
    tokenizer = AutoTokenizer.from_pretrained(model_name)
    
    messages = [
        {"role": "user", "content": "Let's work together on local system!"}
    ]
    input_text = tokenizer.apply_chat_template(
        messages,
        tokenize=False,
        add_generation_prompt=True,
    )
    
    print(repr(input_text))
    with open("inputs.txt", "w") as f:
        f.write(input_text)
    
  2. Generate result with greedy decoding.

    llama-cli -m EXAONE-4.0-32B-Q4_K_M.gguf \
        -fa -ngl 65 \
        --temp 0.0 --top-k 1 \
        -f inputs.txt -no-cnv
    
OpenAI compatible server with `llama-server`
  1. Run llama-server with EXAONE 4.0 Jinja template. You can find the chat template file in this repository.

    llama-server -m EXAONE-4.0-32B-Q4_K_M.gguf \
        -c 131072 -fa -ngl 65 \
        --temp 0.6 --top-p 0.95 \
        --jinja --chat-template-file chat_template.jinja \
        --host 0.0.0.0 --port 8820 \
        -a EXAONE-4.0-32B-Q4_K_M
    
  2. Use OpenAI chat completion to test the GGUF model.

    curl -X POST http://localhost:8820/v1/chat/completions \
        -H "Content-Type: application/json" \
        -d '{
            "model": "EXAONE-4.0-32B-Q4_K_M",
            "messages": [
                {"role": "user", "content": "Let'\''s work together on server!"}
            ],
            "max_tokens": 1024,
            "temperature": 0.6,
            "top_p": 0.95,
            "chat_template_kwargs": {"enable_thinking": false}
        }'
    

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.


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

[!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_us@lgresearch.ai

Contributors

lgai-exaone

15 commits

LG-AI-EXAONE/EXAONE-4.0

Official repository for EXAONE 4.0 built by LG AI Research

107

stars

15

commits

Aug 4, 2025

updated

README

EXAONE-4.0







πŸŽ‰ License Updated! We are pleased to announce our more flexible licensing terms πŸ€— What's Different?

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.


News

  • 2025.07.26 : 🌟 EXAONE 4.0 is officially supported by HuggingFace transformers! Please check out the v4.54.0 release.
  • 2025.07.18 : EXAONE 4.0 is officially supported by llama.cpp! Please check out the released version here.
  • 2025.07.15 : We release EXAONE 4.0, a hybrid reasoning model with enhanced usability including 32B and 1.2B. Please check out these models!

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

EXAONE 4.0 32B Phi 4 reasoning-plusMagistral Small-2506Qwen 3 32B Qwen 3 235B DeepSeek R1-0528
Model Size32.0B14.7B23.6B32.8B235B671B
Hybrid Reasoningβœ… βœ…βœ…
World Knowledge
MMLU-Redux92.390.886.890.992.793.4
MMLU-Pro81.876.073.480.083.085.0
GPQA-Diamond75.468.968.268.471.181.0
Math/Coding
AIME 202585.378.062.872.981.587.5
HMMT Feb 202572.953.643.550.462.579.4
LiveCodeBench v572.651.755.865.770.775.2
LiveCodeBench v666.747.147.460.158.970.3
Instruction Following
IFEval83.784.937.985.083.480.8
Multi-IF (EN)73.556.127.473.473.472.0
Agentic Tool Use
BFCL-v363.9N/A40.470.370.864.7
Tau-Bench (Airline)51.5N/A38.534.537.553.5
Tau-Bench (Retail)62.8N/A10.255.258.363.9
Multilinguality
KMMLU-Pro67.755.851.561.468.171.7
KMMLU-Redux72.762.754.667.574.577.0
KSM87.679.871.982.886.286.7
MMMLU (ES)85.684.368.982.886.788.2
MATH500 (ES)95.894.283.594.395.196.0

32B Non-Reasoning Mode

EXAONE 4.0 32B Phi 4Mistral-Small-2506Gemma3 27BQwen3 32B Qwen3 235B Llama-4-MaverickDeepSeek V3-0324
Model Size32.0B14.7B24.0B27.4B32.8B235B402B671B
Hybrid Reasoningβœ… βœ…βœ…
World Knowledge
MMLU-Redux89.888.385.985.085.789.292.392.3
MMLU-Pro77.670.469.167.574.477.480.581.2
GPQA-Diamond63.756.146.142.454.662.969.868.4
Math/Coding
AIME 202535.917.830.223.820.224.718.050.0
HMMT Feb 202521.84.016.910.39.811.97.329.2
LiveCodeBench v543.324.625.827.531.335.343.446.7
LiveCodeBench v643.127.426.929.728.031.432.744.0
Instruction Following
IFEval84.863.077.882.683.283.285.481.2
Multi-IF (EN)71.647.763.272.171.972.577.968.3
Long Context
HELMET58.3N/A61.958.354.563.313.7N/A
RULER88.2N/A71.866.085.690.62.9N/A
LongBench v148.1N/A51.551.544.245.334.7N/A
Agentic Tool Use
BFCL-v365.2N/A57.7N/A63.068.052.963.8
Tau-Bench (Airline)25.5N/A36.1N/A16.027.038.040.5
Tau-Bench (Retail)55.9N/A35.5N/A47.656.56.568.5
Multilinguality
KMMLU-Pro60.044.851.050.758.364.468.867.3
KMMLU-Redux64.850.153.653.364.471.776.972.2
KSM59.829.135.536.141.346.640.663.5
Ko-LongBench76.9N/A55.472.073.974.665.6N/A
MMMLU (ES)80.681.278.478.782.183.786.986.7
MATH500 (ES)87.378.283.486.884.787.278.789.2
WMT24++ (ES)90.789.392.293.191.492.992.794.3

1.2B Reasoning Mode

EXAONE 4.0 1.2B EXAONE Deep 2.4BQwen 3 0.6B Qwen 3 1.7B SmolLM 3 3B
Model Size1.28B2.41B596M1.72B3.08B
Hybrid Reasoningβœ… βœ…βœ…βœ…
World Knowledge
MMLU-Redux71.568.955.673.974.8
MMLU-Pro59.356.438.357.757.8
GPQA-Diamond52.054.327.940.141.7
Math/Coding
AIME 202545.247.915.136.836.7
HMMT Feb 202534.027.37.021.826.0
LiveCodeBench v544.647.212.333.227.6
LiveCodeBench v645.343.116.429.929.1
Instruction Following
IFEval67.871.059.272.571.2
Multi-IF (EN)53.954.537.553.547.5
Agentic Tool Use
BFCL-v352.9N/A46.456.637.1
Tau-Bench (Airline)20.5N/A22.031.037.0
Tau-Bench (Retail)28.1N/A3.36.55.4
Multilinguality
KMMLU-Pro42.724.621.638.330.5
KMMLU-Redux46.925.024.538.033.7
KSM60.660.922.852.949.7
MMMLU (ES)62.451.448.864.564.7
MATH500 (ES)88.884.570.687.987.5

1.2B Non-Reasoning Mode

EXAONE 4.0 1.2B Qwen 3 0.6B Gemma 3 1BQwen 3 1.7B SmolLM 3 3B
Model Size1.28B596M1.00B1.72B3.08B
Hybrid Reasoningβœ…βœ… βœ…βœ…
World Knowledge
MMLU-Redux66.944.640.963.465.0
MMLU-Pro52.026.614.743.743.6
GPQA-Diamond40.122.919.228.635.7
Math/Coding
AIME 202523.52.62.19.89.3
HMMT Feb 202513.01.01.55.14.7
LiveCodeBench v526.43.61.811.611.4
LiveCodeBench v630.16.92.316.620.6
Instruction Following
IFEval74.754.580.268.276.7
Multi-IF (EN)62.137.532.551.051.9
Long Context
HELMET41.221.1N/A33.838.6
RULER77.455.1N/A65.966.3
LongBench v136.932.4N/A41.939.9
Agentic Tool Use
BFCL-v355.744.1N/A52.247.3
Tau-Bench (Airline)10.031.5N/A13.538.0
Tau-Bench (Retail)21.75.7N/A4.66.7
Multilinguality
KMMLU-Pro37.524.69.729.527.6
KMMLU-Redux40.422.819.429.826.4
KSM26.30.122.816.316.1
Ko-LongBench69.816.4N/A57.115.7
MMMLU (ES)54.639.535.954.355.1
MATH500 (ES)71.238.541.266.062.4
WMT24++ (ES)65.958.276.976.784.0

Run EXAONE 4.0

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

Quantized Models

We provide EXAONE 4.0 in various quantized formats including GPTQ, AWQ, and GGUF.

For AWQ quantization, we omitted layernorm smoothing due to our use of Reorder-LN architecture.

All quantized models are available on our HuggingFace collections.


Run Locally

llama.cpp

You can run EXAONE models locally using llama.cpp by following these steps:

  1. Install the latest version of llama.cpp (version >= b5932). Please check the official installation guide from llama.cpp.

  2. Download the EXAONE 4.0 model weights in GGUF format.

    huggingface-cli download LGAI-EXAONE/EXAONE-4.0-32B-GGUF \
        --include "EXAONE-4.0-32B-Q4_K_M.gguf" \
        --local-dir .
    
Generation with `llama-cli`
  1. Apply chat template using transformers.

    This process is necessary to avoid issues with current EXAONE modeling code in llama.cpp. This is work in progress at our PR. We will update this once these issues are solved.

    from transformers import AutoModelForCausalLM, AutoTokenizer
    
    model_name = "LGAI-EXAONE/EXAONE-4.0-32B"
    tokenizer = AutoTokenizer.from_pretrained(model_name)
    
    messages = [
        {"role": "user", "content": "Let's work together on local system!"}
    ]
    input_text = tokenizer.apply_chat_template(
        messages,
        tokenize=False,
        add_generation_prompt=True,
    )
    
    print(repr(input_text))
    with open("inputs.txt", "w") as f:
        f.write(input_text)
    
  2. Generate result with greedy decoding.

    llama-cli -m EXAONE-4.0-32B-Q4_K_M.gguf \
        -fa -ngl 65 \
        --temp 0.0 --top-k 1 \
        -f inputs.txt -no-cnv
    
OpenAI compatible server with `llama-server`
  1. Run llama-server with EXAONE 4.0 Jinja template. You can find the chat template file in this repository.

    llama-server -m EXAONE-4.0-32B-Q4_K_M.gguf \
        -c 131072 -fa -ngl 65 \
        --temp 0.6 --top-p 0.95 \
        --jinja --chat-template-file chat_template.jinja \
        --host 0.0.0.0 --port 8820 \
        -a EXAONE-4.0-32B-Q4_K_M
    
  2. Use OpenAI chat completion to test the GGUF model.

    curl -X POST http://localhost:8820/v1/chat/completions \
        -H "Content-Type: application/json" \
        -d '{
            "model": "EXAONE-4.0-32B-Q4_K_M",
            "messages": [
                {"role": "user", "content": "Let'\''s work together on server!"}
            ],
            "max_tokens": 1024,
            "temperature": 0.6,
            "top_p": 0.95,
            "chat_template_kwargs": {"enable_thinking": false}
        }'
    

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.


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

[!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_us@lgresearch.ai

Contributors

lgai-exaone

15 commits