深呼吸:通过哨兵令牌增强大语言模型的语言建模
Taking a Deep Breath: Enhancing Language Modeling of Large Language Models with Sentinel Tokens
AI总结:
本文提出通过插入哨兵令牌使大语言模型能够总结离散文本块信息,提升长文本建模能力,实验验证了方法的有效性。
摘要:
大型语言模型(LLMs)在各种任务中表现出色,但基于Transformer的LLMs在建模长期上下文时会因丢弃信息而性能下降。本文提出一种简单有效的方法,使LLMs能够'深呼吸',鼓励其总结离散文本块中的信息。具体方法是将文本分割成多个块并在每个块末尾插入特殊令牌<SR>,然后修改注意力掩码以将块的信息整合到对应的<SR>令牌中。这使LLMs不仅能从历史单个令牌中解读信息,还能从<SR>令牌中聚合块的语义信息。在语言建模和跨领域下游任务上的实验验证了该方法的优越性。
英文摘要:
Large language models (LLMs) have shown promising efficacy across various tasks, becoming powerful tools in numerous aspects of human life. However, Transformer-based LLMs suffer a performance degradation when modeling long-term contexts due to they discard some information to reduce computational overhead. In this work, we propose a simple yet effective method to enable LLMs to take a deep breath, encouraging them to summarize information contained within discrete text chunks. Specifically, we segment the text into multiple chunks and insert special token <SR> at the end of each chunk. We then modify the attention mask to integrate the chunk's information into the corresponding <SR> token. This facilitates LLMs to interpret information not only from historical individual tokens but also from the <SR> token, aggregating the chunk's semantic information. Experiments on language modeling and out-of-domain downstream tasks validate the superiority of our approach.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。