arXiv(opens in a new tab)cs.CVSep 2026Cited by 2 papers on PaperVantage

Manuscript Offprint

arXiv:2609.15810

VC-Attention: Value Smoothing and Softmax Casting for Low-bit Attention

Xingyang Li, Dongyun Zou, Shining Zhang, Jiacheng Chen, Haocheng Xi, Lvmin Zhang, Jun-Yan Zhu, Song Han, Zhekai Zhang, Yujun Lin, Muyang Li

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Xingyang Li ∗2^{*2} Dongyun Zou ∗1^{*1} Shining Zhang ∗3^{*3} Jiacheng Chen 1^{1} Haocheng Xi 4^{4}

Lvmin Zhang 5^{5} Jun-Yan Zhu 1,3^{1,3} Song Han 2,6^{2,6} Zhekai Zhang 1^{1} Yujun Lin 1^{1} Muyang Li 1^{1}

1^{1}Nunchux AI 2^{2}MIT 3^{3}CMU 4^{4}UC Berkeley 5^{5}Stanford 6^{6}NVIDIA

Prompt summary: a young woman chases a crimson silk scarf down a sunlit coastal lane, in five shots... see the appendix for the full prompt. FlashAttention-4 (BF16)

Attention speedup: 1.00× (reference)

Figure

SageAttention2 (8-bit)

PSNR: 19.9 dB Attention speedup: 0.29×

Figure

VC-Attention (8-bit)

PSNR: 20.2 dB Attention speedup: 1.60× (5.5× over SageAttention2)

Figure

Figure 1: VC-Attention is faster and more faithful than prior low-bit attention. On MiniMax-H3 at 1344×768, SageAttention2 runs at 0.29× of BF16 FlashAttention-4: it ships no Blackwell kernel, so on B200 it runs a kernel written for earlier GPUs. It also distorts the motion—in the middle frame its scarf has crossed to the right of the lane, while VC-Attention keeps it on the left. VC-Attention reaches 1.60×, 5.5× faster than SageAttention2, at higher PSNR over 100 prompts (protocol in Section 4.1).

ABSTRACT

Diffusion Transformers deliver state-of-the-art video generation, but their long spatiotemporal sequences make attention the dominant deployment cost, and a deployable low-bit kernel must be accurate and fast. Accuracy is limited by outliers: a block's quantization scale is set by its largest entries, leaving typical entries confined to a narrow range of representable values. Prior work smooths queries and keys, but value outliers follow no fixed channel or spatiotemporal structure and remain the dominant source of output error. Speed is limited by softmax: low-bit Tensor Cores accelerate only the two matrix multiplications, so the high-precision exponential between them becomes the longest pipeline stage on datacenter GPUs. We propose VC-Attention, a training-free low-bit attention framework that addresses both by pairing Value smoothing with a fused probability Cast. V-Smooth reorders value tokens by lightweight online clustering, so the tokens in a hardware block quantize well together. It quantizes only the residual after subtracting the block mean, and restores that mean from the row sum the online softmax already maintains. ExpCast-FP8 maps log-domain scores directly to E4M3 probability codes with one fused multiply-add, eliminating the FP32 exponential and the format conversion. We implement VC-Attention for B200, B300, H200, RTX PRO 6000, and RTX 5090. Across Wan2.2, LongCat-Video, HunyuanVideo-1.5, and MiniMax-H3, VC-Attention improves fidelity over low-bit baselines, speeds up the attention kernel over BF16 FlashAttention-4 by 1.46–1.59× on datacenter Blackwell and Hopper and by 2.3–3.6× on workstation cards, and generates a clip 1.13–1.19× and 1.36–1.70× faster end to end.

∗^{*}Equal contribution.

1 Introduction

Video diffusion models (Ho et al., 2022; Blattmann et al., 2023) now generate high-resolution clips with coherent motion, and open-weight models such as MiniMax-H3, Wan2.2, LongCat-Video, and HunyuanVideo-1.5 (MiniMax Research, 2026; Wan Team et al., 2025; Meituan LongCat Team et al., 2025; Wu et al., 2025) approach the quality of commercial systems (Brooks et al., 2024; Polyak et al., 2024; Gao et al., 2025). These models are Diffusion Transformers (DiTs) (Peebles & Xie, 2023) that flatten the latent video into one sequence of spatiotemporal tokens and apply full self-attention at every layer.

At high resolution and long duration, attention dominates inference time. A 5-second 720p clip of Wan2.2-14B (Wan Team et al., 2025) spans about 70K tokens, and attention accounts for more than 64% of the generation time on the RTX 5090. The cost comes from the score product QK and the value product PV, whose arithmetic grows quadratically with the token count. Low-bit Tensor Cores act directly on it: FP8 doubles the dense BF16 peak on Hopper and datacenter Blackwell, and FP4 reaches eight times it on the RTX 5090 (NVIDIA Corporation, 2022; 2024; 2025).

