Пропустить навигацию
We found a way to run 4-bit attention directly on a 4-bit KV cache for streaming video diffusion…
0:00 / 1:43

We found a way to run 4-bit attention directly on a 4-bit KV cache for streaming video diffusion…

NoaX

@noahatwhere9,5 тыс. подписчиков

Открыть в X
164 отметки «Нравится»СкачатьОригинальный пост

21 381 просмотр

We found a way to run 4-bit attention directly on a 4-bit KV cache for streaming video diffusion — completely training-free. Across latest streaming world models, ZenAttention hits 628 TOPS on an RTX 5090 (1.45× SageAttention2++, 1.84× faster denoising than LongLive 2.0's 4-bit release), cuts KV-cache memory by 2/3, and matches bf16 quality. Website: Paper:

10 комментариев

Комментарии из оригинального поста в X (Twitter)

  • Фото профиля NoaX

    @noahatwhere

    4/ Drop-in across 8 streaming video & world models with no retraining: Self-Forcing, Causal Forcing, Context Forcing, CausVid, LongLive-1.3B, LongLive-2.0-5B, LingBot-World v2, and ABot-World-0. • 2.6–3.5× faster self-attention vs bf16 (1.23–1.50× vs SageAttention2++) • Within 0.7% latent detail of bf16 on all 8 models (vs 4–28% lost by SageAttention3) • 0/21 VBench regressions on Self-Forcing (946 prompts), 0/6 on LongLive-2.0-5B Code (CUDA/PTX kernel + PyTorch ref + drop-in integrations): Paper: Joint work with @tonyzhu @ZiqiPeng at @UofArizona, @Tsinghua_Uni , and First Intuition.

    7 отметок «Нравится»

  • Фото профиля NoaX

    @noahatwhere

    2/ Even after removing bias, the first frame of each chunk still lost contrast. We traced it to a single head out of 360 in Wan 2.1 (Layer 29, Head 9) — inherited from the bidirectional base model. It puts 99.9% of its attention mass on the exact same spatial position in the previous frame (~13.5-nat margin). Quantizing only this one head to 4-bit reproduces the entire first-frame drop. Restoring exact scores on just this head eliminates it.

    5 отметок «Нравится»

  • Фото профиля NoaX

    @noahatwhere

    3/ ZenAttention answers each finding with one component, fused into one Blackwell kernel (mma.m16n8k64): 1. Write-once NVFP4 cache + closed-form bias corrections: - rescale for shrinkage (β/α) - subtract ½σ² for Jensen bias using stored error norms - fixed dithered E2M1 rounding + rounded row sum for P All in 1 FMA per score, zero requantization. 2. Two-tier online softmax: Newest cached frame + current chunk stay in 8-bit (INT8/E4M3); all older history runs in NVFP4. Both update one shared online softmax — no head-specific hacks.

    5 отметок «Нравится»

  • Фото профиля NoaX

    @noahatwhere

    1/ Today you only get half of 4-bit: • FP4 attention (SageAttention3) keeps a bf16 cache and requantizes every call → loses speed AND loses 4–28% latent detail. • 4-bit KV caches (e.g., LongLive 2.0) dequantize back to bf16 before attention → saves VRAM, zero speedup. Why does FP4 attention collapse on long rollouts? Comparing free vs. teacher-forced rollouts exposes a feedback loop: NVFP4 error is systematically biased (vector shrinkage, Jensen bias of exp(s+ε), and dead-zone rounding on P). Once a kernel reads the cache it wrote, single-chunk detail loss amplifies ~3×.

    4 отметки «Нравится»

  • Фото профиля Shreyas Subramanian

    @shreyassub

    One rogue head out of 360 😆

    2 отметки «Нравится»

  • Фото профиля NoaX

    @noahatwhere

    @TianweiY

    2 отметки «Нравится»

  • Фото профиля NoaX

    @noahatwhere

    @TianweiY a lot of respects!

    2 отметки «Нравится»

  • Фото профиля NoaX

    @noahatwhere

    @DecartAI @krea_ai @theworldlabs

    2 отметки «Нравится»

  • Фото профиля NoaX

    @noahatwhere

    you might need this lol

    2 отметки «Нравится»

  • Фото профиля jack lin

    @jacklin_1202

    164.8S 速度非常快