atlas

Research map / Large language models / Instruction and fine-tuning

Instruction Tuning With Loss Over Instructions

NeurIPS 2024 · Large language models › Instruction and fine-tuning · approach: Efficient LLM fine-tuning systems · 2 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes Instruction Modelling (IM), which computes the training loss over instruction/prompt tokens as well as outputs, and shows it helps instruction tuning most when instructions are long relative to outputs and when training data is small.

Problem

Standard instruction tuning computes loss only on output tokens, which may lead to overfitting, especially on small or short-output datasets; the paper asks when including instruction loss helps.

Approach

Instead of masking the instruction/prompt tokens out of the loss, train the LM with next-token loss over both instruction and completion tokens (excluding template tokens), framed as a regularizer that reduces overfitting in low-resource or SAH settings.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Apply loss to instruction and completion tokens instead of completion tokens onlyLlama-2-7B-Base instruction tuning on Alpagasus Dolly 3k · Alpagasus Dolly 3kmean NLP score: 46.58 -> 48.95Helped
Apply loss to instruction and completion tokens instead of completion tokens onlyLlama-2-7B-Base instruction tuning on Alpagasus Dolly 9k · Alpagasus Dolly 9kAlpacaEval 1.0 win rate: 21.54 -> 30.77Helped
Apply loss to instruction and completion tokens instead of completion tokens onlyLlama-2-7B-Base instruction tuning on Less MMLU Chat · Less MMLU ChatAlpacaEval 1.0 win rate: 4.42 -> 9.78Helped
Apply loss to instruction and completion tokens instead of completion tokens onlyLlama-2-7B-Base instruction tuning on LIMA · LIMAAlpacaEval 1.0 win rate: 33.06 -> 32.94No clear effect
Apply instruction loss on datasets with long instructions and short outputsInstruction Modelling · Less MMLU Chat and Less TydiqaAlpacaEval 1.0 win rateHelped
Use fewer training examples while holding instruction-to-output length ratio around 10Instruction Modelling on Tulu V2 · AlpacaEval 1.0win rateHelped
Apply instruction loss rather than output-only lossLlama-2-7B-Base trained on LIMA · LIMA training setoutput loss: 1.37 -> 1.45Hurt
Apply instruction loss rather than output-only lossLlama-2-7B-Base evaluated on Tulu V2 sampled test data · Tulu V2 test data (10% sample)output loss: 1.32 -> 1.17Helped
Apply instruction loss rather than output-only lossInstruction Modelling on training prompts · LIMA, Less Tydiqa, Less MMLU Chat, Less BBH ICL, Alpagasus Alpaca 5k, Alpagasus Dolly 9k, Alpagasus Dolly 3kBLEU overlap with training outputs: 18.15 -> 17.30; 69.21 -> 65.63; 72.43 -> 69.20; 60.96 -> 53.94; 72.26 -> 70.50; 61.76 -> 60.61; 60.99 -> 59.04Helped
Add KL divergence loss to instruction tuning (ablation)Llama-2-7B-Base on Alpagasus Dolly 9k · Alpagasus Dolly 9kmean NLP score: 45.54 -> 49.31Helped
Add KL divergence loss to instruction tuning (ablation)Llama-2-7B-Base on LIMA · LIMAAlpacaEval 2.0: 2.58 -> 0.06Hurt
Set KL loss coefficient to λ=0.01 rather than λ=1.0 (ablation)Llama-2-7B-Base instruction tuning on LIMA · LIMAAlpacaEval 2.0: 0.06 -> 2.58Helped

Surprising findings

Limitations

Experimental setup

Datasets: Stanford Alpaca Dolly ShareGPT Code Alpaca Science Literature WizardLM Tulu V2 LIMA Less MMLU Chat Less BBH ICL Less Tydiqa Alpagasus Dolly 3k

Benchmarks: MMLU PIQA OpenbookQA HellaSwag LAMBADA WMT 2014 WMT 2016 WSC WinoGrande ARC CoQA GSM8K

Metrics: accuracy normalized accuracy F1 pass@1 exact match win rate BLEU MT-Bench score

Baselines: Instruction Tuning (IT) NEFTune KL divergence regularization

Builds on: instruction tuning NEFTune Superficial Alignment Hypothesis LIMA LESS

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy