Skip to content
Friendly disclaimer: flozi00 TechHub is a solo side-project next to a full-time job — personal learning notes, no official statements. Verify critical steps yourself.

GLM-5.3 MTP on B300: Acceptance Math and NCCL NVLS

A worked example of MTP acceptance-rate math for GLM-5.3-style serving, plus documented changes to NVLS failure behavior across NCCL versions.

5 min readflozi00
llm-inferencespeculative-decodingmtpb300nccl
Skip to the full article
Watch · explore · understand

Why more draft tokens may not be faster

Follow MTP acceptance and the separate communication path between GPUs.

AI-assisted learning visualization · schematic article explanation

Step 1 / 4Propose and verify

MTP proposes future tokens. The target model checks them; rejecting an early proposal prevents accepting the later draft positions.

SystemCurrent stepSelect a block to explain it
MTP draft
Propose several possible next tokens.
Target verification
Keep only the accepted prefix of the draft.
Useful output
Expected tokens depend on acceptance at every position.
  1. MTP draft Target verification
    proposals
  2. Target verification Useful output
    accepted prefix
What to remember

Tokens per verification step and tokens per second answer different questions.

The article’s acceptance table uses illustrative inputs. NVLS failure behavior is release-specific, not a universal fallback guarantee.

Terms and the complete walkthrough
MTP
Multi-token prediction: proposing several future tokens.
Conditional acceptance
Acceptance assuming that all earlier proposals were accepted.
NVLS
An NCCL communication path using NVLink SHARP reductions.
  1. Propose and verify

    MTP proposes future tokens. The target model checks them; rejecting an early proposal prevents accepting the later draft positions.

  2. Count conditional acceptance

    Reaching a later draft token requires accepting every earlier one. More proposals therefore do not add the same number of useful output tokens.

  3. Include the fabric

    NCCL coordinates GPU communication; NVLS is one possible reduction path. Check the installed version and a small communication probe before assuming this path works.

  4. Optimize elapsed time

    Divide useful output by the measured time of the whole step. A deeper draft helps only if its extra accepted tokens justify the added work.

All connections

  • MTP draft → Target verification: proposals
  • Target verification → Useful output: accepted prefix
  • MTP draft → Time the complete step: draft cost
  • NCCL and NVLS → Time the complete step: communication cost
  • Target verification → Time the complete step: verification cost
  • Useful output → Choose draft depth: useful work
  • Time the complete step → Choose draft depth: elapsed time
Set your own pace. Pause at any time or select a step directly.

Multi-token prediction (MTP) is an acceptance-and-cost problem. This article uses a GLM-5.3 deployment on eight B300 GPUs (Blackwell Ultra, sm_103)1 as a configuration example. The rates in the worked table are illustrative inputs, not measurements. It also describes documented NVLink-SHARP (NVLS) behavior across NCCL versions.

The setup

The GLM MTP head ships inside the checkpoint - one extra prediction layer, not a separate draft-model download. GLM-5.3's published configuration declares a sparse-attention MoE (GlmMoeDsaForCausalLM), a 1,048,576-token context limit, and one MTP prediction layer2. vLLM (speculative_config={"method": "mtp", "num_speculative_tokens": k})3 and SGLang (--speculative-algorithm NEXTN)4 can use it. The vLLM GLM-5.3 recipe shows an eight-GPU FP8 setup with TP=8, MTP k=5, and --kv-cache-dtype fp8_e4m3; a separate NVFP4 variant quantizes routed experts while retaining BF16 in attention, shared experts, and dense layers5. These are documented configurations, not results from a benchmark in this repository.

Acceptance math: tokens per step, not throughput

Acceptance probabilities determine the expected token count per verification step; draft and verifier costs also determine throughput. Expected tokens per step is not k plus one. If aja_j is the probability of accepting draft position jj conditional on all earlier positions being accepted, then the probability of accepting through position ii is pi=∏j=1iajp_i=\prod_{j=1}^{i}a_j. The framework is speculative decoding as introduced by Leviathan, Kalman and Matias: draft tokens are verified against the target model, and accepted tokens are resampled under the target distribution6:

