Text Generation
Transformers
Safetensors
qwen3
feature-extraction
dflash
speculative-decoding
diffusion
efficiency
flash-decoding
qwen
kimi
diffusion-language-model
custom_code
text-generation-inference
Instructions to use z-lab/Kimi-K2.5-DFlash with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use z-lab/Kimi-K2.5-DFlash with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="z-lab/Kimi-K2.5-DFlash", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("z-lab/Kimi-K2.5-DFlash", trust_remote_code=True) model = AutoModel.from_pretrained("z-lab/Kimi-K2.5-DFlash", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use z-lab/Kimi-K2.5-DFlash with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "z-lab/Kimi-K2.5-DFlash" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "z-lab/Kimi-K2.5-DFlash", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/z-lab/Kimi-K2.5-DFlash
- SGLang
How to use z-lab/Kimi-K2.5-DFlash 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 "z-lab/Kimi-K2.5-DFlash" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "z-lab/Kimi-K2.5-DFlash", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "z-lab/Kimi-K2.5-DFlash" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "z-lab/Kimi-K2.5-DFlash", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use z-lab/Kimi-K2.5-DFlash with Docker Model Runner:
docker model run hf.co/z-lab/Kimi-K2.5-DFlash
Upload model
Browse files- config.json +3 -0
- model.safetensors.index.json +71 -73
config.json
CHANGED
|
@@ -4,6 +4,9 @@
|
|
| 4 |
],
|
| 5 |
"attention_bias": false,
|
| 6 |
"attention_dropout": 0.0,
|
|
|
|
|
|
|
|
|
|
| 7 |
"block_size": 8,
|
| 8 |
"dflash_config": {
|
| 9 |
"mask_token_id": 163838,
|
|
|
|
| 4 |
],
|
| 5 |
"attention_bias": false,
|
| 6 |
"attention_dropout": 0.0,
|
| 7 |
+
"auto_map": {
|
| 8 |
+
"AutoModel": "dflash.DFlashDraftModel"
|
| 9 |
+
},
|
| 10 |
"block_size": 8,
|
| 11 |
"dflash_config": {
|
| 12 |
"mask_token_id": 163838,
|
model.safetensors.index.json
CHANGED
|
@@ -1,79 +1,77 @@
|
|
| 1 |
{
|
| 2 |
"metadata": {
|
| 3 |
-
"total_parameters":
|
| 4 |
-
"total_size":
|
| 5 |
},
|
| 6 |
"weight_map": {
|
| 7 |
-
"
|
| 8 |
-
"
|
| 9 |
-
"
|
| 10 |
-
"layers.0.
|
| 11 |
-
"layers.0.mlp.
|
| 12 |
-
"layers.0.mlp.
|
| 13 |
-
"layers.0.
|
| 14 |
-
"layers.0.
|
| 15 |
-
"layers.0.self_attn.
|
| 16 |
-
"layers.0.self_attn.
|
| 17 |
-
"layers.0.self_attn.
|
| 18 |
-
"layers.0.self_attn.
|
| 19 |
-
"layers.0.self_attn.
|
| 20 |
-
"layers.
|
| 21 |
-
"layers.1.
|
| 22 |
-
"layers.1.mlp.
|
| 23 |
-
"layers.1.mlp.
|
| 24 |
-
"layers.1.
|
| 25 |
-
"layers.1.
|
| 26 |
-
"layers.1.self_attn.
|
| 27 |
-
"layers.1.self_attn.
|
| 28 |
-
"layers.1.self_attn.
|
| 29 |
-
"layers.1.self_attn.
|
| 30 |
-
"layers.1.self_attn.
|
| 31 |
-
"layers.
|
| 32 |
-
"layers.2.
|
| 33 |
-
"layers.2.mlp.
|
| 34 |
-
"layers.2.mlp.
|
| 35 |
-
"layers.2.
|
| 36 |
-
"layers.2.
|
| 37 |
-
"layers.2.self_attn.
|
| 38 |
-
"layers.2.self_attn.
|
| 39 |
-
"layers.2.self_attn.
|
| 40 |
-
"layers.2.self_attn.
|
| 41 |
-
"layers.2.self_attn.
|
| 42 |
-
"layers.
|
| 43 |
-
"layers.3.
|
| 44 |
-
"layers.3.mlp.
|
| 45 |
-
"layers.3.mlp.
|
| 46 |
-
"layers.3.
|
| 47 |
-
"layers.3.
|
| 48 |
-
"layers.3.self_attn.
|
| 49 |
-
"layers.3.self_attn.
|
| 50 |
-
"layers.3.self_attn.
|
| 51 |
-
"layers.3.self_attn.
|
| 52 |
-
"layers.3.self_attn.
|
| 53 |
-
"layers.
|
| 54 |
-
"layers.4.
|
| 55 |
-
"layers.4.mlp.
|
| 56 |
-
"layers.4.mlp.
|
| 57 |
-
"layers.4.
|
| 58 |
-
"layers.4.
|
| 59 |
-
"layers.4.self_attn.
|
| 60 |
-
"layers.4.self_attn.
|
| 61 |
-
"layers.4.self_attn.
|
| 62 |
-
"layers.4.self_attn.
|
| 63 |
-
"layers.4.self_attn.
|
| 64 |
-
"layers.
|
| 65 |
-
"layers.5.
|
| 66 |
-
"layers.5.mlp.
|
| 67 |
-
"layers.5.mlp.
|
| 68 |
-
"layers.5.
|
| 69 |
-
"layers.5.
|
| 70 |
-
"layers.5.self_attn.
|
| 71 |
-
"layers.5.self_attn.
|
| 72 |
-
"layers.5.self_attn.
|
| 73 |
-
"layers.5.self_attn.
|
| 74 |
-
"layers.5.self_attn.
|
| 75 |
-
"
|
| 76 |
-
"lm_head.weight": "model-00003-of-00003.safetensors",
|
| 77 |
-
"norm.weight": "model-00002-of-00003.safetensors"
|
| 78 |
}
|
| 79 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"metadata": {
|
| 3 |
+
"total_parameters": 3479277056,
|
| 4 |
+
"total_size": 6958554112
|
| 5 |
},
|
| 6 |
"weight_map": {
|
| 7 |
+
"fc.weight": "model-00002-of-00002.safetensors",
|
| 8 |
+
"hidden_norm.weight": "model-00002-of-00002.safetensors",
|
| 9 |
+
"layers.0.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 10 |
+
"layers.0.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 11 |
+
"layers.0.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 12 |
+
"layers.0.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 13 |
+
"layers.0.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 14 |
+
"layers.0.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 15 |
+
"layers.0.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 16 |
+
"layers.0.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 17 |
+
"layers.0.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 18 |
+
"layers.0.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 19 |
+
"layers.0.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 20 |
+
"layers.1.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 21 |
+
"layers.1.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 22 |
+
"layers.1.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 23 |
+
"layers.1.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 24 |
+
"layers.1.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 25 |
+
"layers.1.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 26 |
+
"layers.1.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 27 |
+
"layers.1.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 28 |
+
"layers.1.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 29 |
+
"layers.1.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 30 |
+
"layers.1.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 31 |
+
"layers.2.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 32 |
+
"layers.2.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 33 |
+
"layers.2.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 34 |
+
"layers.2.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 35 |
+
"layers.2.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 36 |
+
"layers.2.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 37 |
+
"layers.2.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 38 |
+
"layers.2.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 39 |
+
"layers.2.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 40 |
+
"layers.2.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 41 |
+
"layers.2.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 42 |
+
"layers.3.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 43 |
+
"layers.3.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 44 |
+
"layers.3.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 45 |
+
"layers.3.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 46 |
+
"layers.3.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 47 |
+
"layers.3.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 48 |
+
"layers.3.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 49 |
+
"layers.3.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 50 |
+
"layers.3.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 51 |
+
"layers.3.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 52 |
+
"layers.3.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 53 |
+
"layers.4.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 54 |
+
"layers.4.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 55 |
+
"layers.4.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 56 |
+
"layers.4.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 57 |
+
"layers.4.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 58 |
+
"layers.4.self_attn.k_norm.weight": "model-00001-of-00002.safetensors",
|
| 59 |
+
"layers.4.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 60 |
+
"layers.4.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 61 |
+
"layers.4.self_attn.q_norm.weight": "model-00001-of-00002.safetensors",
|
| 62 |
+
"layers.4.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 63 |
+
"layers.4.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 64 |
+
"layers.5.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 65 |
+
"layers.5.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 66 |
+
"layers.5.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 67 |
+
"layers.5.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 68 |
+
"layers.5.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 69 |
+
"layers.5.self_attn.k_norm.weight": "model-00002-of-00002.safetensors",
|
| 70 |
+
"layers.5.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 71 |
+
"layers.5.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 72 |
+
"layers.5.self_attn.q_norm.weight": "model-00002-of-00002.safetensors",
|
| 73 |
+
"layers.5.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 74 |
+
"layers.5.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 75 |
+
"norm.weight": "model-00002-of-00002.safetensors"
|
|
|
|
|
|
|
| 76 |
}
|
| 77 |
}
|