shanjiaz commited on
Commit
d0173dc
·
verified ·
1 Parent(s): 35f2e68

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +41 -183
README.md CHANGED
@@ -35,48 +35,11 @@ the context grows. This keeps drafting efficient at long context, up to Kimi K3.
35
  - **Client:** chat completions, temperature 1.0, top_p 0.95, full test set per benchmark.
36
  - **Metric:** acceptance length = 1 + accepted draft tokens / drafts (counts the bonus token).
37
 
38
- ## Results
39
-
40
- <!-- Fill in from the final checkpoint's evaluation before release. -->
41
-
42
- | Benchmark | Prompts | Max tokens | Acceptance length | Accept rate, positions 1-7 |
43
- | --- | ---: | ---: | ---: | --- |
44
- | GSM8K | 1,319 | 1,024 | **5.566** | 0.91 0.82 0.72 0.64 0.56 0.49 0.43 |
45
- | HumanEval | 164 | 1,024 | 4.660 | 0.86 0.71 0.59 0.49 0.40 0.34 0.28 |
46
- | MBPP | 974 | 1,024 | 4.376 | 0.84 0.68 0.55 0.44 0.35 0.28 0.23 |
47
- | MATH-500 | 500 | 2,048 | 4.445 | 0.84 0.69 0.56 0.45 0.37 0.30 0.24 |
48
- | SPEED-Bench low entropy (10K-token inputs) | 302 | 1,536 | 3.619 | 0.78 0.58 0.42 0.31 0.23 0.17 0.13 |
49
- | SPEED-Bench coding | 80 | 4,096 | 4.159 | 0.81 0.64 0.50 0.40 0.32 0.27 0.22 |
50
- | MT-Bench | 80 | 1,024 | 3.393 | 0.76 0.54 0.38 0.27 0.20 0.14 0.11 |
51
- | SWE-bench Pro | 642 | 2,048 | 3.302 | 0.75 0.53 0.37 0.26 0.18 0.13 0.09 |
52
- | AIME 2026 | 30 | 4,096 | 3.429 | 0.77 0.56 0.40 0.28 0.20 0.14 0.10 |
53
- | **Pooled** | | | **3.864** | 0.79 0.61 0.46 0.35 0.27 0.21 0.17 |
54
-
55
- ## Long context
56
-
57
- | Benchmark | Prompts | Prompt tokens | Max tokens | Acceptance length | Accept rate, positions 1-7 |
58
- | --- | ---: | ---: | ---: | ---: | --- |
59
- | AA-LCR | 100 | 95K mean | 1,024 | **3.935** | 0.81 0.64 0.49 0.37 0.27 0.21 0.15 |
60
- | BEAM 128K | 400 | 97K-125K | 2,048 | 3.516 | 0.78 0.58 0.41 0.29 0.20 0.14 0.10 |
61
- | BEAM 1M | 700 | 826K-1.04M | 2,048 | 3.421 | 0.77 0.56 0.40 0.28 0.19 0.13 0.09 |
62
-
63
- ## Evaluation at a 4,096-token output cap
64
-
65
- The following additional evaluation used draft revision `e4e6e6261e9f8b6d5f249f9627eb6b109d762d5f`. Its output cap and dataset budgets are recorded with the results below.
66
-
67
- ### Serving with vLLM
68
-
69
- The measurements used vLLM commit `266e88c05` (`0.1.dev24216+g266e88c05`) from the image
70
- `vllm/vllm-openai@sha256:904520f3fefc32414abcedf6ba8dadc9c5978db1bcdaf40f58d6b9036ef30a99`.
71
- The target checkpoint is `moonshotai/Kimi-K3.1-Pro` revision
72
- `d9e99b0792a5e93b78ea9bea62a68167e36ddd9e`; the draft revision is
73
- `e4e6e6261e9f8b6d5f249f9627eb6b109d762d5f`.
74
 