E[tokens per step]=1+∑i=1k∏j=1iaj  =  1+∑i=1kpi\mathbb{E}[\text{tokens per step}] = 1 + \sum_{i=1}^{k} \prod_{j=1}^{i} a_j \;=\;1+\sum_{i=1}^{k}p_i

vLLM's log_stats lines can report Mean acceptance length, accepted-vs- drafted token counts, and Per-position acceptance rate7. The following joint probabilities pip_i are hypothetical. They illustrate the arithmetic and must not be used as a GLM-5.3 performance claim:

kexample joint probabilitiesE[accepted]tokens/stepshare of k=5
10.720.721.7248%
20.72, 0.581.302.3064%
30.72, 0.58, 0.481.782.7877%
40.72, 0.58, 0.48, 0.442.223.2289%
50.72, 0.58, 0.48, 0.44, 0.402.623.62100%

On this example chain, k=2 yields ~64% of the k=5 tokens per step, k=3 ~77%. These ratios are not speedup measurements. They depend on the per-position rates your workload actually produces. Public measurements show a spread across datasets and positions for GLM MTP models, and the vLLM recipe for the smaller GLM-4.5 recommends num_speculative_tokens 1 for optimal throughput on that model8; the GLM-5.3 recipe shows k=5 as a configuration example5.

Deeper speculation buys marginal tokens while every draft position adds cost:

  • Wasted verify work: a rejected draft still consumed a verify slot.
  • Discarded later drafts: when a position is rejected, later positions in that draft cannot be accepted. Their generation and verification can consume work without adding output tokens.
  • KV-cache pressure: num_speculative_tokens reserves KV entries for draft positions per request; vLLM docs recommend starting small3.

Depth is a per-workload decision driven by measured acceptance - public benchmarks find acceptance varies wildly across datasets, requests, and positions8. Measure first, then set k - the log_stats lines named above are the measurement.

NVLS failure behavior depends on NCCL version

NVLS initialization failures have not always produced the same outcome: some NCCL releases fall back to another collective, while others return an error. Check the behavior of the installed release.

The mechanism, from the documentation:

  • NVLS is NVLink SHARP: in-network reduction offloaded into the NVSwitch domain; NCCL supports it since 2.17 on third-gen NVSwitch with Hopper or later9.
  • Fallback in NCCL 2.27.3: NCCL_NVLS_ENABLE defaults to 2 (auto-detect). That release added graceful fallback when NVLS initialization fails; setting NCCL_NVLS_ENABLE=1 preserved an error instead10.
  • A documented hard failure in NCCL 2.29.7: issue #2077 reports multicast-slot exhaustion on an eight-H200 system. The reporter observed a fatal ncclUnhandledCudaError with NVLS enabled and a successful run with NCCL_NVLS_ENABLE=0. The report describes a 128-slot hardware limit; it does not establish the behavior of every NVLS failure on every NCCL release11.
  • The stack below NCCL is version-locked: Fabric Manager checks the loaded kernel driver stack at initialization and aborts on mismatch; HGX B200/B300 nodes (fourth-gen NVSwitch) additionally require the NVLSM service, from the driver-branch-matched nvidia-open and nvlink5 packages12. The fabric stack moves as a set by NVIDIA's own packaging.

The working rules that follow from the documentation:

  1. Pin driver + fabric-manager + NCCL as a set - FM is version-locked to the driver by design12.
  2. Probe with a tiny all-reduce benchmark before blaming the serving stack.
  3. Use NCCL's INFO logs, including the relevant collective and NVLS debug subsystems when available, to inspect algorithm selection13; confirm the result with the measured probe rather than assuming the fast path.

Transferable rule: verify the fast path and the failure behavior on the installed NCCL version.

Notes on output fidelity

