ZICQ
中 Log in / Sign up
Newsroom Compute & Architecture #SGLang #ERNIE 5.5 Flash #Low-Latency Decoding #MoE #Speculative Decoding

SGLang Optimizes ERNIE 5.5 Flash Decoding to 1,074 Tokens/s on Four SM100 GPUs

Avatar of Mr.Xu

By Mr.Xu Compiled & Reviewed by Editorial

Published:

中文阅读 (Chinese) English Version
Co-reading Select any sentence in the article to highlight, annotate, or copy a quote card. Join discussion ↓

Summary:The Baidu ERNIE and SGLang teams jointly optimized low-latency decoding for ERNIE 5.5 Flash. On four SM100 GPUs with batch size 1, a 55K-token prompt and 1K generated tokens, the final configuration uses TP4 for both attention and MoE. It reaches 1,074 tokens/s with a simulated mean DSpark acceptance length of 5.5, and about 1,310 tokens/s with block size 7 and a simulated acceptance length of 7.2. The implementation combines fine-grained FP8 GEMMs, W4A8 routed-expert weights, operator fusion,


Core Result

The Baidu ERNIE and SGLang teams jointly optimized the low-latency decoding path for ERNIE 5.5 Flash. The final configuration runs on four SM100 GPUs with a batch size of 1, a 55K-token input and 1K generated tokens, using four-way tensor parallelism for both attention and MoE. With DSpark configured using a simulated mean acceptance length of 5.5, end-to-end decoding reaches 1,074 tokens/s. Increasing the DSpark block size to 7 and simulating an acceptance length of 7.2 raises the result to about 1,310 tokens/s.

These figures represent decoding throughput under a specific hardware, context-length and low-concurrency configuration. They are not aggregate request throughput and cannot replace TTFT, TPOT or tail-latency measurements. More importantly, the speculative acceptance lengths are simulated rather than measured from production traffic, so real-world performance still depends on the draft distribution, candidate acceptance rate and verification overhead.

Why Low-Batch Decoding Hits a Latency Wall

Autoregressive decoding depends on the output of the previous step. At BS=1, only a small number of tokens participate in each matrix operation. FLOPs grow much more slowly than weight reads, arithmetic intensity collapses, and the workload shifts from compute-bound to being dominated by HBM bandwidth, scheduling and cross-GPU communication.

A simplified view of the optimization target is: tokens/s ≈ effective accepted tokens per step ÷ step latency. Ordinary decoding normally commits one token per step. Speculative decoding verifies multiple candidates in parallel, increasing the number of useful tokens produced per forward pass. At the same time, the engine must compress the per-step critical path, which consists of three main categories of overhead: HBM waits for model weights, fixed costs such as kernel launches and synchronization, and communication latency from multi-GPU cooperation.

As matrix dimensions shrink, the latter two categories occupy an increasing share of step time. Adding compute does not help if the GPU is waiting for weights, synchronization or a collective.

Moving from DP and EP to TP

Parallelism choices for low latency cannot simply follow choices optimized for aggregate throughput. With data parallelism, the low-concurrency attention work is not spread effectively across ranks, leaving some devices waiting for the most heavily loaded rank. MoE expert parallelism generally requires cross-device exchanges before and after expert computation, and uneven routing makes the slowest GPU determine layer latency.

Four-way tensor parallelism shards attention computation, weight reads and expert weights across all four GPUs, giving each rank a more balanced serial workload. For MoE, TP only needs to reduce expert outputs, reducing communication volume and synchronization compared with EP while avoiding the routing skew that makes one expert rank the bottleneck.

The trade-off is that TP still requires collectives and divides matrix operations into smaller pieces, making custom kernels more important. TP4 is appropriate for the BS=1 latency target discussed here. For high-concurrency serving, GPU utilization or aggregate throughput, DP, EP and larger batches may remain preferable.

Fine-Grained GEMMs and W4A8

Blackwell's FP8 UMMA instructions target large matrix blocks. When combined with TMA, conventional tiling can become too coarse for the small matrices produced by TP4 and low-token decoding, leaving some SMs idle while memory bandwidth is underused.

SGLang emulates a finer m16n8k32 MMA partition so that more SMs can participate. When fewer than eight tokens are present, swapAB maps the token dimension to N to reduce padding. In an official microbenchmark with a 2048×1024 GEMM, six tokens and PDL enabled on both sides, execution time falls from 4.30 to 2.23 microseconds, up to 1.9 times faster than DeepGEMM's FP8 path. This is a local kernel result and should not be interpreted as a 1.9× end-to-end model speedup.

For routed experts, where weight reads dominate, the implementation adopts W4A8: FP4 expert weights with FP8 activations. This halves weight traffic relative to FP8 and directly shortens the bandwidth-bound read phase. It applies to routed-expert weights, not the entire model in 4-bit arithmetic. Production users still need to evaluate quantization error, operator coverage, routing stability and output quality rather than treating the memory reduction as a free speedup.

Operator Fusion, Communication Overlap and PDL

Inference contains many operators with little arithmetic work but separate launch costs and intermediate activation reads and writes. The implementation fuses adjacent operations such as Norm, RoPE and merge. The teams report that this removes thousands of kernel launches and associated HBM round trips from each decoding step. At low concurrency, eliminating a small kernel launch can matter more than optimizing its floating-point arithmetic.