75
  ```bash
76
  VLLM_KIMI_K3_AUX_ATTN_RES_STREAM=0 \
77
  vllm serve moonshotai/Kimi-K3.1-Pro \
78
- --revision d9e99b0792a5e93b78ea9bea62a68167e36ddd9e \
79
- --served-model-name kimi31-eval \
80
  --host 127.0.0.1 --port 19142 \
81
  --trust-remote-code \
82
  --tensor-parallel-size 8 \
@@ -88,157 +51,52 @@ vllm serve moonshotai/Kimi-K3.1-Pro \
88
  --gpu-memory-utilization 0.90 \
89
  --no-enable-prefix-caching \
90
  --per-request-spec-decode-metrics summary \
91
- --speculative-config '{"method":"dspark","model":"Inferact/Kimi-K3.1-Pro-DSpark","revision":"e4e6e6261e9f8b6d5f249f9627eb6b109d762d5f","num_speculative_tokens":7,"draft_sample_method":"probabilistic","rejection_sample_method":"block","enable_adaptive_verification":false}'
92
  ```
93
 
94
- The server command uses the tested public-dataset acceptance configuration. For the full MRCR histories, set `--max-model-len 294912`. The Kimi auxiliary features use the `prefix_only` stream selected by `VLLM_KIMI_K3_AUX_ATTN_RES_STREAM=0`.
95
-
96
- ### Evaluation settings
97
-
98
- | Setting | Value |
99
- | --- | --- |
100
- | Hardware | One node with 8 NVIDIA B300 SXM6 GPUs, TP8 |
101
- | Target precision | Native MXFP4 checkpoint, BF16 compute dtype, FP8 E4M3 KV cache |
102
- | Draft precision | BF16 weights |
103
- | Speculation | 7 proposed tokens; probabilistic drafting and block rejection; adaptive verification disabled |
104
- | Execution | CUDA graphs enabled; prefix caching disabled |
105
- | Client | OpenAI-compatible chat completions through AIPerf 0.13.0 |
106
- | Sampling | Temperature 1.0, `top_p=0.95`, `chat_template_kwargs={"enable_thinking":true}` |
107
- | Output cap | 4,096 tokens per request |
108
- | Acceptance concurrency | 64 client requests |
109
- | Server context | 65,536 tokens for the public and qualitative suites; 294,912 for MRCR |
110
- | Evaluator | Speculators PR #1322, commit `6e4ba6581335e345228d288c17cfe4e9c198db37` |
111
-
112
- Acceptance length is pooled over successful requests and includes the verifier's bonus token:
113
-
114
- `acceptance_length = 1 + sum(accepted_draft_tokens) / sum(verification_steps)`
115
-
116
- Draft acceptance rate is `sum(accepted_draft_tokens) / sum(proposed_draft_tokens)`. Each per-position rate is the fraction of verification steps that accept at least that many draft tokens. The metrics below describe speculative acceptance and serving performance.
117
-
118
- ### Acceptance results
119
-
120
- All **3,881 model calls** in the final seven acceptance exports completed successfully, with zero request errors and speculative metrics recorded for every successful call.
121
-
122
- | Benchmark | Successful calls | Acceptance length | Draft acceptance |
123
- | --- | ---: | ---: | ---: |
124
- | GSM8K | 1,319 | 5.4765 | 63.95% |
125
- | HumanEval | 164 | 4.6091 | 51.56% |
126
- | MBPP | 500 | 4.3054 | 47.22% |
127
- | MATH-500 | 500 | 4.3700 | 48.14% |
128
- | MT-Bench | 160 | 3.3662 | 33.80% |
129
- | SPEED-Bench qualitative | 1,138 | 3.2690 | 32.41% |
130
- | MRCR, 8 needles | 100 | 4.7564 | 53.66% |
131
-
132
- MT-Bench contains 80 conversations with 160 sequential model calls. SPEED-Bench qualitative contains 880 conversations with 1,138 model calls. Follow-up turns include the model's preceding live response. MBPP uses the 500-example test split. MRCR uses 100 examples from `openai/mrcr`, `8needle/*.parquet`, with each complete source history preserved.
133
-
134
- #### Per-position draft acceptance
135
 
136
  Positions 1–7 refer to the proposed draft tokens. Rates are percentages of verification steps.
137
 
