MAGNET:以表示学习与填充能力增强生成式解码器
MAGNET: Augmenting Generative Decoders with Representation Learning and Infilling Capabilities
AI总结:
本文提出 MAGNET,通过三种自监督目标及双向—因果混合注意力统一训练仅解码器 LLM,使其同时具备强表示学习、文本填充、开放生成和原有知识推理能力。
摘要:
仅解码器大语言模型(LLM)最初是为单向生成建模而设计,但如今正越来越多地被改造用于双向建模。然而,单向模型与双向模型通常采用不同目标(生成与表示学习)分别训练。这种分离忽视了开发更通用语言模型以及让这些目标相互补充的机会。在本研究中,我们提出 MAGNET,这是一种改造仅解码器 LLM 的方法,使其能够生成鲁棒表示并填充缺失文本片段。MAGNET 采用三种自监督训练目标,并引入一种结合双向注意力与因果注意力的注意力机制,从而实现跨所有目标的统一训练。结果表明,经 MAGNET 改造的 LLM:(1)在 token 级和句子级表示学习任务上超过强大的文本编码器;(2)通过利用过去和未来上下文生成符合语境的文本填充;(3)执行开放式文本生成时不会过度重复词语或短语;(4)保留 LLM 在预训练期间获得的知识与推理能力。
英文摘要:
While originally designed for unidirectional generative modeling, decoder-only large language models (LLMs) are increasingly being adapted for bidirectional modeling. However, unidirectional and bidirectional models are typically trained separately with distinct objectives (generation and representation learning). This separation overlooks the opportunity for developing a more versatile language model and for these objectives to complement each other. In this work, we propose MAGNET, a method for adapting decoder-only LLMs to generate robust representations and infill missing text spans. MAGNET employs three self-supervised training objectives and introduces an attention mechanism that combines bidirectional and causal attention, enabling unified training across all objectives. Our results demonstrate that LLMs adapted with MAGNET (1) surpass strong text encoders on token-level and sentence-level representation learning tasks, (2) generate contextually appropriate text infills by leveraging past and future contexts, (3) perform open-ended text generation without excessive repetition of words or phrases, and (4) preserve the knowledge and reasoning capability gained by the LLM during pretraining.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。