Downloads · 30 days
41
40% of all-time downloads
TIE-Pilot/dspark-attnconv-block7-qwen3-4b
dspark-attnconv-block7-qwen3-4b is a machine learning model from TIE-Pilot. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
A 5-layer block-parallel speculative-decoding drafter for Qwen/Qwen3-4B. One drafter forward proposes a block of 7 tokens; the target model verifies them in a single pass.
Downloads · 30 days
41
40% of all-time downloads
All-time downloads
102
Public
Parameters
1.4B
105 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt76.9 GB · 71%
From the Hugging Face model README
A 5-layer block-parallel speculative-decoding drafter for
Qwen/Qwen3-4B. One drafter forward proposes a
block of 7 tokens; the target model verifies them in a single pass.
This is the drafter reported in arXiv:2608.27339 — the +3.83% mean serving accepted length over the released DSpark checkpoint quoted in that abstract is the temperature-1 macro figure in the table below.
Relative to a DSpark-style baseline of identical size and training budget, this drafter adds three things: an attention-style order-1 head (the predecessor-conditioned head is a real attention block rather than a low-rank bilinear form), a depthwise short convolution over the draft-horizon axis, and slot embeddings on the residual stream.
Measured against the official
deepseek-ai/dspark_qwen3_4b_block7
drafter on the same benchmark rows, same harness, same target model. τ is mean accepted
length per verify step; S is end-to-end speedup over autoregressive decoding.
| Temp 0 τ | Temp 0 S | Temp 1 τ | Temp 1 S | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Task | Rows | DSpark | Ours | DSpark | Ours | DSpark | Ours | DSpark | Ours |
| GSM8K | 500 | 6.353 | 6.523 | 4.51 | 4.64 | 6.110 | 6.322 | 4.25 | 4.36 |
| MATH-500 | 500 | 6.309 | 6.457 | 4.55 | 4.69 | 5.730 | 5.908 | 4.08 | 4.21 |
| AIME25 | 30 | 5.663 | 5.888 | 4.10 | 4.29 | 4.927 | 5.083 | 3.51 | 3.65 |
| HumanEval | 164 | 5.695 | 5.857 | 4.06 | 4.19 | 5.449 | 5.612 | 3.82 | 3.95 |
| MBPP | 256 | 5.465 | 5.587 | 3.89 | 4.00 | 5.119 | 5.323 | 3.61 | 3.75 |
| LiveCodeBench | 500 | 5.675 | 5.864 | 4.18 | 4.32 | 4.920 | 5.164 | 3.42 | 3.60 |
| MT-Bench | 80 | 3.846 | 4.003 | 2.78 | 2.92 | 3.658 | 3.810 | 2.55 | 2.69 |
| Alpaca | 500 | 3.724 | 3.851 | 2.71 | 2.81 | 3.562 | 3.732 | 2.52 | 2.62 |
| Arena-Hard-v2 | 500 | 3.755 | 3.902 | 2.76 | 2.89 | 3.286 | 3.443 | 2.36 | 2.47 |
| Macro | 3030 | 5.1650 | 5.3259 | 3.73 | 3.86 | 4.7511 | 4.9329 | 3.35 | 3.48 |
Higher on all nine tasks, at both temperatures, on both metrics. Temperature-1 acceptance averages three independent launches because sampling is stochastic: 4.9329 ± 0.0139 for ours against 4.7511 ± 0.0092 for DSpark, a relative difference of 3.83% ± 0.21 percentage points (one propagated standard error across launches).
Losslessness requires --enable-deterministic-inference. Speculative decoding is
token-exact only under deterministic reduction order. Without that flag, acceptance patterns
change which tokens are batched into each verify pass, that changes the target's reduction
order, and ties flip — so output can differ from autoregressive decoding even though the
accept/reject rule itself is exact.
The run is a single 10-epoch schedule, and this repository ships one checkpoint per epoch. Accepted length at temperature 1, measured before serving optimizations:
| Epoch | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|---|---|---|---|---|
| τ | 4.2878 | 4.5592 | 4.7001 | 4.7757 | 4.8622 | 4.8986 | 4.9221 | 4.9220 | 4.9367 | 4.9395 |
Gains flatten late: epochs 7, 9 and 10 give 4.9221, 4.9367 and 4.9395. One epoch alone already reaches 87% of the converged value, which is worth knowing before attributing a small delta to an architectural change — a 1-epoch screen cannot see a change that only pays off late.
config.json, model.safetensors epoch-10 weights, for loading directly
step_2616/ epoch 1 ┐ each: config.json,
step_5232/ epoch 2 │ model.safetensors,
... │ train_config.py,
step_26160/ epoch 10 ┘ training_state.rank0.pt
Every per-epoch directory carries its optimizer state, so training can be resumed from any
epoch boundary, and train_config.py records the exact configuration that produced it.
| Target | Qwen/Qwen3-4B (36 layers), frozen |
| Drafter | 5 layers, hidden 2560, intermediate 9728, 32 heads / 8 KV heads, head_dim 128 |
| Block size | 7 draft tokens per forward |
| Target taps | hidden states from layers 1, 9, 17, 25, 33 |
| Order-1 head | attention, rank 512, 4 heads × dim 128, MLP hidden 2048, out_scale 0.35 |
| Short conv | kernel 2, group size 16, over the draft-horizon axis |
| Slot embeddings | enabled, depth fraction 0.4 |
| Attention mask | non-causal across the draft block (is_causal=false) |
| dtype | bfloat16 |
The embedding and LM head are the target's, frozen throughout; they are included in the checkpoint so it loads standalone.
| Data | on-policy Qwen3-4B rollouts, 1,339,867 rows |
| Schedule | 10 epochs, 26,160 optimizer steps, 2,616 per epoch |
| Objective | 0.1 × cross-entropy + 0.9 × L1, the L1 term being a total-variation accept proxy |
| Anchors | 512 per step |
| LR | 6e-4, cosine over the full 26,160 steps |
| Hardware | 4 GPUs, FSDP no_shard, local batch 1 |
The objective is TV-weighted rather than pure cross-entropy on purpose. Cross-entropy to the target's argmax is a temperature-0 objective; the 0.1/0.9 mix tracks the acceptance probability itself and wins on both greedy and temperature-1 rulers.
Qwen3DSparkModel is not in transformers — this is a custom block-parallel drafter
architecture, and AutoModel.from_pretrained will not resolve it. Loading it requires the
DeepSpec training/serving code, and running it end-to-end requires an SGLang build with the
matching block-parallel speculative path. The safetensors file and config.json are
otherwise standard, so the weights can be inspected with any safetensors reader.
Note that --speculative-num-draft-tokens means different things in different speculative
backends: in the DFLASH path the flag is the block size (γ = block_size − 1, position 0
being the anchor), not the number of speculative slots. Passing the wrong convention silently
grants an extra slot and inflates accepted length.
This work is described in Beyond Parallel Blindness: Information Floors and Model Gaps in Block Drafting (arXiv:2608.27339). The paper separates a block drafter's rejection into an information floor — the minimum expected rejection at a given conditioning order — and the model gap above it, which is the part a better proposal can actually recover. The prefix-attention head in this repository is the design that distinction points to: it reads committed context conditional on the predecessor, rather than applying a context-independent predecessor correction.
@misc{qiang2026parallelblindnessinformationfloors,
title={Beyond Parallel Blindness: Information Floors and Model Gaps in Block Drafting},
author={Xinwei Qiang and Xiang Fang and Chang Chen and Zaifeng Pan and Yue Guan and Yufei Ding},
year={2026},
eprint={2608.27339},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2608.27339},
}