138
- | Benchmark | Position 1 | Position 2 | Position 3 | Position 4 | Position 5 | Position 6 | Position 7 |
139
- | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
140
- | GSM8K | 90.79% | 80.90% | 71.13% | 62.04% | 54.24% | 47.36% | 41.20% |
141
- | HumanEval | 84.84% | 70.66% | 58.00% | 47.65% | 39.22% | 32.76% | 27.78% |
142
- | MBPP | 83.35% | 67.16% | 53.49% | 42.42% | 34.08% | 27.48% | 22.55% |
143
- | MATH-500 | 83.68% | 67.92% | 54.83% | 44.05% | 35.32% | 28.42% | 22.78% |
144
- | MT-Bench | 75.64% | 53.97% | 37.84% | 26.45% | 18.86% | 13.64% | 10.23% |
145
- | SPEED-Bench qualitative | 74.85% | 52.57% | 36.13% | 24.87% | 17.31% | 12.29% | 8.89% |
146
- | MRCR, 8 needles | 91.57% | 80.85% | 64.94% | 49.47% | 37.12% | 28.66% | 23.05% |
147
-
148
- ### Long-context acceptance
149
-
150
- The MRCR 8-needle run completed all 100 requests. Input lengths ranged from **143,045 to 280,102 tokens** with a 294,912-token server context limit and a 4,096-token output cap. The final run had zero context-limit failures.
151
-
152
- The rows below retain the evaluator's prompt-length bins. The largest observed input was 280,102 tokens.
153
-
154
- | Prompt-length bin, tokens | Successful calls | Acceptance length | Draft acceptance |
155
- | --- | ---: | ---: | ---: |
156
- | 131073-262144 | 89 | 4.7448 | 53.50% |
157
- | 262145-524288 | 11 | 4.8481 | 54.97% |
158
-
159
- ### Throughput and interactivity
160
-
161
- The tables below show the completed vLLM measurements at concurrency 1, 4, 8, 16, and 32. Each value averages all three exported trials. Each trial uses a 30-second warmup and a 100-second measurement with zero grace period, streamed chat completions, sequential dataset sampling, and server token counts.
162
-
163
- The throughput server uses TP8, the same target and draft revisions, seven draft tokens, probabilistic drafting, block rejection, adaptive verification disabled, prefix caching disabled, temperature 1.0, `top_p=0.95`, and the 4,096-token output cap. Its server context is 294,912 tokens, maximum scheduled sequences 32, maximum batched tokens 16,384, and GPU memory utilization 0.85.
164
-
165
- Interactivity is `1000 / mean_inter_token_latency_ms`. Throughput is aggregate output throughput in tokens per second. Both statistics are averaged over the three trials before computing the reciprocal for interactivity.
166
-
167
- | Dataset | C1 | C4 | C8 | C16 | C32 |
168
- | --- | ---: | ---: | ---: | ---: | ---: |
169
- | GSM8K | 335.7 | 861.7 | 1,290.0 | 1,856.7 | 2,130.2 |
170
- | HumanEval | 302.0 | 752.2 | 1,107.1 | 1,596.0 | 1,886.2 |
171
- | MBPP | 284.3 | 711.1 | 1,059.0 | 1,486.8 | 1,702.3 |
172
- | MATH-500 | 277.4 | 680.5 | 1,048.6 | 1,440.4 | 1,689.5 |
173
- | MT-Bench | 217.8 | 523.2 | 802.2 | 1,053.5 | 1,168.2 |
174
-
175
- Table values are output tokens per second. C denotes concurrent client requests.
176
-
177
- Interactivity, in tokens per second per stream:
178
-
179
- | Dataset | C1 | C4 | C8 | C16 | C32 |
180
  | --- | ---: | ---: | ---: | ---: | ---: |
181
- | GSM8K | 399.0 | 252.1 | 189.0 | 135.7 | 128.6 |
182
- | HumanEval | 327.7 | 210.0 | 158.5 | 114.1 | 110.8 |
183
- | MBPP | 305.4 | 200.0 | 155.4 | 110.5 | 109.9 |
184
- | MATH-500 | 357.6 | 226.9 | 168.3 | 121.6 | 118.4 |
185
- | MT-Bench | 238.2 | 151.1 | 124.5 | 89.4 | 86.2 |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
186
 
