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
arXiv:2609.15810 · 2026-09-18 공개 · arXiv · PDF
video-generation diffusion-transformers hardware-acceleration flashattention tensor-cores fp8-quantization vc-attention low-bit-attention
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.59x on datacenter Blackwell and Hopper and by 2.3-3.6x on workstation cards, and generates a clip 1.13-1.19x and 1.36-1.70x faster end to end.
한국어 요약
한 줄 요약
VC-Attention은 비트 수를 줄인 상태에서 정확도와 속도를 동시에 향상시키는 트레이닝 없는 어텐션 기법이다.
핵심 기여도
- V-Smooth: 값 토큰을 온라인 클러스터링으로 재정렬하여 하드웨어 블록 내 정량화 정확도 향상.
- ExpCast-FP8: 로그 도메인 점수를 E4M3 확률 코드로 한 번의 FMA 연산으로 변환, FP32 지수 계산 제거.
- B200, H200, RTX 5090 등에서 BF16 FlashAttention-4 대비 1.46–3.58× 가속.
- Wan2.2, MiniMax-H3 등 4개 모델에서 정확도 향상 및 끝에서 끝까지 1.13–1.70× 빠른 클립 생성.
핵심 아이디어
기존 저비트 어텐션 연구는 쿼리와 키를 스무딩하는 데 집중했으나, 값의 아웃라이어는 고정된 채널이나 구조를 따르지 않아 정확도에 큰 영향을 미쳤다. VC-Attention은 값 정확도와 속도를 동시에 개선하기 위해 V-Smooth와 ExpCast-FP8를 결합했다. V-Smooth는 온라인 k-평균 클러스터링을 사용해 값 토큰을 재정렬하고, 블록 평균을 제거한 잔차만 정량화하여 정확도를 높인다. ExpCast-FP8는 로그 도메인 점수를 E4M3 확률 코드로 한 번의 FMA 연산으로 변환하여 FP32 지수 계산과 형식 변환을 생략함으로써 속도를 향상시킨다.
기술적 접근법
- **V-Smooth**: 온라인 k-평균 클러스터링을 사용한 값 토큰 재정렬. 블록 평균을 제거한 잔차만 정량화.
- **ExpCast-FP8**: 로그 도메인 점수를 E4M3 확률 코드로 변환하는 단일 FMA 연산. FP32 지수 계산 제거.
- **하드웨어**: B200, H200, RTX PRO 6000, RTX 5090 등에 구현.
- **정량화**: 블록 내 최대값 기반 스케일링 대신 잔차만 정량화.
- **소프트맥스 재구성**: 온라인 소프트맥스에서 유지한 행 합을 사용해 평균 복원.
주요 결과
- **정확도**: V-Smooth는 4개 모델(Wan2.2, LongCat-Video, HunyuanVideo-1.5, MiniMax-H3)에서 기존 저비트 기반 대비 정확도 향상.
- **속도**: B200에서 BF16 FlashAttention-4 대비 1.59×, H200에서 1.46×, RTX 5090에서 3.58× 가속.
- **엔드투엔드**: Wan2.2 클립 생성에서 B200 기준 1.19×, RTX 5090 기준 1.70× 빠름.
- **정확도-속도 트레이드오프**: ExpCast-FP4는 정확도 일부 감소를 수반하지만, 속도는 BF16 FlashAttention-4 대비 1.60×, SageAttention2 대비 5.5× 빠름.
의의 및 한계
VC-Attention은 트레이닝 없이도 저비트 환경에서 정확도와 속도를 동시에 향상시키는 기법으로, 비디오 생성 모델의 실용적 배포를 가능하게 한다. 특히, 값 정확도 개선과 FP32 지수 계산 제거는 기존 저비트 어텐션의 주요 한계를 해결한다. 그러나 V-Smooth는 첫 번째 25%의 디노이징 단계에서만 클러스터링을 수행하며, 모든 단계에서 수행할 경우 정확도는 0.5 dB 높아지나 처리 시간은 늘어난다. 또한, ExpCast-FP8는 정확도 일부를 희생하며 속도를 향상시키는 트레이드오프가 존재한다.
실용적 활용
VC-Attention은 고해상도, 장시간 비디오 생성을 요구하는 산업(예: 콘텐츠 제작, 게임, VR)에서 실시간 인퍼런스 성능을 향상시킬 수 있다. 특히, B200, RTX 5090 등 고성능 GPU를 사용하는 클라우드 및 워크스테이션 환경에서 유용하며, 저비용으로 고정밀 비디오 생성을 가능하게 한다.