Instruction Position Matters in Sequence Generation with Large Language Models

Yijin Liu, Xianfeng Zeng, Fandong Meng, Jie Zhou
8/23/2023
cs.CL

No official code found. Best implementation: Adaxry/Post-Instruction (21 stars, last commit 2023-09-05).

Abstract

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.

View on arXivView PDF

Code Implementations(1)

210Shell, PythonAug 23, 20233 years ago

Cite this paper

@article{liu2023instruction,
  title  = {Instruction Position Matters in Sequence Generation with Large Language Models},
  author = {Yijin Liu and Xianfeng Zeng and Fandong Meng and Jie Zhou},
  year   = {2023},
  eprint = {2308.12097},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2308.12097v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2308.12097.svg)](https://codeofpaper.com/paper/2308.12097)

Discussion