Citation and evidence

ZenAttention

Report a problem with this article

Edit article
More

Use this article

Raw MarkdownExplore connections

Improve this page

Revision historyDiscuss this article

Topics

AI InferenceVideo Generation

Cite this article

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 measuredComparisonZenAttention
One attention call, about 4,700 queries and 23,400 keysSageAttention2++ at 433 effective trillion operations per second628 effective trillion operations per second [1][2]
Full denoising network, 60-second Self Forcing video98.8 seconds with bfloat16 attention52.2 seconds [1][2]
Full denoising network, 64-second LongLive-2.0-5B video, with four-bit linear layers in both runs126.4 seconds with the released LongLive four-bit configuration68.8 seconds [1][2]
Self Forcing cache memory, 21-frame window5.62 GiB with bfloat161.94 GiB [1][2]

Expanded article table

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

More to read

Topics:AI InferenceVideo Generation

References

  1. ^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.
  2. ^1 ^2 ^3 ^4 ^5 ^6 ^7ZenAttention authors. ZenAttention source code, hardware requirements and benchmark results. GitHub.
  3. ^Xun Huang, Zhengqi Li, Guande He, Mingyuan Zhou and Eli Shechtman. Self Forcing: Bridging the Train-Test Gap in Autoregressive Video Diffusion. NeurIPS, 2025.
  4. ^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

Edit article