Two obstacles stand between this peak throughput and faster video generation. The first is accuracy. A low-bit quantizer gives each block of an operand one shared scale, so the few entries far larger than the rest fix that scale for the whole block and leave every other entry with few effective bits (Xiao et al., 2023; Lin et al., 2024; Zhang et al., 2025c). These entries are the operand's outliers, and attention carries them on both sides of the softmax. The second is efficiency: peak matrix throughput becomes kernel speedup only when the quantization, the scales, and the online softmax between the two products keep the Tensor Cores busy (Shah et al., 2024; Zadouri et al., 2026). Both appear at once on video DiTs: on MiniMax-H3 at 1344×768, SageAttention2 drifts off the reference shot and still runs the attention kernel at 0.29× of BF16 FlashAttention-4 on B200 (Figure 1).

Training-free low-bit attention has concentrated on the score product. SageAttention and its successors (Zhang et al., 2025c;a;b) smooth and scale queries and keys down to INT4 and NVFP4, and FlashAttention-3 (Shah et al., 2024) applies a randomized Hadamard rotation before its FP8 path. However, once the probability error is small, the value error dominates the output error on video DiTs (Figure 3(a)). Value outliers follow no fixed channel or spatiotemporal pattern, so neither a rotation nor a static layout removes them (Section 3.1). Attn-QAT (Zhang et al., 2026) closes this gap by retraining, at the cost of model-specific data and GPU time. On the efficiency side, B200 doubles the Tensor Core throughput of Hopper but not its exponential throughput. Once both products run in FP8, the FP32 exponential and the FP32-to-FP8 cast of every probability become the longest pipeline stage (Zadouri et al., 2026; Zhang et al., 2026). Attn-QAT accordingly reports at most 1.3 times speedup over BF16 FlashAttention-4 on B200, and a slowdown once the value product is quantized on the fly. An accurate low-bit attention that converts peak throughput into real speedup on video DiTs therefore remains an open challenge.

We propose VC-Attention, a training-free low-bit attention kernel that addresses both by pairing Value smoothing with a fused probability Cast. V-Smooth restores accuracy. It groups value tokens by a lightweight online k-means and permutes keys and values together, leaving the output unchanged, then subtracts each hardware block's mean and quantizes only the residual. The mean is restored during the online recurrence from the row sum that online softmax already maintains, so no extra pass or buffer is needed. Grouping runs only on the first quarter of the denoising steps (Table 3). ExpCast-FP8 restores speed. It maps each log-domain score to its E4M3 code with one fused multiply-add, bypassing both the FP32 exponential and the FP32-to-FP8 cast. Its row-level error is bounded by 3.64% plus the underflow tail (Proposition 3.1).

We implement VC-Attention as a fused CuTe/CUDA kernel and evaluate it on four video DiTs: Wan2.2, LongCat-Video, HunyuanVideo-1.5, and MiniMax-H3. At 8 bits, VC-Attention accelerates attention over BF16 FlashAttention-4 (Zadouri et al., 2026) by 1.59× on B200 and 1.46× on H200, which is 6.02× and 1.16× over SageAttention2 (Zhang et al., 2025a). At 4 bits on workstation Blackwell, V-Smooth accelerates attention by 2.27× on the RTX PRO 6000 and 3.58× on the RTX 5090. End to end, VC-Attention generates one Wan2.2 clip 1.19× faster on B200, 1.13× on H200, 1.36× on the RTX PRO 6000, and 1.70× on the RTX 5090. At matched precision, V-Smooth is more faithful than every training-free baseline on all four models. Fusing ExpCast-FP8 trades part of that margin for speed: the fused kernel still leads every baseline on Wan2.2, LongCat-Video, and HunyuanVideo-1.5, and on MiniMax-H3 it falls within the 0.6 dB band spanned by the three

Figure

(a) Prior low-bit attention (e.g. SageAttention)

(b) VC-Attention (ours)

Figure 2: VC-Attention changes two steps of low-bit attention and leaves the rest unchanged. Both panels turn the FP32 scores S=QK⊤S = QK^\top, row maximum subtracted, into an E4M3 probability tile and multiply it by a block of values. Dark rows are outlier tokens; pale rows are their blockmates. Left (standard). An FP32 exponential precedes the cast, and values are quantized in token order, so one outlier sets its whole block's scale. Right (ours). ExpCast-FP8 writes the FP8 byte directly from SS: the multiply-add aS+baS + b ( a=8log⁡2ea = 8\log_2 e, b=120+βb = 120 + \beta) folds the E4M3 exponent scale, its bias, and the row-maximum scaling of Equation (7) into one FMA; Round is round-to-nearest-even and view reinterprets that byte as E4M3 rather than converting it ( β=−0.35\beta = -0.35 centres the log⁡2\log_2 error, Section 3.3). V-Smooth sorts tokens by kk-means label so the outliers share a block whose 16-bit mean carries their magnitude; only the pale remainder is quantized.

strongest training-free baselines. It computes attention 1.60×1.60\times faster than BF16 FlashAttention-4 and 5.5×5.5\times faster than SageAttention2 (Table 2 and Figure 1).

References (67)