Views
No views yet
| Setting | Value |
|---|---|
| Training epochs | 5 |
| Optimizer steps | 6,891 |
| Global batch size | 128 |
| Maximum sequence length | 32,768 |
| Learning rate | 5e-5, cosine schedule |
| Warmup | 4% |
| Loss objective | Decayed DSpark loss, gamma=4.0 |
| Token loss weights | Cross-entropy=0.1, L1=0.9 |
| Confidence-head loss weight | 1.0 |
| Draft layers | 5 |
| Target hidden-state layers | 7, 31, 47, 63, 87 |
| Speculative tokens | 7 |
acc_len, defined as 1 + accepted_draft_tokens / draft_steps.
Higher is better. Evaluation used num_speculative_tokens=7 and Kimi-K3 thinking mode.| Benchmark | Samples | Greedy draft, t=0 | Probabilistic draft, t=1.0, top_p=0.95 |
|---|---|---|---|
| GSM8K | 1,319 | 5.464 | 5.290 |
| HumanEval | 164 | 4.954 | 4.555 |
| SPEED-Bench coding | 80 | 4.299 | 4.024 |
| SPEED-Bench RAG | 80 | 3.533 | 3.475 |
| SPEED-Bench multilingual | 80 | 3.452 | 3.503 |
| MATH-500 | 500 | 3.254 | 3.201 |
| SPEED-Bench QA | 80 | 3.113 | 3.017 |
| MT-Bench | 80 | 3.047 | 2.864 |
| SPEED-Bench writing | 80 | 2.722 | 2.589 |
| AIME 2026 | 30 | 2.572 | 2.352 |
/v1/chat/completions with:1{
2 "thinking": true,
3 "thinking_effort": "max"
4}1export TOKENSPEED_DFLASH_AUX_STREAM=attn_res
2
3tokenspeed serve moonshotai/Kimi-K3 \
4 --served-model-name moonshotai/Kimi-K3 \
5 --tensor-parallel-size 16 \
6 --distributed-executor-backend ray \
7 --trust-remote-code \
8 --max-model-len 131072 \
9 --gpu-memory-utilization 0.92 \
10 --speculative-config '{"method":"dspark","model":"lightseekorg/kimi-k3-dspark","num_speculative_tokens":7,"attention_backend":"FLASHINFER_MLA","draft_sample_method":"greedy","rejection_sample_method":"block"}' \
11 --host 0.0.0.0 \
12 --port 8000"draft_sample_method":"greedy" for temperature-zero workloads. For sampled
generation, launch a separate endpoint with "draft_sample_method":"probabilistic".
The draft sampling method is a server-level setting.attn_res) has been applied and before the following pre-normalization. Set
TOKENSPEED_DFLASH_AUX_STREAM=attn_res; using another residual stream changes the
draft model's input distribution.fc_norm. Each collected hidden-state tap must
pass through its corresponding fc_norm before the five taps are concatenated and
passed to the linear context projection. Skipping this step is incompatible with the
training contract.1@misc{cheng2026dspark,
2 title={DSpark: Confidence-Scheduled Speculative Decoding with Semi-Autoregressive Generation},
3 author={Xin Cheng and others},
4 year={2026},
5 eprint={2607.05147},
6 archivePrefix={arXiv},
7 primaryClass={cs.AI},
8 url={https://arxiv.org/abs/2607.05147}
9}
10
11@misc{torchspec2026,
12 title={TorchSpec: An Online Speculative Decoding Training Framework},
13 url={https://github.com/torchspec-project/TorchSpec},
14 year={2026}
15}