←新闻详情

LMSYS Blog更新于 10月14日 12:13

MiniMax-H3 在 8×H200 上的 SGLang Diffusion 加速实测:无损 1.95×,最高 6.24×

MiniMax-H3 on 8×H200: 1.95× Lossless, Up to 6.24× at 0.76–0.91 SSIM - LMSYS Org

AI 导读

LMSYS 在 8× NVIDIA H200 上用 SGLang Diffusion 对 MiniMax-H3 视频生成做了基准测试:稠密无损路径比 Diffusers 快 1.85–1.95×,叠加步复用与稀疏注意力后最高达 6.24×,平均 SSIM 0.76–0.91。最快配置 SubBlock 0.80 + Cache-DiT stride 在 5s/10s T2VA 上为 5.06×/5.72×,FL2VA 为 5.86×/6.24×;质量优先可选 Cache-DiT(最高 2.99×,SSIM 0.90–0.92),均衡档 SubBlock 0.75 + Cache-DiT stride 为 4.90–5.93×、SSIM 0.79–0.90。

正文

当前显示原文,中文全文译文尚未就绪。

Contents

TL;DR

We benchmarked MiniMax-H3 video generation on 8× NVIDIA H200 with SGLang Diffusion, holding prompts, seeds, resolution, frame rate, and denoising steps fixed across six workloads.

SGLang's dense, lossless path is 1.85–1.95× faster than Diffusers with no approximation: the same denoising work, on a faster runtime; Stacking step reuse and sparse attention reaches up to 6.24×, at 0.76–0.91 mean SSIM. The fastest tested profile, SubBlock 0.80 + Cache-DiT stride, delivers 5.06×/5.72× on 5 s/10 s T2VA and 5.86×/6.24× on FL2VA. The cost is not uniform: FL2VA holds 0.85–0.91 SSIM there, while T2VA drops to 0.76–0.78; For a quality-first default, use Cache-DiT alone (up to 2.99×, mean SSIM 0.90–0.92). For a balanced trade-off, SubBlock 0.75 + Cache-DiT stride gives 4.90–5.93× at SSIM 0.79–0.90; The gains come from three layers that compose: fused kernels (2.00–12.16× on individual non-GEMM sites in isolation — microbenchmarks, not additive end-to-end), step reuse (Cache-DiT skips redundant denoising steps), and SubBlock sparse attention (NVIDIA's block-sparse forward, which cuts the cost of the steps that do run)

Scope. This comparison covers three of SGLang Diffusion's acceleration knobs. It supports more lossy paths that are not part of this run — quantization and progressive resolution among them — so the numbers here are a slice of the available envelope, not its ceiling. Everything below is measured, not projected; the clips at the end let you judge the quality cost yourself.

Background

While SGLang Diffusion already delivers a fast lossless path for MiniMax-H3, faster lossy generation of high-quality video has long been sought after by the community. Building on its long-standing stack of versatile knobs for lossy acceleration, SGLang Diffusion has been actively working on this over the past weeks; this post is the first measured account of where those knobs land.

Video diffusion is dominated by two costs: the denoising loop runs the same transformer dozens of times, and each step spends most of its budget in attention over a very long token sequence. A 5-second 1344×768 clip at 24 FPS with 50 denoising steps is far past the point where a single GPU is practical, so the question is not whether to parallelize but how much of the remaining work can be avoided.

Three accelerations attack that from different directions, and they compose:

Fused kernels cut the fixed cost of every step without changing its math; Cache-DiT reuses results between denoising steps, so some steps never run; SubBlock sparse attention reduces the cost of the steps that do run, by skipping attention blocks whose contribution is below a threshold

The first is lossless. The other two trade similarity against speed, which is why every number in this post is reported with SSIM against the lossless baseline.

At a Glance

The answer depends on the baseline. Against the matched Diffusers case, SGLang's dense, lossless path is already about 2× faster for both tasks and both durations. Cache-DiT reuses work between denoising steps, while SubBlock sparse attention reduces the cost of the steps that still run. Together they form the fastest path in this matrix.

For a quality-first accelerated default, use Cache-DiT conservative or Cache-DiT stride without SubBlock. For a balanced speed/quality trade-off, use SubBlock 0.75 + Cache-DiT stride, delivering 4.90–5.64× speedup at 5 s and 5.44–5.93× at 10 s.

