jianchen0311 commited on
Commit
55bf596
·
verified ·
1 Parent(s): b121bd8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -7
README.md CHANGED
@@ -20,7 +20,7 @@ tags:
20
 
21
  **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.
22
 
23
- This model is the **drafter** component. It must be used in conjunction with the target model `moonshotai/Kimi-K2.5`. It was trained with a context length of 4096 tokens.
24
 
25
  <div align="center">
26
  <img src="assets/dflash_system.png" alt="DFlash Architecture" width="100%">
@@ -36,6 +36,8 @@ uv pip install vllm
36
  uv pip install -U vllm --torch-backend=auto --extra-index-url https://wheels.vllm.ai/nightly
37
  ```
38
 
 
 
39
  SGLang:
40
  ```bash
41
  uv pip install "git+https://github.com/sgl-project/sglang.git@refs/pull/20547/head#subdirectory=python"
@@ -46,8 +48,8 @@ uv pip install "git+https://github.com/sgl-project/sglang.git@refs/pull/20547/he
46
  vLLM:
47
  ```bash
48
  vllm serve moonshotai/Kimi-K2.5 \
49
- --speculative-config '{"method": "dflash", "model": "z-lab/Kimi-K2.5-DFlash", "num_speculative_tokens": 15}' \
50
- --attention-backend flash_attn \
51
  --max-num-batched-tokens 32768
52
  ```
53
 
@@ -62,10 +64,12 @@ python -m sglang.launch_server \
62
  --model-path moonshotai/Kimi-K2.5 \
63
  --speculative-algorithm DFLASH \
64
  --speculative-draft-model-path z-lab/Kimi-K2.5-DFlash \
65
- --speculative-num-draft-tokens 16 \
66
  --tp-size 8 \
67
- --attention-backend fa3 \
 
68
  --mem-fraction-static 0.9 \
 
69
  --trust-remote-code
70
  ```
71
  > **Tip:** For long-context or agentic workloads, add `--speculative-dflash-draft-window-size WINDOW_SIZE` to enable sliding-window attention for the drafter.
@@ -88,9 +92,8 @@ print(response.choices[0].message.content)
88
  ## Early Results
89
  - Thinking: enabled
90
  - Max new tokens: 4096
91
- - Block size: 16
92
  - SGLang results. vLLM results might be different.
93
- - Epoch 1.8
94
  | Dataset | Accept Length |
95
  |-----------|---------------|
96
  | GSM8K | 5.8 |
 
20
 
21
  **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.
22
 
23
+ This model is the **drafter** component. It must be used in conjunction with the target model `moonshotai/Kimi-K2.5`.
24
 
25
  <div align="center">
26
  <img src="assets/dflash_system.png" alt="DFlash Architecture" width="100%">
 
36
  uv pip install -U vllm --torch-backend=auto --extra-index-url https://wheels.vllm.ai/nightly
37
  ```
38
 
39
+ Please refer to [PR39930](https://github.com/vllm-project/vllm/pull/39930) to see how to use DFlash on vLLM.
40
+
41
  SGLang:
42
  ```bash
43
  uv pip install "git+https://github.com/sgl-project/sglang.git@refs/pull/20547/head#subdirectory=python"
 
48
  vLLM:
49
  ```bash
50
  vllm serve moonshotai/Kimi-K2.5 \
51
+ --speculative-config '{"method": "dflash", "model": "z-lab/Kimi-K2.5-DFlash", "num_speculative_tokens": 7}' \
52
+ --attention-backend flashinfer \
53
  --max-num-batched-tokens 32768
54
  ```
55
 
 
64
  --model-path moonshotai/Kimi-K2.5 \
65
  --speculative-algorithm DFLASH \
66
  --speculative-draft-model-path z-lab/Kimi-K2.5-DFlash \
67
+ --speculative-num-draft-tokens 8 \
68
  --tp-size 8 \
69
+ --attention-backend trtllm_mla \
70
+ --speculative-draft-attention-backend fa4 \
71
  --mem-fraction-static 0.9 \
72
+ --speculative-dflash-draft-window-size 4096 \
73
  --trust-remote-code
74
  ```
75
  > **Tip:** For long-context or agentic workloads, add `--speculative-dflash-draft-window-size WINDOW_SIZE` to enable sliding-window attention for the drafter.
 
92
  ## Early Results
93
  - Thinking: enabled
94
  - Max new tokens: 4096
95
+ - Block size: 8
96
  - SGLang results. vLLM results might be different.
 
97
  | Dataset | Accept Length |
98
  |-----------|---------------|
99
  | GSM8K | 5.8 |