Exact speculative decoding with the appropriate verifier and rejection sampling preserves the target model's output distribution6. It does not promise the same token sequence as a separate stochastic target- only run. Any serving implementation must be checked for the exactness assumptions used by that result.

Footnotes

  1. NVIDIA CUDA GPU compute capability table - B300 (Blackwell Ultra) is compute capability 10.3 (sm_103); SM120 is the separate consumer/workstation Blackwell family (RTX 50-series, 12.0): https://developer.nvidia.com/cuda/gpus ↩

  2. Z-AI, GLM-5.3 model card and published config.json: GlmMoeDsaForCausalLM, max_position_embeddings=1048576, num_nextn_predict_layers=1. https://huggingface.co/zai-org/GLM-5.3 ; https://huggingface.co/zai-org/GLM-5.3/blob/main/config.json ↩

  3. vLLM MTP documentation (speculative_config, num_speculative_tokens): https://docs.vllm.ai/en/latest/features/speculative_decoding/mtp/ ↩ ↩2

  4. SGLang speculative decoding parameter reference - --speculative-algorithm NEXTN (an alias of EAGLE): https://docs.sglang.io/docs/advanced_features/speculative_decoding ↩

  5. vLLM Recipes, zai-org/GLM-5.3 - flagship FP8-B200 recipe: TP=8, MTP k=5, fp8_e4m3 KV; NVFP4 Blackwell variant (experts-only NVFP4): https://recipes.vllm.ai/zai-org/GLM-5.3 ↩ ↩2

  6. Yaniv Leviathan, Matan Kalman, Yossi Matias, "Fast Inference from Transformers via Speculative Decoding" (arXiv:2211.17192, ICML 2023) - speculative-decoding framework; verification leaves the output distribution unchanged: https://arxiv.org/abs/2211.17192 ↩ ↩2

  7. vLLM speculative-decoding metrics implementation: the per-position counter divided by draft count is an unconditional, joint-prefix acceptance rate; mean acceptance length includes the bonus token: https://github.com/vllm-project/vllm/blob/main/vllm/v1/spec_decode/metrics.py ↩

  8. Xiaoxuan Liu, Jiaxiang Yu, Jongseok Park, Ion Stoica, Alvin Cheung, "Speculative Decoding: Performance or Illusion?" (arXiv:2601.11580) - MTP on GLM-4.5-Air-106B: k=3 speedup 1.3-1.8x on H100; acceptance varies wildly across positions, requests, and datasets; vLLM Recipe for zai-org/GLM-4.5 - num_speculative_tokens 1 recommended for optimal throughput on GLM-4.5: https://specdecode-bench.github.io/ https://recipes.vllm.ai/zai-org/GLM-4.5 ↩ ↩2

  9. NVIDIA NCCL user guide - NCCL_NVLS_ENABLE (default 2, auto-detect): https://docs.nvidia.com/deeplearning/nccl/archives/nccl_2283/user-guide/docs/env.html ↩

  10. NCCL 2.27.3 release notes - graceful NVLS fallback: https://docs.nvidia.com/deeplearning/nccl/release-notes/rel_2-27-3.html ↩

  11. NCCL issue #2077 (NVIDIA/nccl tracker) - reporter's H200/NCCL 2.29.7 reproduction of 128 NVSwitch multicast-slot exhaustion and fatal error; NCCL_NVLS_ENABLE=0 worked around that case: https://github.com/NVIDIA/nccl/issues/2077 ↩

  12. NVIDIA Fabric Manager user guide - FM checks the loaded kernel driver stack at initialization and aborts on mismatch; HGX B200/B300 (fourth-gen NVSwitch) requires the NVLSM service from nvidia-open/nvlink5 packages: https://docs.nvidia.com/datacenter/tesla/fabric-manager-user-guide/index.html ↩ ↩2

  13. NVIDIA NCCL logging guide, including collective and NVLS subsystems: https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/troubleshooting/logging.html ↩