187
- ### Reproducing the evaluations
188
-
189
- From Speculators commit `6e4ba6581335e345228d288c17cfe4e9c198db37`, the GSM8K acceptance invocation is:
190
-
191
- ```bash
192
- python scripts/evaluate/evaluate.py acceptance \
193
- --dataset gsm8k \
194
- --model kimi31-eval --url http://127.0.0.1:19142 \
195
- --tokenizer builtin \
196
- --extra-inputs '{"temperature":1.0,"top_p":0.95,"max_completion_tokens":4096,"chat_template_kwargs":{"enable_thinking":true}}' \
197
- --request-count 1319 --num-conversations 1319 \
198
- --concurrency 64 --request-timeout-seconds 900 \
199
- --output-artifact-dir ./results/gsm8k
200
- ```
201
-
202
- For MRCR, use the 294,912-token server context and:
203
-
204
- ```bash
205
- python scripts/evaluate/evaluate.py acceptance \
206
- --dataset mrcr \
207
- --model kimi31-eval --url http://127.0.0.1:19142 \
208
- --tokenizer builtin \
209
- --extra-inputs '{"temperature":1.0,"top_p":0.95,"max_completion_tokens":4096,"chat_template_kwargs":{"enable_thinking":true}}' \
210
- --dataset-filter needles=8 --dataset-filter max_samples=100 \
211
- --dataset-filter revision=f4c69fae7cf81f7ca26b9fee34b392a50f6b8a1d \
212
- --request-count 100 --num-conversations 100 \
213
- --concurrency 64 --request-timeout-seconds 3600 \
214
- --output-artifact-dir ./results/mrcr
215
- ```
216
-
217
- For each throughput dataset, use the throughput server settings above and:
218
-
219
- ```bash
220
- python scripts/evaluate/evaluate.py speedup \
221
- --dataset gsm8k \
222
- --model kimi31-eval --url http://127.0.0.1:19142 \
223
- --tokenizer builtin \
224
- --extra-inputs '{"temperature":1.0,"top_p":0.95,"max_completion_tokens":4096,"chat_template_kwargs":{"enable_thinking":true}}' \
225
- --concurrency 1,4,8,16,32 --num-profile-runs 3 \
226
- --warmup-duration 30 --benchmark-duration 100 \
227
- --benchmark-grace-period 0 \
228
- --no-profile-run-disable-warmup-after-first \
229
- --request-timeout-seconds 900 --no-auto-plot --no-gpu-telemetry \
230
- --output-artifact-dir ./results/throughput-gsm8k
231
- ```
232
-
233
- Repeat the speedup command with `humaneval`, `mbpp`, `math500`, and `mtbench`, using a fresh artifact directory for each invocation. SPEED-Bench qualitative used the prepared input with SHA-256 `e9bbbe998472b79501ed79ba2bf126e58b63e153a6deef70ce2b63ea7a4de845`.
234
 
235
- Dataset sources and pinned revisions:
236
 
237
- | Dataset | Source | Revision |
238
- | --- | --- | --- |
239
- | GSM8K | `openai/gsm8k` | `740312add88f781978c0658806c59bc2815b9866` |
240
- | HumanEval | `openai/openai_humaneval` | `7dce6050a7d6d172f3cc5c32aa97f52fa1a2e544` |
241
- | MBPP | `google-research-datasets/mbpp` | `4bb6404fdc6cacfda99d4ac4205087b89d32030c` |
242
- | MATH-500 | `HuggingFaceH4/MATH-500` | `6e4ed1a2a79af7d8630a6b768ec859cb5af4d3be` |
243
- | MT-Bench | `HuggingFaceH4/mt_bench_prompts` | `e3a795c5e9a82ee40611c416b8a7786c73198991` |
244
- | MRCR | `openai/mrcr`, `8needle/*.parquet` | `f4c69fae7cf81f7ca26b9fee34b392a50f6b8a1d` |
 
35
  - **Client:** chat completions, temperature 1.0, top_p 0.95, full test set per benchmark.
36
  - **Metric:** acceptance length = 1 + accepted draft tokens / drafts (counts the bonus token).
37
 
38
+ ## Serving with vLLM
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
 
40
  ```bash
41
  VLLM_KIMI_K3_AUX_ATTN_RES_STREAM=0 \
42
  vllm serve moonshotai/Kimi-K3.1-Pro \
 
 
43
  --host 127.0.0.1 --port 19142 \
44
  --trust-remote-code \
45
  --tensor-parallel-size 8 \
 
51
  --gpu-memory-utilization 0.90 \
52
  --no-enable-prefix-caching \
53
  --per-request-spec-decode-metrics summary \
54
+ --speculative-config '{"method":"dspark","model":"Inferact/Kimi-K3.1-Pro-DSpark","num_speculative_tokens":7,"draft_sample_method":"probabilistic","rejection_sample_method":"block","enable_adaptive_verification":false}'
55
  ```
