Lune

ACL2025顶会

Segment-Based Attention Masking for GPTs

Shahar Katz, Liran Ringel, Yaniv Romano, Lior Wolf

摘要

Modern Language Models (LMs) owe much of their success to masked causal attention, the backbone of Generative Pre-Trained Transformer (GPT) models. Although GPTs can process the entire user prompt at once, the causal masking is applied to all input tokens step-by-step, mimicking the generation process. This imposes an unnecessary constraint during the initial "prefill" phase when the model processes the input prompt and generates the internal representations before producing any output tokens. In this work, attention is masked based on the known block structure at the prefill phase, followed by the conventional token-bytoken autoregressive process after that. For example, in a typical chat prompt, the system prompt is treated as one block, and the user prompt as the next one. Each of these is treated as a unit for the purpose of masking, such that the first tokens in each block can access the subsequent tokens in a non-causal manner. Then, the model answer is generated in the conventional causal manner. The Segmentby-Segment scheme, illustrated in Figure 1 , entails no additional computational overhead. When integrating it into models such as Llama and Qwen, state-of-the-art performance is consistently achieved. Our code will be available at: https://github.com/shacharKZ/ MAS-Segment-Based-Attention-Masking .

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 1 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • LoRA: Low-Rank Adaptation of Large Language Models 引用了 Language Models are Few-Shot Learners
  • Dual-objective Language Models: Training Efficiency Without Overfitting 引用了 PIQA: Reasoning about Physical Commonsense in Natural Language
  • Dual-objective Language Models: Training Efficiency Without Overfitting 引用了 Language Models are Few-Shot Learners
  • DoRA: Weight-Decomposed Low-Rank Adaptation 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper1

  1. Dual-objective Language Models: Training Efficiency Without OverfittingDavid Samuel, Lucas Georges Gabriel CharpentierICLR 2026

它引用的 Paper7

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
  3. LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu 等ICLR 2022 · 18,833 次引用
  4. PIQA: Reasoning about Physical Commonsense in Natural LanguageYonatan Bisk, Rowan Zellers, Ronan Le Bras, Jianfeng Gao 等AAAI 2020 · 2,916 次引用
  5. DoRA: Weight-Decomposed Low-Rank AdaptationShih-Yang Liu, Chien-Yi Wang, Hongxu Yin, Pavlo Molchanov 等ICML 2024 · 820 次引用

相关 Paper

  1. Diffusion with Truncated Blocks: Fast and High-Quality Text Generation using Truncated Block GenerationYuyan Zhou, Weiyu Chen, James T. KwokACL Findings 2026
  2. Training-Free Long-Context Scaling of Large Language ModelsChenxin An, Fei Huang, Jun Zhang, Shansan Gong 等ICML 2024 · 68 次引用
  3. Hopscotch: Discovering and Skipping Redundancies in Language ModelsMustafa Eyceoz, Nikhil Shivakumar Nayak, Hao Wang, Ligong Han 等EMNLP Findings 2025
  4. Efficient-DLM: From Autoregressive to Diffusion Language Models, and Beyond in SpeedYonggan Fu, Lexington Whalen, Zhifan Ye, Xin Dong 等ICML 2026 · 22 次引用
  5. Analysing The Impact of Sequence Composition on Language Model Pre-TrainingYu Zhao, Yuanbin Qu, Konrad Staniszewski, Szymon Tworkowski 等ACL 2024
黄昏的海面,两侧是细线勾勒的悬崖