ZenAttention
ZenAttention is an attention algorithm and GPU kernel for streaming video diffusion models. A model generating a video a few frames at a time repeatedly consults earlier frames. ZenAttention stores most of that history in a four-bit key-value cache and computes attention directly on the compressed records. It reserves eight-bit arithmetic for the current chunk and the newest cached frame. Yingwei Song, Tony Zhu, Kelly Peng, Yuan Gao and Huanrui Yang described the method in a preprint submitted on November 25, 2026.[1][2]
How the cache works
In a streaming generator such as Self Forcing, earlier outputs become part of the input for later frames. Each denoising step reads the keys and values from those earlier frames. In one configuration studied by the authors, a finished chunk can be read up to 30 times before it leaves the window. Compressing that chunk once avoids repeating the conversion on each read. ZenAttention uses NVFP4, a floating-point format that encodes each value in four bits and shares a scale across a block of 16 values.[1][3][4]
Rounding to four bits can change which earlier frames receive the most attention. The researchers compared a model that repeatedly read its own compressed history with one given a fresh, high-precision reference history at each step. In their Self Forcing experiment, a four-bit operator without corrections lost about three times as much fine spatial detail in later chunks when its errors fed back through the cache. ZenAttention stores statistics with the compressed records to correct systematic errors in the attention scores. It gives the most recent frame higher precision because some attention heads rely heavily on the same spatial position in that frame.[1]
Performance and limits
The authors tested the kernel without retraining on eight streaming video and world models ranging from 1.3 billion to 5 billion parameters. Their speed tests used one NVIDIA RTX 5090. Kernel throughput measures the work done by an individual attention call. Timings for the denoising network include other operations, so the speedup can be smaller.[1][2]
| What was measured | Comparison | ZenAttention |
|---|---|---|
| One attention call, about 4,700 queries and 23,400 keys | SageAttention2++ at 433 effective trillion operations per second | 628 effective trillion operations per second [1][2] |
| Full denoising network, 60-second Self Forcing video | 98.8 seconds with bfloat16 attention | 52.2 seconds [1][2] |
| Full denoising network, 64-second LongLive-2.0-5B video, with four-bit linear layers in both runs | 126.4 seconds with the released LongLive four-bit configuration | 68.8 seconds [1][2] |
| Self Forcing cache memory, 21-frame window | 5.62 GiB with bfloat16 | 1.94 GiB [1][2] |
The authors measured the strength of fine spatial detail in the generated latent frames. ZenAttention stayed within 0.7% of the bfloat16 reference on that measure across the eight models. They assessed perceptual quality separately with VBench on Self Forcing and VBench-Long on LongLive-2.0-5B. The compiled kernel targets Blackwell GPUs with compute capability 12.0 and attention heads of width 128. Shorter caches leave less work for the optimization to accelerate. The authors released the kernel, a reference implementation and integrations for three models under the Apache License 2.0.[1][2]
Continue reading
- Diffusion modelA diffusion model is a generative model that learns to transform samples from a simple reference distribution into samples resembling a data distribution by reversing a gradual corruption process.Linked in the introduction
- KV CacheKV cache, short for key-value cache, is transient model state used during Transformer generation.Linked in the introduction
- NVIDIA PicassoNVIDIA Picasso is a cloud-based generative AI foundry from NVIDIA for building, training, and deploying visual generative models that produce images, video, and 3D content from text prompts.Also in Video Generation
- The Biological Computing CompanyThe Biological Computing Company (TBC; styled The Biological Computing Co. and formerly called Biological Black Box) is an American startup that grows living neurons on multi-electrode arrays, records how the…Also in Video Generation
- SoraSora was a text-to-video generation model developed by OpenAI. OpenAI revealed the research model on February 15, 2024 and granted early access to red teamers, visual artists, designers, and filmmakers.Also in Video Generation
- AdobeAdobe Inc. is an American software company best known for creative and document tools such as Photoshop, Illustrator, Premiere Pro and Acrobat that has, since 2023, become one of the most closely watched…Also in Video Generation
More to read
Topics:AI InferenceVideo Generation
References
- ^1 ^2 ^3 ^4 ^5 ^6 ^7 ^8 ^9Yingwei Song, Tony Zhu, Kelly Peng, Yuan Gao and Huanrui Yang. ZenAttention: 4-bit Attention Directly on a Quantized KV Cache for Streaming Video Diffusion. arXiv:2611.35314, November 25, 2026, sections 3-5 and 7.
- ^1 ^2 ^3 ^4 ^5 ^6 ^7ZenAttention authors. ZenAttention source code, hardware requirements and benchmark results. GitHub.
- ^Xun Huang, Zhengqi Li, Guande He, Mingyuan Zhou and Eli Shechtman. Self Forcing: Bridging the Train-Test Gap in Autoregressive Video Diffusion. NeurIPS, 2025.
- ^Eduardo Alvarez and colleagues. Introducing NVFP4 for Efficient and Accurate Low-Precision Inference. NVIDIA, June 24, 2025.
Improve this article
Add missing citations, update stale details, or write a clearer explanation. Anyone can edit: changes go live when you publish, and every edit is checked by an editor.
1 revision · v1 · 618 words · full history
Fact-checks are independent of edits: a reviewer re-verifies the article against its sources and stamps the date. How we verify
Research and drafting on this wiki are AI-assisted, under named human editorial standards. How AI is used here
Cite this page: AI Wiki. "ZenAttention." aiwiki.ai, updated 1 Dec 2026. CC BY 4.0. https://aiwiki.ai/wiki/zenattention




