⚡ Up to 5.1x faster K2-Horizon-32B inference with DSpark speculative decoding (55 --> 284 tokens/sec)

#7
by rasyosef - opened

K2-Horizon-32B-DSpark

Model Link: https://huggingface.co/rasyosef/K2-Horizon-32B-DSpark

A lossless DSpark draft model for IFM/K2-Horizon-32B-NVFP4, trained with speculators (training code).

  • 5.09× faster on math, 4.33× on RAG, and 3.75× on code (temperature 0)
  • Mean acceptance length 4.12 (block size 8)

Usage

vllm serve IFM/K2-Horizon-32B-NVFP4 --port 8000 \
  --trust-remote-code \
  --reasoning-parser k2_horizon \
  --max-model-len 32768 \
  --speculative-config '{"model": "rasyosef/K2-Horizon-32B-DSpark", "num_speculative_tokens": 8}' \
  --override-generation-config '{"temperature": 0}'

For tool use, add --enable-auto-tool-choice --tool-call-parser k2_horizon.

Details

  • Qwen3-style, 4 layers, ~1B params, bfloat16, block size 8
  • Hidden size 5120, MLP 8192, 40 query / 8 KV heads (head dim 128)
  • First 3 layers sliding-window (512), last full attention
  • Draft vocab 32,000 (from 250,624); aux hidden states from verifier layers 2/16/32/48/62
  • 100,000 Open PerfectBlend prompts with verifier-generated responses, seq length 8192
  • 3 epochs, lr 3e-4, cosine (4% warmup), loss {"ce": 0.1, "tv": 0.9}
  • Trained on a single NVIDIA RTX PRO 6000 Blackwell Server Edition (96 GB)

Evaluation

RedHatAI/speculator_benchmarks, temperature 0, single NVIDIA RTX PRO 6000 Blackwell, concurrency 1.

Throughput (tokens/s)

Mean output throughput. Baseline is K2-Horizon-32B-NVFP4 without speculative decoding.

subset baseline (no drafter) DSpark (this model) speedup
math_reasoning 55.8 284.2 5.09×
rag 54.4 235.3 4.33×
HumanEval 55.3 207.1 3.75×

Acceptance at temperature 0

acceptance_length is mean tokens committed per verification step, including the bonus token (max 9.0 at block size 8).

subset acceptance_length pos_0 pos_1 pos_2 pos_3 pos_4 pos_5 pos_6 pos_7
math_reasoning 5.911 89.8% 79.3% 69.8% 62.0% 55.5% 49.8% 44.9% 40.1%
rag 4.926 82.4% 67.8% 57.6% 48.2% 42.4% 37.1% 31.6% 25.5%
writing 4.258 76.2% 58.6% 46.4% 38.5% 32.9% 28.6% 24.7% 20.0%
HumanEval 4.215 80.8% 62.7% 48.4% 37.9% 30.2% 24.6% 20.3% 16.7%
question 4.143 75.1% 57.0% 44.9% 37.2% 31.4% 27.0% 23.1% 18.7%
qa 4.112 75.9% 58.7% 47.1% 37.8% 29.6% 23.9% 20.8% 17.4%
tool_call 3.589 72.3% 53.2% 39.9% 30.1% 22.8% 17.2% 13.4% 9.9%
translation 3.014 67.2% 45.8% 31.2% 21.2% 14.6% 10.0% 6.9% 4.5%
summarization 2.716 66.9% 42.1% 26.6% 16.5% 9.6% 5.5% 2.9% 1.4%

Weighted across all subsets: 4.117 over 309,840 verification steps.

Limitations

Only works with K2-Horizon-32B; trained and evaluated against the NVFP4 checkpoint (the BF16 checkpoint was not tested). Sampling, concurrent load, and contexts beyond 8K tokens were not evaluated.

License

Apache 2.0

Sign up or log in to comment