The charts below summarize the aggregate benchmark tables.

Detailed Results

Every configuration in this post is reproducible with the SGLang cookbook page for MiniMax-H3, which carries the exact launch flags for each mode.

We report generation-side inference time; server startup, warmup, HTTP polling, and MP4 download time are excluded. For each task and duration, latency and SSIM are evaluated across three distinct prompts. Speedup is measured against the matching Diffusers case. SSIM is computed over all frames in YUV420 against the matching SGLang lossless video.

SGLang's dense path is the first easy win. It delivers a 1.85–1.95× speedup over Diffusers across both tasks and durations, with the workload held constant; SubBlock 0.75 + Cache-DiT stride is the balanced profile. It maintains good output quality while delivering 4.90–5.64× speedup at 5 seconds and 5.44–5.93× at 10 seconds; Stride caching adds the largest throughput gain. It reaches 3.99–4.46× on its own, compared with 2.65–2.99× for the conservative profile; FL2VA benefits slightly more from cache + sparse combinations. The fastest FL2VA case reaches 5.86×/6.24×, versus 5.06×/5.72× for T2VA; The speed–quality trade-off is clear. Conservative Cache-DiT retains 0.8986–0.9771 SSIM; the aggressive 0.80 + stride profile gives up some of that margin for the lowest latency

Where the Speedup Comes From

Three mechanisms drive the profile-level gains.

Fused kernels reduce the cost of each step that still runs. The H3 path fuses indexed AdaLN updates, gated residuals, SwiGLU activation, and QK RMSNorm with 3D RoPE, reducing intermediate tensors, memory traffic, and kernel launches. The next section reports these isolated kernel measurements; they are part of the per-step implementation, while Cache-DiT and SubBlock determine how much of that implementation is executed.

Cache-DiT attaches one DBCache context to MiniMax-H3's shared DiT block stack. After the warmup steps, it evaluates the configured boundary blocks and compares the normalized residual change with the previous cached state. If the change stays below the threshold and the consecutive-cache limit allows it, the middle blocks reuse their cached result; otherwise the stack is recomputed and the cache is refreshed. All cache modes use Fn=1, Bn=0, and four warmup steps:

conservative: shared packed-stack RDT 0.04, maximum consecutive cached steps 1; stride: shared packed-stack RDT 0.08, maximum consecutive cached steps 3

MiniMax-H3 has one MiniMaxH3DiTModel whose block stack carries packed video and audio tokens. Cache-DiT therefore makes one shared decision for the whole packed stack; it does not maintain independent video and audio caches. The worker records one combined Cache-DiT step list, and the trace legend follows that execution model.

SubBlock sparse attention reduces the KV blocks read on computed steps. It uses n_k=n_q=4; the first ten denoising steps use dense attention, and SubBlock is enabled afterward. The minimum sequence length is 4096. The matrix tests sparsity 0.75 and 0.80; the latter is faster but has lower SSIM on several T2VA cases.

The aggregate profile results show how the profiles behave end to end; they do not isolate kernel time or provide a per-step cost breakdown. The trace below is a request-level execution trace, not an operator timing measurement.

One measured 49-step trace

The workload is configured with 50 inference steps. Because the sigma schedule includes both interval endpoints, the denoising loop performs 49 model evaluations (len(sigmas) - 1); “49-step trace” refers to these model evaluations.

To make the execution pattern concrete, one 5-second T2VA request was run for six profiles: lossless, Cache-DiT conservative, SubBlock 0.75, SubBlock 0.75 + conservative Cache-DiT, Cache-DiT stride, and SubBlock 0.80 + stride. The worker recorded the actual cached_steps list for each request. Because video and audio tokens share one packed H3 block stack, a cache hit reuses the combined output; there is no separate “video cached, audio computed” state in this path. Blue cells in the SubBlock rows mark computed steps that use sparse attention after the first ten denoising steps.

The trace-run timings are 37.78 s (lossless), 26.82 s (Cache-DiT conservative), 29.97 s (SubBlock 0.75), 22.18 s (SubBlock 0.75 + conservative Cache-DiT), 17.23 s (Cache-DiT stride), and 14.34 s (SubBlock 0.80 + stride). These numbers identify the trace run; they do not replace the three-prompt aggregate medians.

