Text Generation
Transformers
Safetensors
exaone_moe
lg-ai
exaone
k-exaone
Mixture of Experts
conversational
Instructions to use LGAI-EXAONE/K-EXAONE-2.0-750B-A37B-DSpark with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LGAI-EXAONE/K-EXAONE-2.0-750B-A37B-DSpark with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LGAI-EXAONE/K-EXAONE-2.0-750B-A37B-DSpark") 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-2.0-750B-A37B-DSpark") model = AutoModelForCausalLM.from_pretrained("LGAI-EXAONE/K-EXAONE-2.0-750B-A37B-DSpark", device_map="auto") 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 Settings
- vLLM
How to use LGAI-EXAONE/K-EXAONE-2.0-750B-A37B-DSpark 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-2.0-750B-A37B-DSpark" # 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-2.0-750B-A37B-DSpark", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/LGAI-EXAONE/K-EXAONE-2.0-750B-A37B-DSpark
- SGLang
How to use LGAI-EXAONE/K-EXAONE-2.0-750B-A37B-DSpark 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-2.0-750B-A37B-DSpark" \ --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-2.0-750B-A37B-DSpark", "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-2.0-750B-A37B-DSpark" \ --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-2.0-750B-A37B-DSpark", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use LGAI-EXAONE/K-EXAONE-2.0-750B-A37B-DSpark with Docker Model Runner:
docker model run hf.co/LGAI-EXAONE/K-EXAONE-2.0-750B-A37B-DSpark
Commit ·
9d153d5
1
Parent(s): 54b1c9e
Update config.json
Browse files- config.json +16 -14
config.json
CHANGED
|
@@ -3,11 +3,23 @@
|
|
| 3 |
"ExaoneMoeForCausalLM"
|
| 4 |
],
|
| 5 |
"attention_dropout": 0.0,
|
| 6 |
-
"block_size": 7,
|
| 7 |
"bos_token_id": 1,
|
| 8 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
"dtype": "bfloat16",
|
| 10 |
-
"enable_confidence_head": true,
|
| 11 |
"eos_token_id": 53,
|
| 12 |
"head_dim": 128,
|
| 13 |
"hidden_act": "silu",
|
|
@@ -94,8 +106,7 @@
|
|
| 94 |
"sliding_attention",
|
| 95 |
"full_attention"
|
| 96 |
],
|
| 97 |
-
"
|
| 98 |
-
"markov_rank": 256,
|
| 99 |
"max_position_embeddings": 262144,
|
| 100 |
"mlp_layer_types": [
|
| 101 |
"dense",
|
|
@@ -196,7 +207,6 @@
|
|
| 196 |
0
|
| 197 |
],
|
| 198 |
"n_group": 1,
|
| 199 |
-
"noise_token_id": 84,
|
| 200 |
"norm_topk_prob": true,
|
| 201 |
"num_attention_heads": 64,
|
| 202 |
"num_experts": 256,
|
|
@@ -205,7 +215,6 @@
|
|
| 205 |
"num_key_value_heads": 8,
|
| 206 |
"num_nextn_predict_layers": 5,
|
| 207 |
"num_shared_experts": 1,
|
| 208 |
-
"num_target_layers": 78,
|
| 209 |
"pad_token_id": 0,
|
| 210 |
"rms_norm_eps": 1e-05,
|
| 211 |
"rope_parameters": {
|
|
@@ -374,13 +383,6 @@
|
|
| 374 |
7.0,
|
| 375 |
7.0
|
| 376 |
],
|
| 377 |
-
"target_layer_ids": [
|
| 378 |
-
2,
|
| 379 |
-
20,
|
| 380 |
-
38,
|
| 381 |
-
56,
|
| 382 |
-
74
|
| 383 |
-
],
|
| 384 |
"tie_word_embeddings": false,
|
| 385 |
"tokenizer_class": "GPT2Tokenizer",
|
| 386 |
"topk_group": 1,
|
|
|
|
| 3 |
"ExaoneMoeForCausalLM"
|
| 4 |
],
|
| 5 |
"attention_dropout": 0.0,
|
|
|
|
| 6 |
"bos_token_id": 1,
|
| 7 |
+
"dspark_block_size": 7,
|
| 8 |
+
"dspark_confidence_head_with_markov": true,
|
| 9 |
+
"dspark_enable_confidence_head": true,
|
| 10 |
+
"dspark_markov_head_type": "vanilla",
|
| 11 |
+
"dspark_markov_rank": 256,
|
| 12 |
+
"dspark_noise_token_id": 84,
|
| 13 |
+
"dspark_num_hidden_layers": 5,
|
| 14 |
+
"dspark_num_target_layers": 78,
|
| 15 |
+
"dspark_target_layer_ids": [
|
| 16 |
+
2,
|
| 17 |
+
20,
|
| 18 |
+
38,
|
| 19 |
+
56,
|
| 20 |
+
74
|
| 21 |
+
],
|
| 22 |
"dtype": "bfloat16",
|
|
|
|
| 23 |
"eos_token_id": 53,
|
| 24 |
"head_dim": 128,
|
| 25 |
"hidden_act": "silu",
|
|
|
|
| 106 |
"sliding_attention",
|
| 107 |
"full_attention"
|
| 108 |
],
|
| 109 |
+
"mask_token_id": 84,
|
|
|
|
| 110 |
"max_position_embeddings": 262144,
|
| 111 |
"mlp_layer_types": [
|
| 112 |
"dense",
|
|
|
|
| 207 |
0
|
| 208 |
],
|
| 209 |
"n_group": 1,
|
|
|
|
| 210 |
"norm_topk_prob": true,
|
| 211 |
"num_attention_heads": 64,
|
| 212 |
"num_experts": 256,
|
|
|
|
| 215 |
"num_key_value_heads": 8,
|
| 216 |
"num_nextn_predict_layers": 5,
|
| 217 |
"num_shared_experts": 1,
|
|
|
|
| 218 |
"pad_token_id": 0,
|
| 219 |
"rms_norm_eps": 1e-05,
|
| 220 |
"rope_parameters": {
|
|
|
|
| 383 |
7.0,
|
| 384 |
7.0
|
| 385 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 386 |
"tie_word_embeddings": false,
|
| 387 |
"tokenizer_class": "GPT2Tokenizer",
|
| 388 |
"topk_group": 1,
|