Saved in:
Bibliographic Details
Main Authors: Yan, Feihong, Wei, Qingyan, Tang, Jiayi, Li, Jiajun, Wang, Yulin, Hu, Xuming, Li, Huiqi, Zhang, Linfeng
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2503.12450
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915200242810880
author Yan, Feihong
Wei, Qingyan
Tang, Jiayi
Li, Jiajun
Wang, Yulin
Hu, Xuming
Li, Huiqi
Zhang, Linfeng
author_facet Yan, Feihong
Wei, Qingyan
Tang, Jiayi
Li, Jiajun
Wang, Yulin
Hu, Xuming
Li, Huiqi
Zhang, Linfeng
contents Masked Autoregressive (MAR) models have emerged as a promising approach in image generation, expected to surpass traditional autoregressive models in computational efficiency by leveraging the capability of parallel decoding. However, their dependence on bidirectional self-attention inherently conflicts with conventional KV caching mechanisms, creating unexpected computational bottlenecks that undermine their expected efficiency. To address this problem, this paper studies the caching mechanism for MAR by leveraging two types of redundancy: Token Redundancy indicates that a large portion of tokens have very similar representations in the adjacent decoding steps, which allows us to first cache them in previous steps and then reuse them in the later steps. Condition Redundancy indicates that the difference between conditional and unconditional output in classifier-free guidance exhibits very similar values in adjacent steps. Based on these two redundancies, we propose LazyMAR, which introduces two caching mechanisms to handle them one by one. LazyMAR is training-free and plug-and-play for all MAR models. Experimental results demonstrate that our method achieves 2.83 times acceleration with almost no drop in generation quality. Our codes will be released in https://github.com/feihongyan1/LazyMAR.
format Preprint
id arxiv_https___arxiv_org_abs_2503_12450
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle LazyMAR: Accelerating Masked Autoregressive Models via Feature Caching
Yan, Feihong
Wei, Qingyan
Tang, Jiayi
Li, Jiajun
Wang, Yulin
Hu, Xuming
Li, Huiqi
Zhang, Linfeng
Computer Vision and Pattern Recognition
Masked Autoregressive (MAR) models have emerged as a promising approach in image generation, expected to surpass traditional autoregressive models in computational efficiency by leveraging the capability of parallel decoding. However, their dependence on bidirectional self-attention inherently conflicts with conventional KV caching mechanisms, creating unexpected computational bottlenecks that undermine their expected efficiency. To address this problem, this paper studies the caching mechanism for MAR by leveraging two types of redundancy: Token Redundancy indicates that a large portion of tokens have very similar representations in the adjacent decoding steps, which allows us to first cache them in previous steps and then reuse them in the later steps. Condition Redundancy indicates that the difference between conditional and unconditional output in classifier-free guidance exhibits very similar values in adjacent steps. Based on these two redundancies, we propose LazyMAR, which introduces two caching mechanisms to handle them one by one. LazyMAR is training-free and plug-and-play for all MAR models. Experimental results demonstrate that our method achieves 2.83 times acceleration with almost no drop in generation quality. Our codes will be released in https://github.com/feihongyan1/LazyMAR.
title LazyMAR: Accelerating Masked Autoregressive Models via Feature Caching
topic Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2503.12450