TL;DR
VC-Attention is a training-free, low-bit attention framework designed to accelerate Diffusion Transformers (DiTs) for video generation without sacrificing visual fidelity. By pairing an online token-clustering technique (V-Smooth) to neutralize unpredictable value outliers with a fused mathematical shortcut (ExpCast-FP8) that bypasses the costly GPU softmax exponential stage, it achieves up to a 1.59× attention speedup on datacenter GPUs and up to 3.58× on workstation cards over BF16 FlashAttention-4.
What Problem Does This Paper Address?
State-of-the-art video generation models increasingly rely on Diffusion Transformers (DiTs). Because video generation requires processing massive spatiotemporal sequences, the attention mechanism becomes the primary computational bottleneck during inference.
While low-bit quantization (e.g., FP8 or INT4) can dramatically accelerate matrix multiplications on modern Tensor Cores, two major obstacles prevent these theoretical gains from translating into real-world speedups:
- Value Outliers: Unlike queries and keys, where outliers typically concentrate in specific channels, value ($V$) outliers appear unpredictably across different tokens, layers, and time steps. Standard quantization methods fail to handle them, leading to severe motion distortion and errors in the generated video.
- The Softmax Bottleneck: As matrix multiplications get faster via low-bit precision, the high-precision (FP32) exponential calculation required by the softmax function becomes the longest pipeline stage on modern datacenter GPUs, leaving the Tensor Cores idling.
Methods
VC-Attention introduces two novel, training-free mechanisms inside a fused CUDA kernel to tackle accuracy and speed simultaneously:
1. V-Smooth (Value-Guided Token Smoothing)
To handle unpredictable value outliers, V-Smooth dynamically clusters similar value tokens using a lightweight online $k$-means algorithm. It permutes the keys and values together so that the final attention output remains mathematically unchanged. Once clustered into hardware blocks (e.g., 128 rows), the algorithm subtracts the block mean and quantizes only the well-behaved residual. Crucially, the block mean is restored during the online softmax recurrence using row sums already tracked by the kernel, requiring no extra memory passes or buffers.
2. ExpCast-FP8 (Direct Probability Encoding)
To eliminate the softmax bottleneck, the authors exploit a clever mathematical property of the E4M3 FP8 format: its byte representation is inherently logarithmic. Instead of computing a slow FP32 exponential and then casting the result down to FP8, ExpCast-FP8 uses a single fused multiply-add (FMA) operation to map log-domain scores directly to their corresponding E4M3 probability codes.
3. Fused Preprocessing and Amortized Grouping
To avoid expensive High-Bandwidth Memory (HBM) roundtrips, the entire preprocessing chain (including rotary embeddings, Hadamard rotations, and token gathering) is fused backwards into the quantization kernel. Furthermore, because attention layouts change slowly across adjacent diffusion steps, the $k$-means clustering is only run on the first 25% of denoising steps and reused across a short window, keeping the computational overhead minimal.
Datasets
The framework was evaluated using four prominent open-weight video DiT models:
- Wan2.2-T2V-A14B (720p)
- LongCat-Video (480p)
- HunyuanVideo-1.5 (720p)
- MiniMax-H3 (1344×768)
For evaluation, the authors generated 100 videos per model using text prompts from the MovieGen Bench dataset.
Key Insights and Ideas
- Value Outliers are Spatial, Not Channel-Wise: Traditional quantization techniques use rotations (like Hadamard transforms) to smear out channel-wise outliers. This paper recognizes that value outliers are token-dependent spikes, meaning a rotation merely spreads the error to other channels within the same token without reducing its norm. Sorting tokens via clustering is the key to isolating these spikes.
- FP8 Bytes are Free Exponentials: Realizing that an FP8 floating-point representation is effectively an affine function of its log-domain value allows the authors to completely bypass the standard transcendental
exp()function on the GPU's multi-function unit (MUFU), saving massive amounts of clock cycles.
Key Results
- Fidelity Improvements: At 8-bit precision, VC-Attention improves Peak Signal-to-Noise Ratio (PSNR) over the strong baseline SageAttention2 by 2.3 dB on Wan2.2 and 2.8 dB on HunyuanVideo-1.5, significantly reducing motion artifacts.
- Kernel Speedups:
- On datacenter GPUs (NVIDIA B200 and H200), the 8-bit fused kernel accelerates attention by 1.46× to 1.59× over BF16 FlashAttention-4.
- On workstation GPUs (RTX 5090 and RTX PRO 6000), running at 4-bit precision yields an attention speedup of 2.3× to 3.6×.
- End-to-End Performance: Translating kernel gains to the full pipeline, video clips are generated 1.13×–1.19× faster on datacenter hardware and 1.36×–1.70× faster on workstation setups.
Limitations and Future Work
- 4-bit Datacenter Constraints: ExpCast-FP8 relies on the specific bit layout of E4M3 FP8. It cannot currently be applied to 4-bit datacenter formats like NVFP4 because those formats utilize per-16-element microscales that force scale computations back onto the critical path.
- Clustering Overhead: Although amortized, the online $k$-means clustering still adds roughly 30% latency to the specific attention steps where it executes. Finding even lighter-weight token sorting mechanisms remains an open area for optimization.
Summary updated