arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2308.12097cs.CL
收藏

指令位置在大语言模型序列生成中至关重要

Instruction Position Matters in Sequence Generation with Large Language Models

Pattern Recognition Center, WeChat AI, Tencent Inc(腾讯公司微信人工智能模式识别中心)

Yijin Liu, Xianfeng Zeng, Fandong Meng, Jie Zhou

AI总结:

针对大语言模型长输入下的指令遗忘问题,提出将任务指令移至输入后的方法,经理论分析与多规模模型、多任务实验验证,在零样本条件序列生成上性能提升显著且无额外成本。

摘要:

大语言模型(LLM)可通过指令微调执行条件序列生成任务,如翻译或摘要生成。微调数据通常由特定任务指令、输入句子和对应响应按顺序拼接而成。考虑到LLM自注意力机制建模的局部性,这些模型在为长输入句子生成响应时存在指令遗忘的风险。为缓解这一问题,我们提出通过将任务指令的位置移至输入句子之后,来增强LLM的指令遵循能力。理论分析表明,这种简单直接的方法能够改变模型的学习关注点,从而强化指令遵循能力的训练。同时,实验结果显示,在无需额外数据或标注成本的情况下,我们的方法在多种模型规模(1B/7B/13B)和不同序列生成任务(翻译和摘要)上均始终优于传统设置。值得注意的是,该方法显著提升了条件序列生成的零样本性能,例如在WMT零样本翻译任务上最高提升9.7个BLEU点。

英文摘要:

Large language models (LLMs) are capable of performing conditional sequence generation tasks, such as translation or summarization, through instruction fine-tuning. The fine-tuning data is generally sequentially concatenated from a specific task instruction, an input sentence, and the corresponding response. Considering the locality modeled by the self-attention mechanism of LLMs, these models face the risk of instruction forgetting when generating responses for long input sentences. To mitigate this issue, we propose enhancing the instruction-following capability of LLMs by shifting the position of task instructions after the input sentences. Theoretical analysis suggests that our straightforward method can alter the model's learning focus, thereby emphasizing the training of instruction-following capabilities. Concurrently, experimental results demonstrate that our approach consistently outperforms traditional settings across various model scales (1B / 7B / 13B) and different sequence generation tasks (translation and summarization), without any additional data or annotation costs. Notably, our method significantly improves the zero-shot performance on conditional sequence generation, e.g., up to 9.7 BLEU points on WMT zero-shot translation tasks.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