Saved in:
Bibliographic Details
Main Authors: Shi, Zhengyan, Yang, Adam X., Wu, Bin, Aitchison, Laurence, Yilmaz, Emine, Lipani, Aldo
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2405.14394
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866914963169214464
author Shi, Zhengyan
Yang, Adam X.
Wu, Bin
Aitchison, Laurence
Yilmaz, Emine
Lipani, Aldo
author_facet Shi, Zhengyan
Yang, Adam X.
Wu, Bin
Aitchison, Laurence
Yilmaz, Emine
Lipani, Aldo
contents Instruction tuning plays a crucial role in shaping the outputs of language models (LMs) to desired styles. In this work, we propose a simple yet effective method, Instruction Modelling (IM), which trains LMs by applying a loss function to the instruction and prompt part rather than solely to the output part. Through experiments across 21 diverse benchmarks, we show that, in many scenarios, IM can effectively improve the LM performance on both NLP tasks (e.g., MMLU, TruthfulQA, and HumanEval) and open-ended generation benchmarks (e.g., MT-Bench and AlpacaEval). Remarkably, in the most advantageous case, IM boosts model performance on AlpacaEval 1.0 by over 100%. We identify two key factors influencing the effectiveness of IM: (1) The ratio between instruction length and output length in the training data; and (2) The number of training examples. We observe that IM is especially beneficial when trained on datasets with lengthy instructions paired with brief outputs, or under the Superficial Alignment Hypothesis (SAH) where a small amount of training examples are used for instruction tuning. Further analysis substantiates our hypothesis that our improvement can be attributed to reduced overfitting to instruction tuning datasets. It is worth noting that we are not proposing \ours as a replacement for current fine-tuning processes. Instead, our work aims to provide practical guidance for instruction tuning LMs, especially in low-resource scenarios.
format Preprint
id arxiv_https___arxiv_org_abs_2405_14394
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Instruction Tuning With Loss Over Instructions
Shi, Zhengyan
Yang, Adam X.
Wu, Bin
Aitchison, Laurence
Yilmaz, Emine
Lipani, Aldo
Computation and Language
Artificial Intelligence
Instruction tuning plays a crucial role in shaping the outputs of language models (LMs) to desired styles. In this work, we propose a simple yet effective method, Instruction Modelling (IM), which trains LMs by applying a loss function to the instruction and prompt part rather than solely to the output part. Through experiments across 21 diverse benchmarks, we show that, in many scenarios, IM can effectively improve the LM performance on both NLP tasks (e.g., MMLU, TruthfulQA, and HumanEval) and open-ended generation benchmarks (e.g., MT-Bench and AlpacaEval). Remarkably, in the most advantageous case, IM boosts model performance on AlpacaEval 1.0 by over 100%. We identify two key factors influencing the effectiveness of IM: (1) The ratio between instruction length and output length in the training data; and (2) The number of training examples. We observe that IM is especially beneficial when trained on datasets with lengthy instructions paired with brief outputs, or under the Superficial Alignment Hypothesis (SAH) where a small amount of training examples are used for instruction tuning. Further analysis substantiates our hypothesis that our improvement can be attributed to reduced overfitting to instruction tuning datasets. It is worth noting that we are not proposing \ours as a replacement for current fine-tuning processes. Instead, our work aims to provide practical guidance for instruction tuning LMs, especially in low-resource scenarios.
title Instruction Tuning With Loss Over Instructions
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2405.14394