56
 
57
+ ## Per-position draft acceptance
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
  Positions 1–7 refer to the proposed draft tokens. Rates are percentages of verification steps.
60
 
61
+ | Benchmark | Prompts | Max tokens | Acceptance length | Position 1 | Position 2 | Position 3 | Position 4 | Position 5 | Position 6 | Position 7 |
62
+ | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
63
+ | GSM8K | 1,319 | 1,024 | **5.566** | 91% | 82% | 72% | 64% | 56% | 49% | 43% |
64
+ | HumanEval | 164 | 1,024 | 4.660 | 86% | 71% | 59% | 49% | 40% | 34% | 28% |
65
+ | MBPP | 974 | 1,024 | 4.376 | 84% | 68% | 55% | 44% | 35% | 28% | 23% |
66
+ | MATH-500 | 500 | 2,048 | 4.445 | 84% | 69% | 56% | 45% | 37% | 30% | 24% |
67
+ | SPEED-Bench low entropy | 302 | 1,536 | 3.619 | 78% | 58% | 42% | 31% | 23% | 17% | 13% |
68
+ | SPEED-Bench coding | 80 | 4,096 | 4.159 | 81% | 64% | 50% | 40% | 32% | 27% | 22% |
69
+ | MT-Bench | 80 | 1,024 | 3.393 | 76% | 54% | 38% | 27% | 20% | 14% | 11% |
70
+ | SWE-bench Pro | 642 | 2,048 | 3.302 | 75% | 53% | 37% | 26% | 18% | 13% | 9% |
71
+ | AIME 2026 | 30 | 4,096 | 3.429 | 77% | 56% | 40% | 28% | 20% | 14% | 10% |
72
+ | **Pooled** | — | — | **3.864** | **79%** | **61%** | **46%** | **35%** | **27%** | **21%** | **17%** |
73
+
74
+ ## SpeedBench acceptance
75
+
76
+ | Category | Conversations | Model calls | Max tokens | Acceptance length | Draft acceptance |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  | --- | ---: | ---: | ---: | ---: | ---: |
78
+ | Coding | 80 | 89 | 4,096 | 4.0957 | 44.22% |
79
+ | Humanities | 80 | 88 | 4,096 | 3.0354 | 29.08% |
80
+ | Math | 80 | 98 | 4,096 | 3.2025 | 31.46% |
81
+ | QA | 80 | 80 | 4,096 | 3.4800 | 35.43% |
82
+ | RAG | 80 | 105 | 4,096 | 4.2890 | 46.99% |
83
+ | Reasoning | 80 | 190 | 4,096 | 3.5954 | 37.08% |
84
+ | STEM | 80 | 86 | 4,096 | 3.1874 | 31.25% |
85
+ | Writing | 80 | 84 | 4,096 | 2.8243 | 26.06% |
86
+ | Multilingual | 80 | 80 | 4,096 | 4.0903 | 44.15% |
87
+ | Summarization | 80 | 80 | 4,096 | 4.1758 | 45.37% |
88
+ | Roleplay | 80 | 158 | 4,096 | 3.0310 | 29.01% |
89
+ | **Pooled** | **880** | **1,138** | **4,096** | **3.2690** | **32.41%** |
90
+
91
+ ## Long context acceptance
92
+
93
+ | Benchmark | Prompts | Prompt tokens | Max tokens | Acceptance length | Position 1 | Position 2 | Position 3 | Position 4 | Position 5 | Position 6 | Position 7 |
94
+ | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
95
+ | AA-LCR | 100 | 95K mean | 1,024 | **3.935** | 81% | 64% | 49% | 37% | 27% | 21% | 15% |
96
+ | BEAM 128K | 400 | 97K–125K | 2,048 | 3.516 | 78% | 58% | 41% | 29% | 20% | 14% | 10% |
97
+ | BEAM 1M | 700 | 826K–1.04M | 2,048 | 3.421 | 77% | 56% | 40% | 28% | 19% | 13% | 9% |
98
 
99
+ ### Throughput and interactivity
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
 
101
+ ![image](https://cdn-uploads.huggingface.co/production/uploads/67f401f4bb5b52cdad90f9a7/ZmNQ856m60NFuGr-4ioRU.png)
102