The Kernel Layer

Caching determines how many denoising steps run; kernels determine how fast each computed step is. MiniMax-H3 packs video and audio tokens into one sequence, so the non-GEMM path benefits from the same basic principle throughout: less memory traffic, fewer intermediate tensors, and fewer kernel launches. AdaLN modulation and gated residuals look up parameters by token index and update the activation in one pass. SwiGLU operates directly on the fused gate_up buffer. QK RMSNorm and 3D RoPE are fused into a single kernel instead of running as separate eager operations.

The table below uses the real per-rank shape for a 5-second T2VA request at 1344×768×124 frames: 4,722 rows after SP/Ulysses-8 padding, hidden size 5,376, 56 attention heads, head dimension 128, RoPE dimension 96, and BF16 inputs. Each number is the median per-call CUDA-event time across 10 rounds of 20 calls. The baseline is the corresponding eager composition.

These are microbenchmarks of the isolated sites, not additive end-to-end latency savings. The fused QK-Norm + RoPE result uses the exact-rounding path available on main (round_norm_before_rope=True).

How SubBlock Sparse Attention Works

SubBlock is a training-free router for block-sparse attention. It divides the sequence into 64-token query and key blocks, then splits each block into four 16-token sub-blocks on both sides (n_q=n_k=4). A lightweight pooling and log-sum-exp score estimates each key block's unnormalized softmax mass for each query block and head. The router keeps the highest-scoring key blocks and passes their indices to the block-sparse attention kernel; the full attention matrix is never materialized.

The sparsity value is the fraction of key blocks allowed to be dropped, not the fraction retained. Thus sparsity=0.75 keeps roughly 25% of key blocks per query block. The more aggressive 0.80 setting is faster but has a larger approximation error budget, which is consistent with the lower SSIM observed in the most aggressive rows.

The curves below show the score distributions; the vertical lines show the medians of the per-row routing cutoffs for the two displayed budgets. Here, sparsity=0.50 is included as a diagnostic reference; the benchmark profiles use 0.75 and 0.80. Because the router ranks key blocks independently for each query block and head, sparsity=0.50 and 0.75 retain roughly the top half and top quarter of that row's available key blocks, subject to 8-block budget rounding. Across these workloads, the 0.75 budget retains most of the score mass above the row-local median while concentrating selection on the high-score tail.

The sparse path is enabled only for the long, non-causal DiT attention calls that the kernel supports: BF16 inputs, head dimension 128, and sequences of at least 4096 tokens. The first ten denoising steps use dense attention; short segments, the token refiner, and unsupported calls use the dense fallback. On H200/SM90, the selected 64×64 routing plan is executed by SGLang's CuTe block-sparse FlashAttention kernel.

Demos

The demo set contains four modes for each selected prompt:

Prompt 1 · T2VA · 5 s · three cats carrying brass instruments and playing beside a sleeping owner; Prompt 2 · T2VA · 10 s · a rainy cyberpunk city at night; Prompt 3 · FL2VA · 5 s · a clay fox continuation

The four modes are SGLang lossless, Cache-DiT conservative, SubBlock 0.75 + Cache-DiT stride, and SubBlock 0.80 + Cache-DiT stride. Filenames encode the prompt, task, mode, and duration; the SVG figures are in the same folder.

This benchmark is the result of work by several teams, and we are grateful to all of them.

SGLang Diffusion Team — wrote the first version of this post, drives the SGLang kernel work these results build on, and provides the diffusion runtime, the fused kernels, and the parallelism measured here; Ji Huang (@IPostYellow), Ant Group — ran the H200 benchmark, brought SubBlock sparse attention into SGLang Diffusion, and revised this post; Cache-DiT Team — @DefTruth and the vipshop.com team, for Cache-DiT and for support integrating its cache profiles into SGLang Diffusion; MiniMax — for open-sourcing MiniMax-H3, the model every measurement here runs on; NVIDIA — for the underlying SubBlock sparse attention support, including the block-sparse attention forward these results depend on

Measured 2026-08-18 on 8× NVIDIA H200. Reproduction details and the raw per-prompt numbers are in the benchmark repository.

来源

LMSYS Blog