MARché: Fast Masked Autoregressive Image Generation with Cache-Aware Attention

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Jiang, Chaoyi, Kim, Sungwoo, Gao, Lei, Zarch, Hossein Entezari, Ro, Won Woo, Annavaram, Murali
Formato: Preprint
Publicado: 2025
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866908407684923392
author Jiang, Chaoyi
Kim, Sungwoo
Gao, Lei
Zarch, Hossein Entezari
Ro, Won Woo
Annavaram, Murali
author_facet Jiang, Chaoyi
Kim, Sungwoo
Gao, Lei
Zarch, Hossein Entezari
Ro, Won Woo
Annavaram, Murali
contents Masked autoregressive (MAR) models unify the strengths of masked and autoregressive generation by predicting tokens in a fixed order using bidirectional attention for image generation. While effective, MAR models suffer from significant computational overhead, as they recompute attention and feed-forward representations for all tokens at every decoding step, despite most tokens remaining semantically stable across steps. We propose a training-free generation framework MARché to address this inefficiency through two key components: cache-aware attention and selective KV refresh. Cache-aware attention partitions tokens into active and cached sets, enabling separate computation paths that allow efficient reuse of previously computed key/value projections without compromising full-context modeling. But a cached token cannot be used indefinitely without recomputation due to the changing contextual information over multiple steps. MARché recognizes this challenge and applies a technique called selective KV refresh. Selective KV refresh identifies contextually relevant tokens based on attention scores from newly generated tokens and updates only those tokens that require recomputation, while preserving image generation quality. MARché significantly reduces redundant computation in MAR without modifying the underlying architecture. Empirically, MARché achieves up to 1.7x speedup with negligible impact on image quality, offering a scalable and broadly applicable solution for efficient masked transformer generation.
format Preprint
id arxiv_https___arxiv_org_abs_2506_12035
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle MARché: Fast Masked Autoregressive Image Generation with Cache-Aware Attention
Jiang, Chaoyi
Kim, Sungwoo
Gao, Lei
Zarch, Hossein Entezari
Ro, Won Woo
Annavaram, Murali
Machine Learning
Artificial Intelligence
Masked autoregressive (MAR) models unify the strengths of masked and autoregressive generation by predicting tokens in a fixed order using bidirectional attention for image generation. While effective, MAR models suffer from significant computational overhead, as they recompute attention and feed-forward representations for all tokens at every decoding step, despite most tokens remaining semantically stable across steps. We propose a training-free generation framework MARché to address this inefficiency through two key components: cache-aware attention and selective KV refresh. Cache-aware attention partitions tokens into active and cached sets, enabling separate computation paths that allow efficient reuse of previously computed key/value projections without compromising full-context modeling. But a cached token cannot be used indefinitely without recomputation due to the changing contextual information over multiple steps. MARché recognizes this challenge and applies a technique called selective KV refresh. Selective KV refresh identifies contextually relevant tokens based on attention scores from newly generated tokens and updates only those tokens that require recomputation, while preserving image generation quality. MARché significantly reduces redundant computation in MAR without modifying the underlying architecture. Empirically, MARché achieves up to 1.7x speedup with negligible impact on image quality, offering a scalable and broadly applicable solution for efficient masked transformer generation.
title MARché: Fast Masked Autoregressive Image Generation with Cache-Aware Attention
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2506.12035