NVIDIAYang LiuProblem & solution
3 Ways to Boost MoE Inference on NVIDIA DGX Spark
Summary
Mixture-of-experts inference on NVIDIA DGX Spark is memory-bound, with weight reads dominating execution time in batch-size-1 decoding. Three techniques address this bottleneck: Humming MXFP4 MoE kernels use NVRTC to compile specialized CUBINs at runtime for the model’s specific shapes, improving routed-expert computation. Online FP8 quantization of the LM head halves the weight-read volume for the vocabulary projection layer, enabled by SGLANG_ENABLE_FP8_LM_HEAD=1. Multi-token prediction speculative decoding with NEXTN drafts and verifies multiple tokens per round, reducing the number of decode steps. On GSM8K, the combined optimizations increase decode throughput by 42.5% and reduce mean latency by 24.5% without statistically detectable accuracy change; however, enabling MTP with online FP8 LM head requires the draft model to share the full LM-head module to avoid silently degraded performance.
Context
Inference of Ling-3.0-flash on NVIDIA DGX Spark is memory-bound; weight reads dominate execution time, especially in the MoE computation and vocabulary projection layer.
Approach / What changed
Applying three optimizations: replacing the flashinfer_mxfp4 MoE backend with Humming (runtime-compiled MXFP4 kernels that specialize for actual dimensions), enabling online FP8 quantization on the LM head via SGLANG_ENABLE_FP8_LM_HEAD=1 to halve weight-read volume, and enabling MTP speculative decoding with NEXTN (three draft steps, four-token verification window) to reduce decode steps. The combined configuration requires the draft model to share the full LM-head module with the target, not just the weight tensor, to avoid a silent fallback that degrades throughput below the baseline.
Takeaways
Humming MoE backend uses NVRTC to compile kernels at runtime for actual dimensions, improving throughput by 9.3% over FlashInfer with CUTLASS on NVIDIA DGX Spark.
Online FP8 quantization of the LM head halves weight-read volume in the vocabulary projection layer, adding 11.4% throughput gain when combined with Humming.
MTP speculative decoding with NEXTN reduces decode steps, but its benefit depends on accept length; a silent fallback occurs when FP8 LM head quantization is enabled without sharing the full LM-head module, leading to lower throughput than baseline.
FAQ
How does Humming differ from FlashInfer CUTLASS for MoE kernels?
Humming uses NVRTC to compile specialized CUBINs at runtime for the actual M/N/K dimensions and GPU architecture, rather than using pre-compiled CUTLASS targets. This allows faster compilation (seconds vs tens of minutes) and specialization for specific model shapes.
What is the integration issue when combining online FP8 LM head and MTP speculative decoding?
The draft model must share the full LM-head module with the target, not just the weight tensor. Without the correct interface, the framework interprets FP8 weights as BF16, accept length drops to 1.00, and throughput becomes lower than the unoptimized baseline.
How much does the combined optimization improve throughput on real workloads vs synthetic?
On GSM8K, decode throughput increased by 42.5% and mean latency decreased by 24.5%, while a synthetic workload showed 185.1% throughput gain due to repetitive outputs and greedy decoding.
Source and freshness
- Source
- developer.nvidia.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.