Views
No views yet
RadixArk/Qwen3.8-27B-DSpark
with one line changed in config.json so that vLLM loads it.1- "architectures": ["DSparkDraftModel"]
2+ "architectures": ["Qwen3DSparkModel"]vllm/model_executor/models/qwen3_dspark.py
plus a DSpark speculator have been in main for a while. But the registry has two
DSpark entries:1"DSparkDraftModel": ("vllm.models.deepseek_v4", "DSparkDeepseekV4ForCausalLM"),
2"Qwen3DSparkModel": ("qwen3_dspark", "Qwen3DSparkForCausalLM"),DSparkDraftModel, which routes to the
DeepSeek-V4 class. vllm/config/speculative.py then rewrites model_type to
deepseek_v4, and loading fails. Declaring Qwen3DSparkModel selects the Qwen3
implementation instead.dflash_config (target_layer_ids,
mask_token_id, projector_type), markov_rank, enable_confidence_head,
confidence_head_with_markov, layer_types, head_dim — is already exactly
what Qwen3DSparkForCausalLM expects.1vllm serve /path/to/Qwen3.8-27B-GPTQ-Int4 \
2 --dtype bfloat16 \
3 --max-model-len 16384 \
4 --max-num-seqs 16 \
5 --gpu-memory-utilization 0.90 \
6 --kv-cache-dtype fp8 \
7 --block-size 64 \
8 --trust-remote-code \
9 --speculative-config '{
10 "method": "dspark",
11 "model": "/path/to/Qwen3.8-27B-DSpark-vLLM",
12 "num_speculative_tokens": 7,
13 "draft_sample_method": "probabilistic"
14 }'0.26.1rc1.dev799 XPU backend, V2
model runner. Target: Qwen3.8-27B GPTQ-Int4 (W4A16). Benchmarked with
llama-benchy --pp 4096.| Config | t/s (tg32) | Mean acceptance |
|---|---|---|
| no speculation | 28 | — |
| Qwen3.8 built-in MTP, k=2 | 50 | ~2.8 |
| DSpark, k=7, greedy | 42 | 1.94 – 2.67 |
| DSpark, k=7, probabilistic | 52 | 2.45 – 2.79 |
0.76, 0.45, 0.31, 0.14, 0.10, 0.02, 0.00"draft_sample_method": "probabilistic". It measured ~23% faster than
greedy on otherwise identical settings (52 vs 42 t/s). Greedy exact-match is a
much harsher acceptance criterion than the sampling the published figures used.enable_adaptive_verification does not work with Qwen3.8. Its GDN
linear-attention layers use GDNAttentionBackend, which vLLM rejects at startup:ValueError: Adaptive verification trims verification requests on device, which
the GDNAttentionBackend attention backend does not support.| Prompt type | Mean acceptance length |
|---|---|
| general prose / instruction | 2.18 |
| step-by-step math reasoning | 4.79 |
tg32 benchmark suggests.Qwen3.8-27B-FP8, and heavier quantisation perturbs the very hidden states it
learned to read. GPTQ-int4 measured 2.45–2.79 here, but that isn't a like-for-like
comparison with the published 3.39 (different sampling method and workloads).
MXFP4 and AWQ are untested.fc expects 5 × 5120 and taps layer indices
up to 52, so other sizes in the family will not load.