Text Generation
Transformers
Safetensors
exaone_moe
lg-ai
exaone
k-exaone
conversational
Eval Results
Instructions to use LGAI-EXAONE/K-EXAONE-236B-A23B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LGAI-EXAONE/K-EXAONE-236B-A23B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LGAI-EXAONE/K-EXAONE-236B-A23B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("LGAI-EXAONE/K-EXAONE-236B-A23B") model = AutoModelForCausalLM.from_pretrained("LGAI-EXAONE/K-EXAONE-236B-A23B") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use LGAI-EXAONE/K-EXAONE-236B-A23B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LGAI-EXAONE/K-EXAONE-236B-A23B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LGAI-EXAONE/K-EXAONE-236B-A23B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/LGAI-EXAONE/K-EXAONE-236B-A23B
- SGLang
How to use LGAI-EXAONE/K-EXAONE-236B-A23B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "LGAI-EXAONE/K-EXAONE-236B-A23B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LGAI-EXAONE/K-EXAONE-236B-A23B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "LGAI-EXAONE/K-EXAONE-236B-A23B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LGAI-EXAONE/K-EXAONE-236B-A23B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use LGAI-EXAONE/K-EXAONE-236B-A23B with Docker Model Runner:
docker model run hf.co/LGAI-EXAONE/K-EXAONE-236B-A23B
Commit ·
f7db87a
1
Parent(s): adc21ca
Update README.md and config.json for Transformers v5
Browse files- README.md +11 -8
- config.json +51 -51
README.md
CHANGED
|
@@ -46,7 +46,7 @@ library_name: transformers
|
|
| 46 |
|
| 47 |
|
| 48 |
<div align="center">
|
| 49 |
-
<table><tr><td>🆓 <span style="color: orange"> <b>Free API until
|
| 50 |
</div>
|
| 51 |
|
| 52 |
<br>
|
|
@@ -380,12 +380,11 @@ The following table shows the evaluation results of the K-EXAONE model in reason
|
|
| 380 |
|
| 381 |
## Requirements
|
| 382 |
|
| 383 |
-
|
| 384 |
|
| 385 |
#### Transformers
|
| 386 |
|
| 387 |
-
You
|
| 388 |
-
The base version of Transformers is `5.0.0rc1`, so it might be helpful to check [the migration guide](https://github.com/huggingface/transformers/blob/main/MIGRATION_GUIDE_V5.md) from the Transformers library.
|
| 389 |
|
| 390 |
#### vLLM
|
| 391 |
|
|
@@ -393,8 +392,12 @@ To serve the K-EXAONE model on a vLLM server, you should install both Transforme
|
|
| 393 |
|
| 394 |
#### SGLang
|
| 395 |
|
| 396 |
-
You should install both Transformers and SGLang to
|
| 397 |
-
You can install the latest version of SGLang
|
|
|
|
|
|
|
|
|
|
|
|
|
| 398 |
|
| 399 |
#### llama.cpp
|
| 400 |
|
|
@@ -403,7 +406,7 @@ To use the K-EXAONE model with llama.cpp library, you should install `llama.cpp
|
|
| 403 |
|
| 404 |
## Quickstart
|
| 405 |
|
| 406 |
-
You can use the K-EXAONE model with the Transformers library
|
| 407 |
|
| 408 |
### Reasoning mode
|
| 409 |
|
|
@@ -584,7 +587,7 @@ vllm serve LGAI-EXAONE/K-EXAONE-236B-A23B \
|
|
| 584 |
|
| 585 |
### SGLang
|
| 586 |
|
| 587 |
-
We support the K-EXAONE model on SGLang. You need to install
|
| 588 |
Practically, you can serve the model with a 256K context length using tensor parallel on 4 H200 GPUs.
|
| 589 |
|
| 590 |
```bash
|
|
|
|
| 46 |
|
| 47 |
|
| 48 |
<div align="center">
|
| 49 |
+
<table><tr><td>🆓 <span style="color: orange"> <b>Free API until Feb 12th, 2026</b>! </span> Try on ⬆️ FriendliAI ✈️</td></tr></table>
|
| 50 |
</div>
|
| 51 |
|
| 52 |
<br>
|
|
|
|
| 380 |
|
| 381 |
## Requirements
|
| 382 |
|
| 383 |
+
K-EXAONE is supported by multiple libraries. Please install the required libraries as needed for your use case.
|
| 384 |
|
| 385 |
#### Transformers
|
| 386 |
|
| 387 |
+
You should install `transformers >= 5.1.0` for the K-EXAONE model.
|
|
|
|
| 388 |
|
| 389 |
#### vLLM
|
| 390 |
|
|
|
|
| 392 |
|
| 393 |
#### SGLang
|
| 394 |
|
| 395 |
+
You should install both Transformers and SGLang to serve the K-EXAONE model on SGLang server.
|
| 396 |
+
You can install the latest version of SGLang from source using the following commands.
|
| 397 |
+
```bash
|
| 398 |
+
git clone https://github.com/sgl-project/sglang.git
|
| 399 |
+
pip install -e sglang/python
|
| 400 |
+
```
|
| 401 |
|
| 402 |
#### llama.cpp
|
| 403 |
|
|
|
|
| 406 |
|
| 407 |
## Quickstart
|
| 408 |
|
| 409 |
+
You can use the K-EXAONE model with the Transformers library version `5.1.0` or later.
|
| 410 |
|
| 411 |
### Reasoning mode
|
| 412 |
|
|
|
|
| 587 |
|
| 588 |
### SGLang
|
| 589 |
|
| 590 |
+
We support the K-EXAONE model on SGLang. You need to install the latest version of the SGLang library from source. Please check the [requirements](#requirements) section.
|
| 591 |
Practically, you can serve the model with a 256K context length using tensor parallel on 4 H200 GPUs.
|
| 592 |
|
| 593 |
```bash
|
config.json
CHANGED
|
@@ -12,56 +12,6 @@
|
|
| 12 |
"hidden_size": 6144,
|
| 13 |
"initializer_range": 0.02,
|
| 14 |
"intermediate_size": 18432,
|
| 15 |
-
"is_moe_layer": [
|
| 16 |
-
false,
|
| 17 |
-
true,
|
| 18 |
-
true,
|
| 19 |
-
true,
|
| 20 |
-
true,
|
| 21 |
-
true,
|
| 22 |
-
true,
|
| 23 |
-
true,
|
| 24 |
-
true,
|
| 25 |
-
true,
|
| 26 |
-
true,
|
| 27 |
-
true,
|
| 28 |
-
true,
|
| 29 |
-
true,
|
| 30 |
-
true,
|
| 31 |
-
true,
|
| 32 |
-
true,
|
| 33 |
-
true,
|
| 34 |
-
true,
|
| 35 |
-
true,
|
| 36 |
-
true,
|
| 37 |
-
true,
|
| 38 |
-
true,
|
| 39 |
-
true,
|
| 40 |
-
true,
|
| 41 |
-
true,
|
| 42 |
-
true,
|
| 43 |
-
true,
|
| 44 |
-
true,
|
| 45 |
-
true,
|
| 46 |
-
true,
|
| 47 |
-
true,
|
| 48 |
-
true,
|
| 49 |
-
true,
|
| 50 |
-
true,
|
| 51 |
-
true,
|
| 52 |
-
true,
|
| 53 |
-
true,
|
| 54 |
-
true,
|
| 55 |
-
true,
|
| 56 |
-
true,
|
| 57 |
-
true,
|
| 58 |
-
true,
|
| 59 |
-
true,
|
| 60 |
-
true,
|
| 61 |
-
true,
|
| 62 |
-
true,
|
| 63 |
-
true
|
| 64 |
-
],
|
| 65 |
"layer_types": [
|
| 66 |
"sliding_attention",
|
| 67 |
"sliding_attention",
|
|
@@ -113,6 +63,56 @@
|
|
| 113 |
"full_attention"
|
| 114 |
],
|
| 115 |
"max_position_embeddings": 262144,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
"model_type": "exaone_moe",
|
| 117 |
"moe_intermediate_size": 2048,
|
| 118 |
"n_group": 1,
|
|
@@ -137,7 +137,7 @@
|
|
| 137 |
"tie_word_embeddings": false,
|
| 138 |
"tokenizer_class": "GPT2Tokenizer",
|
| 139 |
"topk_group": 1,
|
| 140 |
-
"transformers_version": "5.
|
| 141 |
"use_cache": true,
|
| 142 |
"vocab_size": 153600
|
| 143 |
}
|
|
|
|
| 12 |
"hidden_size": 6144,
|
| 13 |
"initializer_range": 0.02,
|
| 14 |
"intermediate_size": 18432,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
"layer_types": [
|
| 16 |
"sliding_attention",
|
| 17 |
"sliding_attention",
|
|
|
|
| 63 |
"full_attention"
|
| 64 |
],
|
| 65 |
"max_position_embeddings": 262144,
|
| 66 |
+
"mlp_layer_types": [
|
| 67 |
+
"dense",
|
| 68 |
+
"sparse",
|
| 69 |
+
"sparse",
|
| 70 |
+
"sparse",
|
| 71 |
+
"sparse",
|
| 72 |
+
"sparse",
|
| 73 |
+
"sparse",
|
| 74 |
+
"sparse",
|
| 75 |
+
"sparse",
|
| 76 |
+
"sparse",
|
| 77 |
+
"sparse",
|
| 78 |
+
"sparse",
|
| 79 |
+
"sparse",
|
| 80 |
+
"sparse",
|
| 81 |
+
"sparse",
|
| 82 |
+
"sparse",
|
| 83 |
+
"sparse",
|
| 84 |
+
"sparse",
|
| 85 |
+
"sparse",
|
| 86 |
+
"sparse",
|
| 87 |
+
"sparse",
|
| 88 |
+
"sparse",
|
| 89 |
+
"sparse",
|
| 90 |
+
"sparse",
|
| 91 |
+
"sparse",
|
| 92 |
+
"sparse",
|
| 93 |
+
"sparse",
|
| 94 |
+
"sparse",
|
| 95 |
+
"sparse",
|
| 96 |
+
"sparse",
|
| 97 |
+
"sparse",
|
| 98 |
+
"sparse",
|
| 99 |
+
"sparse",
|
| 100 |
+
"sparse",
|
| 101 |
+
"sparse",
|
| 102 |
+
"sparse",
|
| 103 |
+
"sparse",
|
| 104 |
+
"sparse",
|
| 105 |
+
"sparse",
|
| 106 |
+
"sparse",
|
| 107 |
+
"sparse",
|
| 108 |
+
"sparse",
|
| 109 |
+
"sparse",
|
| 110 |
+
"sparse",
|
| 111 |
+
"sparse",
|
| 112 |
+
"sparse",
|
| 113 |
+
"sparse",
|
| 114 |
+
"sparse"
|
| 115 |
+
],
|
| 116 |
"model_type": "exaone_moe",
|
| 117 |
"moe_intermediate_size": 2048,
|
| 118 |
"n_group": 1,
|
|
|
|
| 137 |
"tie_word_embeddings": false,
|
| 138 |
"tokenizer_class": "GPT2Tokenizer",
|
| 139 |
"topk_group": 1,
|
| 140 |
+
"transformers_version": "5.1.0",
|
| 141 |
"use_cache": true,
|
| 142 |
"vocab_size": 153600
|
| 143 |
}
|