Cross-GPU communication is folded into neighboring compute kernels. With symmetric memory, communication becomes a small number of remote writes at the tail of the adjacent compute kernel; arrival is signaled by the data itself, avoiding a separate collective library and explicit synchronization. This approach remains dependent on GPU topology, memory domains and collective implementations, so the same gain may not carry over to different clusters.

Multi-stream execution schedules independent work in parallel while capping the SM allocation of off-critical-path kernels so they do not steal resources from the main path. Nearly every forward kernel also uses PDL, or Programmatic Dependent Launch, overlapping the launch and teardown of adjacent kernels. The cost is greater scheduling complexity: excessive streams can create contention, and PDL benefits depend on hardware behavior and the actual dependency graph.

Sparse-Attention Dataflow

ERNIE 5.5 Flash uses HCA and MLA-DSA sparse structures, with HCA present in more than 80% of its layers. Its attention path also includes VHA post-mix low-rank post-processing for cross-head interaction and gated attention for model quality.

In a conventional implementation, the current layer's query waits for keys and values from both the sliding-window cache and the compressor. The compressor generates new compressed keys and values only after accumulating a full compression block, so sparse indexing and compressed-state work can enter the serial path of every layer and token. The restructuring aims to execute those sparse operations outside the main critical path and return only the results required by the current post-processing stage.

This can reduce waiting, but it also complicates the scheduler, cache management and dependency analysis. The benefit depends on compression-block size, window hit rate, index-maintenance cost and whether the new dataflow adds extra memory traffic.

MegaLLMoE and One-Pass mHC

MegaLLMoE organizes the low-latency MoE path as a megakernel, reducing separate operator launches and intermediate materialization around expert dispatch. Its primary value is a shorter expert path rather than a change to the model's mathematical computation. The corresponding trade-offs are higher register pressure, more difficult occupancy tuning and increased maintenance complexity.

ERNIE 5.5 Flash uses mHC to maintain multiple residual streams across layers. One-Pass mHC uses bilinear expansion to combine the otherwise serial residual updates into a single forward traversal, keeping the streams from becoming successive critical-path stages. Bilinear expansion may increase intermediate tensor and register pressure, so numerical-equivalence tests, occupancy and end-to-end latency are all necessary before accepting the design.

DSpark Speculative Decoding

DSpark verifies multiple candidate tokens in parallel within one forward pass. This increases useful output per step and raises arithmetic intensity in a workload that would otherwise underutilize matrix hardware. An acceptance length of 5.5 means that verification advances by several output positions on average and is central to the reported 1,074 tokens/s.

With block size 7 and a simulated acceptance length of 7.2, the result reaches about 1,310 tokens/s. Larger candidate blocks also require more verification compute, temporary storage and rejection handling. Production measurements should track the real mean acceptance length, rejected-token ratio, verification-kernel time, TPOT distribution and tail latency. Feeding an ideal acceptance length into the benchmark without accounting for verification overhead overstates operational gains.

Performance Evidence and Its Limits

The disclosed setup is relatively specific: four SM100 GPUs, BS=1, a 55K input, 1K output tokens, and TP4 for both attention and MoE. The performance curve follows merge order: the first point uses a naive DP/EP implementation, TP4 is used from the second point onward, and measurements after DSpark is enabled use a simulated mean acceptance length of 5.5.

This is best interpreted as a system-integration trajectory rather than a rigorous one-change-at-a-time ablation. Kernel, communication and scheduling changes enter the critical path together, preventing clean attribution to any single optimization. The core disclosure also does not cover TTFT, p50/p99 latency, inter-token-latency distributions, peak memory, power, output quality, real acceptance-length distributions, alternative GPUs or concurrency levels. The 1,074 and 1,310 tokens/s figures therefore cannot be directly compared with measurements taken under a different framework, batch size or hardware configuration.

Deployment Guidance for Developers

  1. Validate hardware and topology first: The target path is built around SM100 and TP4. Confirm the GPU model, NVLink or equivalent interconnect, symmetric-memory support and collective implementation match the reported setup.
  2. Calibrate DSpark with real traffic: Sweep block sizes and draft configurations while recording actual mean acceptance length, rejection rate and verification cost. Do not substitute a fixed simulated acceptance length for the production distribution.
  3. Measure multiple latency classes: Record TTFT, TPOT, p95/p99 latency, jitter and first- versus last-token behavior alongside end-to-end tokens/s. Fast steady-state decoding can otherwise hide slow startup or tail behavior.
  4. Validate W4A8 quality: Evaluate perplexity, task metrics, long-context retrieval and tool-use stability with routed-expert quantization, and retain a fallback path that can disable the affected precision mode.
  5. Test beyond batch size 1: This work explicitly targets a low-concurrency critical path. Sweep batch size, request length and concurrency to ensure TP4 does not lose aggregate throughput under load because of communication or poor small-matrix utilization.
  6. Separate prefill from decode: A 55K prompt affects prefill, KV Cache, memory footprint and time to first token. Profile the two stages independently and verify that the bottleneck really sits in decoding.

Source: LMSYS / SGLang Blog (2026-11-23)

— END —

Tags: #SGLang #ERNIE 5.5 Flash #Low-Latency Decoding #MoE #Speculative Decoding

Editorial & Fact-Checking Note: This article is compiled from primary research, official release documentation, and source papers by the ZICQ Newsroom pipeline with automated entity verification and human editorial review. If you notice any technical inaccuracy, please submit a correction via our corrections policy or email our editorial desk directly.

What's your take on this story?
Explore & Submit Works

Community Comments

Loading live comments and annotations…