Text Generation
Transformers
Safetensors
qwen3
dflash
speculative-decoding
diffusion
efficiency
flash-decoding
qwen
kimi
diffusion-language-model
text-generation-inference
Instructions to use SubSir/Kimi-K2.6-DFlash-tmp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SubSir/Kimi-K2.6-DFlash-tmp with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SubSir/Kimi-K2.6-DFlash-tmp")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("SubSir/Kimi-K2.6-DFlash-tmp") model = AutoModel.from_pretrained("SubSir/Kimi-K2.6-DFlash-tmp") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use SubSir/Kimi-K2.6-DFlash-tmp with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SubSir/Kimi-K2.6-DFlash-tmp" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SubSir/Kimi-K2.6-DFlash-tmp", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/SubSir/Kimi-K2.6-DFlash-tmp
- SGLang
How to use SubSir/Kimi-K2.6-DFlash-tmp 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 "SubSir/Kimi-K2.6-DFlash-tmp" \ --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": "SubSir/Kimi-K2.6-DFlash-tmp", "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 "SubSir/Kimi-K2.6-DFlash-tmp" \ --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": "SubSir/Kimi-K2.6-DFlash-tmp", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use SubSir/Kimi-K2.6-DFlash-tmp with Docker Model Runner:
docker model run hf.co/SubSir/Kimi-K2.6-DFlash-tmp
| license: mit | |
| library_name: transformers | |
| pipeline_tag: text-generation | |
| tags: | |
| - dflash | |
| - speculative-decoding | |
| - diffusion | |
| - efficiency | |
| - flash-decoding | |
| - qwen | |
| - kimi | |
| - diffusion-language-model | |
| # Kimi-K2.6-DFlash | |
| [**Paper**](https://arxiv.org/abs/2602.06036) | [**GitHub**](https://github.com/z-lab/dflash) | [**Blog**](https://z-lab.ai/projects/dflash/) | |
| **DFlash** is a novel speculative decoding method that utilizes a lightweight **block diffusion** model for drafting. It enables efficient, high-quality parallel drafting that pushes the limits of inference speed. | |
| This model is the **drafter** component. It must be used in conjunction with the target model `moonshotai/Kimi-K2.6`. | |
| <div align="center"> | |
| <img src="assets/dflash_system.png" alt="DFlash Architecture" width="100%"> | |
| </div> | |
| ## Quick Start | |
| ### Installation | |
| SGLang: | |
| ```bash | |
| uv pip install "git+https://github.com/sgl-project/sglang.git@refs/pull/20547/head#subdirectory=python" | |
| ``` | |
| vLLM: | |
| ```bash | |
| uv pip install vllm | |
| uv pip install -U vllm --torch-backend=auto --extra-index-url https://wheels.vllm.ai/nightly | |
| ``` | |
| Please refer to [PR39930](https://github.com/vllm-project/vllm/pull/39930) to see how to use DFlash with Kimi-K2.6 on vLLM. | |
| ### Launch Server | |
| SGLang: | |
| ```bash | |
| # Optional: enable schedule overlapping (experimental, may not be stable) | |
| # export SGLANG_ENABLE_SPEC_V2=1 | |
| # export SGLANG_ENABLE_DFLASH_SPEC_V2=1 | |
| # export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=1 | |
| python -m sglang.launch_server \ | |
| --model-path moonshotai/Kimi-K2.6 \ | |
| --speculative-algorithm DFLASH \ | |
| --speculative-draft-model-path SubSir/Kimi-K2.6-DFlash-tmp \ | |
| --speculative-num-draft-tokens 8 \ | |
| --tp-size 8 \ | |
| --attention-backend trtllm_mla \ | |
| --speculative-draft-attention-backend fa4 \ | |
| --mem-fraction-static 0.9 \ | |
| --speculative-dflash-draft-window-size 4096 \ | |
| --trust-remote-code | |
| ``` | |
| > **Tip:** For long-context or agentic workloads, add `--speculative-dflash-draft-window-size WINDOW_SIZE` to enable sliding-window attention for the drafter. | |
| ### Usage | |
| ```python | |
| from openai import OpenAI | |
| client = OpenAI(base_url="http://localhost:30000/v1", api_key="EMPTY") | |
| response = client.chat.completions.create( | |
| model="moonshotai/Kimi-K2.6", | |
| messages=[{"role": "user", "content": "Write a quicksort in Python."}], | |
| max_tokens=4096, | |
| ) | |
| print(response.choices[0].message.content) | |
| ``` | |
| ## Benchmark Results | |
| ### Acceptance Length | |
| - Thinking: enabled | |
| - Max new tokens: 4096 | |
| - Block size: 8 | |
| - SGLang results. | |
| | Dataset | Accept Length | | |
| |-----------|---------------| | |
| | GSM8K | 4.8 | | |
| | Math500 | 4.8 | | |
| | HumanEval | 4.7 | | |
| | MBPP | 4.2 | | |
| | MT-Bench | 3.5 | | |
| ### Throughput | |
| | Dataset | C=32 | | |
| |-----------|------| | |
| | GSM8K | 2256 | | |
| | Math500 | 2879 | | |
| | HumanEval | 2759 | | |
| | MBPP | 2949 | | |
| | MT-Bench | 1765 | | |
| ## Acknowledgements | |
| Special thanks to [David Wang](https://davidwa.ng/) for his outstanding engineering support on this project. We are also grateful to [Modal](https://modal.com/), [InnoMatrix](https://innomatrix.ai), and [Yotta Labs](https://www.yottalabs.ai/) for providing the compute resources used to train this draft model. | |
| ## Citation | |
| If you find DFlash useful, please cite our work. To share feedback on DFlash or request new model support, please fill out this form: [DFlash Feedback](https://forms.gle/4YNwfqb4nJdqn6hq9). | |
| ```bibtex | |
| @article{chen2026dflash, | |
| title = {{DFlash: Block Diffusion for Flash Speculative Decoding}}, | |
| author = {Chen, Jian and Liang, Yesheng and Liu, Zhijian}, | |
| journal = {arXiv preprint arXiv:2602.06036}, | |
| year = {2026} | |
| } | |
| ``` |