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)# pip install -U transformers accelerate # 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, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- 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 draft checkpoint from draft-step-53000
Browse files- config.json +1 -2
- model-00001-of-00003.safetensors +1 -1
- model-00002-of-00003.safetensors +1 -1
- model-00003-of-00003.safetensors +1 -1
config.json
CHANGED
|
@@ -6,7 +6,6 @@
|
|
| 6 |
"attention_dropout": 0.0,
|
| 7 |
"block_size": 16,
|
| 8 |
"dflash_config": {
|
| 9 |
-
"mask_token_id": 163838,
|
| 10 |
"target_layer_ids": [
|
| 11 |
1,
|
| 12 |
12,
|
|
@@ -55,4 +54,4 @@
|
|
| 55 |
"use_cache": true,
|
| 56 |
"use_sliding_window": false,
|
| 57 |
"vocab_size": 163840
|
| 58 |
-
}
|
|
|
|
| 6 |
"attention_dropout": 0.0,
|
| 7 |
"block_size": 16,
|
| 8 |
"dflash_config": {
|
|
|
|
| 9 |
"target_layer_ids": [
|
| 10 |
1,
|
| 11 |
12,
|
|
|
|
| 54 |
"use_cache": true,
|
| 55 |
"use_sliding_window": false,
|
| 56 |
"vocab_size": 163840
|
| 57 |
+
}
|
model-00001-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4756463544
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d6ce892a14281569560d699939ad6da2095c6d70b294ca0ff6c788f496880f4e
|
| 3 |
size 4756463544
|
model-00002-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3934331200
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:333128c6038efefb244e48bf6c451eb8148e7305f149917b428e695f1dea8c0b
|
| 3 |
size 3934331200
|
model-00003-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2965387568
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4e23c0cc2d7128d0b41b1ed3e2f483f54e7bf026f3bf7fbdca137f2bd32504e0
|
| 3 |
size 2965387568
|