A
DSpark speculative-decoding draft model for
Qwen/Qwen3-8B, trained with
TorchSpec.
Same engine, same prompts; only the draft is added. Speculation helps most at low concurrency (latency-bound) and still helps when batched (compute-bound).
1# With DSpark speculation
2vllm serve Qwen/Qwen3-8B \
3 --speculative_config '{"method":"dspark","model":"Dogacel/Qwen3-8B-DSpark","num_speculative_tokens":7,"attention_backend":"FLASH_ATTN","draft_sample_method":"probabilistic"}' \
4 --gpu-memory-utilization 0.8
5
6# No-speculation baseline
7vllm serve Qwen/Qwen3-8B --gpu-memory-utilization 0.8
1# Download SPEED-Bench into the current directory first:
2curl -LsSf https://raw.githubusercontent.com/NVIDIA-NeMo/Skills/refs/heads/main/nemo_skills/dataset/speed-bench/prepare.py | python3 -
3
4# Batched (concurrency 32, all coding prompts)
5vllm bench serve --model Qwen/Qwen3-8B \
6 --dataset-name speed_bench --dataset-path . --speed-bench-category coding \
7 --num-prompts -1 --disable-shuffle --max-concurrency 32 \
8 --temperature 1.0 --speed-bench-output-len 2048 \
9 --backend openai-chat --endpoint /v1/chat/completions --skip-chat-template
10
11# Single-stream (concurrency 1; fewer prompts to keep it short)
12vllm bench serve --model Qwen/Qwen3-8B \
13 --dataset-name speed_bench --dataset-path . --speed-bench-category coding \
14 --num-prompts 16 --disable-shuffle --max-concurrency 1 \
15 --temperature 1.0 --speed-bench-output-len 2048 \
16 --backend openai-chat --endpoint /v1/chat/completions --skip-chat-template
Training of this model is not fully complete, however this can serve as a checkpoint for verifying implementation of DSpark for various inference engines. For more details refer to the implementation PR:
https://github.com/lightseekorg/TorchSpec/pull/129
Training run on 4xB200.
Firstly follow instructions in
https://github.com/lightseekorg/TorchSpec to setup TorchSpec.
1python scripts/tools/prepare_perfectblend.py --output data/perfectblend_50k.jsonl --sample-size 50000
2python -m torchspec.train_entry --config configs/sglang_qwen3_8b_dspark.yaml \
3 model.target_model_path=Qwen/Qwen3-8B \
4 dataset.train_data_path=data/perfectblend_50k.jsonl
The released weights were converted from the FSDP checkpoint to HuggingFace format with:
1python tools/convert_to_hf.py \
2 --input-dir ./outputs/qwen3-8b-dspark-perfectblend/checkpoints/iter_0011803/ \
3 --config torchspec/config/dspark_draft_config.json