Skip to content

Use NVFP4 draft vocabulary shards for Qwen3.8 tensor parallelism - #66

Merged
eugr merged 1 commit into
mainfrom
fix/qwen38-tp2-draft-head
Oct 23, 2026
Merged

eugr merged 1 commit into
mainfrom
fix/qwen38-tp2-draft-head

Conversation

@eugr

@eugr eugr commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Qwen3.8 MTP uses an NVFP4 vocabulary head at TP=1, but its tensor-parallel path projects draft logits through BF16 shards. Prepare an NVFP4 copy of each draft vocabulary shard and select it in the existing vocabulary projection and gather.

The target decoder, prompt scoring, and speculative verification retain their original BF16 weights. This change adds no kernel, transport, runtime-policy, or package-schema changes. Existing packages remain usable; re-export is required to use NVFP4 draft shards. Each shard has its own quantization scale, so draft logits need not be identical to TP=1.

Validation

  • 12 passed on nvspark2 (GB10), using base a773e688 plus this change: tests/recipes/test_qwen38_mtp.py and test_quantized_draft_shards_preserve_logits_under_compiled_replay.
  • The CUDA regression test runs two and four logical vocabulary shards sequentially on one GPU with exactly representable NVFP4 weights. It checks row counts 1 and 4, alternating graph shapes, untouched output tails, unchanged BF16 weights, and allocation stability. It does not test multi-node TP=4 collectives.
  • A complete TP=2 package for nvidia/Qwen3.8-Flash-Next-FP4-Local was exported and served with MTP on nvspark2/nvspark1, two 128 GB DGX Sparks. Serving concurrency was capped at 8. Across four benchmark cases, all 14 measured and warmup requests completed without errors.

Performance

The native TP=2 service comparison used base bcf7177d with and without this change, the same native binary, AIPerf concurrency 1, and the speed_bench_coding dataset.

Measurement BF16 draft shards NVFP4 draft shards
Adaptive decode, disk tables 44.67 tokens/s 52.38 tokens/s (+17.3%)
Mean inter-token latency, disk tables 22.50 ms 19.28 ms
Fixed five-draft GPU round, RAM tables 68.79 ms 59.72 ms (-13.2%)

Adaptive cases used three measured requests and one warmup each, with output length 8192. Fixed cases used two measured requests and one warmup each, with output length 1024. Generated completion lengths and adaptive verification widths differed. GPU-round counters include warmup; AIPerf throughput and latency include measured requests only.

Full-model export and service measurements were not repeated with base a773e688; the focused tests above passed with that base.

Prepare an NVFP4 proposal-head copy for each tensor-parallel rank and pass
it through the existing vocabulary projection and gather. This extends
the TP=1 draft-head policy to sharded execution. The target decoder,
prompt scoring, and speculative verification retain their BF16 weights.
Package metadata is unchanged; packages need re-export to use the
quantized draft shards.

Validation: 12 focused Qwen MTP and CUDA projection tests pass on GB10
with base a773e68. Compiled replay covers two and four logical shards
on one GPU, row counts 1 and 4, shape transitions, untouched output tails,
immutable BF16 weights, and allocation stability.

A TP=2 package exported with base bcf7177 and this change served on two
128 GB DGX Sparks with MTP and a server concurrency limit of 8. All 14
benchmark and warmup requests completed without errors. Adaptive decode
measured 44.67 to 52.38 tokens/s; completion lengths differed. Full-model
export and service were not repeated with base a773e68; multi-node TP=4
was not tested.

Design-Signed-Off-By: Codex (GPT-6); design-review=6aeb
@eugr
eugr merged commit e63a1de into main Oct 23, 2026
1 of 2 checks passed
@eugr
eugr deleted the fix/qwen38-tp2-draft-head branch October 23, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant