NVIDIA unveiled an optimization for video and world model attention on RTX Blackwell. It reuses GPU storage for intermediate values to reduce stalls. Developers can apply the released kernels, code run on GPUs, to supported model layers.

1. Fast 4-bit operations still leave gaps between computations

Video generation attention is limited by BF16 matrix multiplication throughput on RTX Blackwell. Its tensor cores, units dedicated to matrix math, differ from data center GPUs. This makes data center processing pipelines hard to port directly.

NVFP4 is a Blackwell hardware feature for 4-bit matrix multiplication. It can boost tensor core throughput. Yet sequential softmax, which converts scores to weights, data movement, and storage can leave units idle. This optimization fills those gaps.

2. Put the next computation in storage freed by finished scores

SageAttention3, the optimization target, uses NVFP4 for both attention score and output computations. To handle softmax results clustered in a narrow range, it rescales values in two stages before 4-bit quantization, or encoding with fewer bits.

The original design used nearly all registers, the GPU's fast internal storage. It could not easily hold a full next tile alongside the current one. The optimization splits scores in half, quantizes one half, then stores the next tile's scores there.

Rather than adding a workbench, it reuses the finished half first. It interleaves the current tile's remaining work with the next tile's computation. Softmax state updates still cover the entire current score tile. Here is an excerpt of the pseudocode.

      # Convert the current score half into packed NVFP4 probabilities.
      Probability0 = Exponentiate_And_NVFP4_Quantize(ScoreSlot0)

      # ScoreSlot0 is now dead. Reuse those same registers for QK belonging
      # to the next N tile-no second complete score allocation is needed.
      ScoreSlot0 = Execute_QK_OMMA_N64(Q, K[NextTile, 0:64], delta_s[NextTile, 0:64],)

3. Up to 1.64x faster in kernel comparisons with identical inputs

Reactor's measurements, presented by NVIDIA, compared original and optimized kernels with identical inputs and settings. The table shows results by input length and mask. A causal mask prevents attention to later positions.

Table: Original and optimized NVFP4 attention kernel latency

Conditions: NVIDIA RTX PRO 6000 Blackwell Server Edition 96GB (SM120), batch size 1, 24 heads, head dimension 128, equal query/key lengths. 7,040 tokens: LongLive capture; others: synthetic. Inputs, packed tensors, and log-sum-exp settings match. Log-sum-exp is the log of accumulated exponentials. Input quantization and output stride restoration, restoring spacing between data elements, are excluded.

Units: latency in ms, speedup in x

Kernel latency by input and maskLongLive 7,040 / non-causal: Original latency 0.75052, Optimized latency 0.63548; LongLive 7,040 / causal: Original latency 0.44992, Optimized latency 0.37927; Synthetic 4,096 / non-causal: Original latency 0.28962, Optimized latency 0.23190; Synthetic 4,096 / causal: Original latency 0.21199, Optimized latency 0.16087; Synthetic 8,192 / non-causal: Original latency 1.00177, Optimized latency 0.85648; Synthetic 8,192 / causal: Original latency 0.76466, Optimized latency 0.46659; Synthetic 16,384 / non-causal: Original latency 3.80862, Optimized latency 3.25377; Synthetic 16,384 / causal: Original latency 2.20630, Optimized latency 1.78152Original latencyOptimized latencyLongLive 7,040 / non-causal0.750520.63548LongLive 7,040 / causal0.449920.37927Synthetic 4,096 / non-causal0.289620.23190Synthetic 4,096 / causal0.211990.16087Synthetic 8,192 / non-causal1.001770.85648Synthetic 8,192 / causal0.764660.46659Synthetic 16,384 / non-causal3.808623.25377Synthetic 16,384 / causal2.206301.78152
Kernel latency by input and mask
Up to 1.64x faster in kernel comparisons with identical inputs
Input tokens / maskOriginal latencyOptimized latencySpeedup
LongLive 7,040 / non-causal0.750520.635481.18
LongLive 7,040 / causal0.449920.379271.19
Synthetic 4,096 / non-causal0.289620.231901.25
Synthetic 4,096 / causal0.211990.160871.32
Synthetic 8,192 / non-causal1.001770.856481.17
Synthetic 8,192 / causal0.764660.466591.64
Synthetic 16,384 / non-causal3.808623.253771.17
Synthetic 16,384 / causal2.206301.781521.24

The company reported a peak 1.64x speedup for 8,192 synthetic tokens with a causal mask. Runs were warmed up and repeated across three fresh processes per implementation, alternating order. Scheduling alone can shorten core work without extra score buffers.

4. Real-model gains varied with coverage

The company reported that Reactor's live-service LongLive latency for 32 frames at 704×1280 fell from 5.13 to 4.79 seconds. NVFP4 covered self-attention and cached history. The BF16 baseline used native cuDNN attention running directly on the device. Timing included quantization, memory layout conversion, and decoded CPU frame output.

The company reported that OmniDreams' camera-motion run generating 2,045 frames in 256 chunks fell from 155.92 seconds with BF16 to 132.00 seconds, a 15.34% improvement. NVFP4 covered self-attention and cached history. After warmup, timing covered full generation and CPU frame decoding, excluding model loading and transfer. This model used one process per scenario and method.

This approach reduces idle time without extra score buffers, but lower-bit values require checking output quality against BF16. Real models use NVFP4 for only some attention, leaving other attention and weights in BF16. Coverage thus affects total latency gains.

5. Apply the released kernels and validate at model level

The optimization core was merged into FlashInfer's main development branch, a working branch of evolving code. NVIDIA advises fetching code with submodules, components that include other repositories' code, and following source installation instructions. Then integrate it into supported RTX Blackwell attention layers. Afterward, compare total latency and output quality against the BF16 baseline.

The key is to reclaim used storage first rather than allocate more, reducing computation stalls on RTX Blackwell.