atlas

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

NEFTune: Noisy Embeddings Improve Instruction Finetuning

ICLR 2024 · Large language models › Instruction and fine-tuning · approach: Gradient-free adaptation and merging · 14 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 NEFTune, which adds uniform noise to token embeddings during instruction finetuning, boosting AlpacaEval win rates for LLaMA-2-7B and other models with no extra data or compute.

Problem

Instruction finetuning of LLMs on small curated datasets tends to overfit, limiting conversational quality of the resulting chat models.

Approach

Add scaled, non-adversarial uniform random noise to the embedding vectors during the forward pass of finetuning (noise scale alpha/sqrt(Ld)), a regularizer that reduces overfitting to instruction formatting and wording at no added compute or data cost.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add uniform noise to embedding vectors during trainingLLaMA-2 7B fine-tuned on Alpaca · AlpacaEval, Alpacawin rate: 29.79 -> 64.69Helped
Add uniform noise to embedding vectors during trainingLLaMA-2 7B fine-tuned on Evol-Instruct · AlpacaEval, Evol-Instructwin rate: 70.34 -> 79.60Helped
Add uniform noise to embedding vectors during trainingLLaMA-2 7B fine-tuned on ShareGPT · AlpacaEval, ShareGPTwin rate: 68.74 -> 76.28Helped
Add uniform noise to embedding vectors during trainingLLaMA-2 7B fine-tuned on OpenPlatypus · AlpacaEval, OpenPlatypuswin rate: 62.00 -> 70.61Helped
Add embedding noise during fine-tuningLLaMA-2-Chat 7B on Evol-Instruct · AlpacaEval, Evol-Instructwin rate: 74.44 -> 81.74Helped
Add embedding noise during fine-tuningLLaMA-2 70B on Evol-Instruct · AlpacaEval, Evol-Instructwin rate: 75.03 -> 88.81Helped
Add embedding noise during QLoRA trainingLLaMA-2 7B · AlpacaEval, Alpaca, QLoRAwin rate: 26.71 -> 31.43Helped
Replace uniform training noise with Gaussian noise (α=5) (ablation)LLaMA-2 7B fine-tuned on Evol-Instruct · AlpacaEval, Evol-InstructChatGPT win rate: 67.58 -> 65.09Hurt
Freeze attention blocks during NEFTune fine-tuning (ablation)LLaMA-2 7B fine-tuned on Alpaca · AlpacaEval, AlpacaChatGPT win rate: 62.55 -> 22.17Hurt
Freeze the embedding layer during NEFTune fine-tuning (ablation)LLaMA-2 7B fine-tuned on Alpaca · AlpacaEval, AlpacaChatGPT win rate: 62.55 -> 61.06Hurt
Prompt the model to generate a long and comprehensive response instead of using NEFTune (ablation)LLaMA-1 7B fine-tuned on Alpaca · AlpacaEval, AlpacaGPT-4 win rate: 61.99 -> 48.01Hurt
Force a minimum of 250 new tokens instead of using NEFTune (ablation)LLaMA-1 7B fine-tuned on Alpaca · AlpacaEval, AlpacaGPT-4 win rate: 61.99 -> 38.58Hurt

Surprising findings

Limitations

Experimental setup

Datasets: Alpaca Evol-Instruct ShareGPT OpenPlatypus AlpacaEval

Benchmarks: AlpacaEval OpenLLM Leaderboard (ARC, HellaSwag, MMLU, TruthfulQA)

Metrics: win rate accuracy ROUGE-L BLEU log-diversity 2-gram repetition rate

Baselines: Standard finetuning FreeLB LLaMA-2-Chat Text-Davinci-003

Builds on: FreeLB QLoRA Self-Instruct Alpaca

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