Qwen3-4B DSpark Speculator (Block Size 16, Tulu 3 subset)
This repository contains a DSpark speculative decoding draft model trained for
Qwen/Qwen3-4B. It proposes up to 16
tokens per decoding iteration and is intended for use with the
vllm-project/speculators
implementation and vLLM.
This is an experimental checkpoint trained only on the Tulu 3 subset
(tulu3_Qwen3-8B.jsonl, ~936k rows) of the
inference-optimization/Qwen3-8B-Regenerated-Collection
dataset — roughly 26% of the full 13-file mixture — for 4 epochs, matching the
full-mix baseline's total step count within ~14%. It is not trained with
D-PARD.
Model details
- Architecture: DSpark draft model
- Verifier:
Qwen/Qwen3-4B - Speculative block size: 16
- Draft transformer layers: 5
- Verifier hidden-state layers: 1, 9, 17, 25, 33
- Markov head: vanilla, rank 256
- Confidence head: enabled with Markov features
- Default proposal method: greedy
- Precision: bfloat16
- Draft vocabulary size: 151,936
- Parameters file size: 1.23 GB
Training
The model was trained from the speculators repository at commit
1c800f2b053bcd538fc11bf49ec843d4dfa81a95 with vLLM db9527a46873454610df6dbedf79a36d6bf1a7f6.
- Data:
tulu3_Qwen3-8B.jsonlonly — 939,343 source lines → 935,683 prepared rows (3.27B tokens, mean sequence length 3,494) - Epochs: 4 — 64,831 steps/epoch → 259,362 global steps
- World size: 6
- Sequence length: 8,192 (multipacked), max anchors 1,024
- Optimizer: Muon (Muon LR 3e-3)
- Learning rate: 6e-4
- Weight decay: 0
- Scheduler: cosine with 4% warmup
- Seed: 42
- Loss:
0.1 * CE + 0.9 * TV, fused implementation - Position weighting: fixed exponential decay, gamma 7.0
speculators: 0.10.0a0- Training vLLM: 0.31.0
- Transformers: 5.17.0
- PyTorch: 2.13.0+cu130
- Wall time: ~2d 15.5h on 6× GPUs
The complete invocation is included in train_command.txt; the exact
environment and step-by-step reproduction commands are in
reproduce_tulu3_b16.sh. Per-epoch validation metrics are archived in
val_metrics_history/.
Final validation metrics (epoch 3, tulu3-only val split)
| Metric | Value |
|---|---|
| Loss | 0.3110 |
| Cross-entropy loss | 0.4544 |
| Total-variation loss | 0.1103 |
| Acceptance rate | 0.6628 |
| Acceptance length | 7.1495 |
| Full accuracy | 0.6815 |
Note: the validation split is a random 10% of this run's own (tulu3-only) data, so these values are not comparable to models trained on the full mixture.
Speculator benchmark results
The checkpoint was evaluated with the speculator_benchmarks acceptance eval
(9 subsets, temperature 0 and Qwen3-4B default sampling, maximum generation
length 128, up to ~200-400 requests per category), serving with
vllm serve Qwen/Qwen3-4B --spec-model <this checkpoint> --spec-tokens 16 --spec-method dspark.
Temperature 0 (greedy)
| Category | Acceptance length |
|---|---|
| HumanEval | 5.380 |
| Math reasoning | 7.110 |
| QA | 3.612 |
| Question | 4.419 |
| RAG | 4.694 |
| Summarization | 3.615 |
| Tool call | 4.163 |
| Translation | 6.164 |
| Writing | 4.352 |
| Weighted overall | 4.611 |
Qwen3-4B default sampling (temp 0.6 / top_p 0.95 / top_k 20)
| Category | Acceptance length |
|---|---|
| HumanEval | 5.406 |
| Math reasoning | 7.004 |
| QA | 3.509 |
| Question | 4.200 |
| RAG | 4.374 |
| Summarization | 3.574 |
| Tool call | 4.082 |
| Translation | 6.013 |
| Writing | 4.227 |
| Weighted overall | 4.501 |
The weighted overall is computed as
1 + total accepted speculative tokens / total draft iterations. Full
per-position results: acceptance_temp0.csv, acceptance_defaulttemp.csv.
For context, the full-mix baseline (same recipe, all 13 dataset files, 1 epoch) reaches 4.69 at temperature 0 — this checkpoint matches it within ~2% using ~26% of the training data.
Usage
Use this repository as the speculative model for Qwen/Qwen3-4B through a
version of vLLM and speculators that supports DSpark (speculators
0.10.0a0, vLLM 0.31.0). The verifier model and tokenizer must remain
Qwen/Qwen3-4B, and the configured speculative-token count is 16:
vllm serve Qwen/Qwen3-4B \
--spec-model MeganEFlynn/Qwen3-4B-speculator-tulu3-b16.dspark \
--spec-tokens 16 --spec-method dspark
Limitations
- This is a research checkpoint for speculative decoding, not a standalone language model.
- It inherits the behavior, limitations, and license considerations of the verifier model.
- Acceptance and speedup depend on prompts, hardware, batch size, vLLM version, and serving configuration.
- Trained on a tulu3-only data subset; acceptance on out-of-distribution domains may differ from the benchmark results above.