Research map / Large language models / Instruction and fine-tuning
NEFTune: Noisy Embeddings Improve Instruction Finetuning
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
- NEFTune raises LLaMA-2-7B AlpacaEval win rate (GPT-4 judge) on Alpaca from 29.79% to 64.69%.
- Average GPT-4 win rate across four datasets rises from 57.71% to 72.80% with NEFTune on LLaMA-2-7B.
- LLaMA-2 70B on Evol-Instruct improves from 75.03% to 88.81% win rate with NEFTune.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Add uniform noise to embedding vectors during training | LLaMA-2 7B fine-tuned on Alpaca · AlpacaEval, Alpaca | win rate: 29.79 -> 64.69 | Helped |
| Add uniform noise to embedding vectors during training | LLaMA-2 7B fine-tuned on Evol-Instruct · AlpacaEval, Evol-Instruct | win rate: 70.34 -> 79.60 | Helped |
| Add uniform noise to embedding vectors during training | LLaMA-2 7B fine-tuned on ShareGPT · AlpacaEval, ShareGPT | win rate: 68.74 -> 76.28 | Helped |
| Add uniform noise to embedding vectors during training | LLaMA-2 7B fine-tuned on OpenPlatypus · AlpacaEval, OpenPlatypus | win rate: 62.00 -> 70.61 | Helped |
| Add embedding noise during fine-tuning | LLaMA-2-Chat 7B on Evol-Instruct · AlpacaEval, Evol-Instruct | win rate: 74.44 -> 81.74 | Helped |
| Add embedding noise during fine-tuning | LLaMA-2 70B on Evol-Instruct · AlpacaEval, Evol-Instruct | win rate: 75.03 -> 88.81 | Helped |
| Add embedding noise during QLoRA training | LLaMA-2 7B · AlpacaEval, Alpaca, QLoRA | win rate: 26.71 -> 31.43 | Helped |
| Replace uniform training noise with Gaussian noise (α=5) (ablation) | LLaMA-2 7B fine-tuned on Evol-Instruct · AlpacaEval, Evol-Instruct | ChatGPT win rate: 67.58 -> 65.09 | Hurt |
| Freeze attention blocks during NEFTune fine-tuning (ablation) | LLaMA-2 7B fine-tuned on Alpaca · AlpacaEval, Alpaca | ChatGPT win rate: 62.55 -> 22.17 | Hurt |
| Freeze the embedding layer during NEFTune fine-tuning (ablation) | LLaMA-2 7B fine-tuned on Alpaca · AlpacaEval, Alpaca | ChatGPT win rate: 62.55 -> 61.06 | Hurt |
| Prompt the model to generate a long and comprehensive response instead of using NEFTune (ablation) | LLaMA-1 7B fine-tuned on Alpaca · AlpacaEval, Alpaca | GPT-4 win rate: 61.99 -> 48.01 | Hurt |
| Force a minimum of 250 new tokens instead of using NEFTune (ablation) | LLaMA-1 7B fine-tuned on Alpaca · AlpacaEval, Alpaca | GPT-4 win rate: 61.99 -> 38.58 | Hurt |
Surprising findings
- NEFTune-trained models have higher training loss but slightly lower test loss, and lower ROUGE-L/BLEU to training responses, suggesting less overfitting.
- OpenLLM Leaderboard scores remain stable with NEFTune, so conversational gains do not cost classical skills.
Limitations
- AlpacaEval relies on a single GPT-4 judge, which has known biases.
- 70B experiments were limited to Evol-Instruct and used fixed hyperparameters without sweeping.
- The mechanism behind NEFTune's gains is not conclusively understood.
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
- Sheared LLaMA: Accelerating Language Model Pre-training via Structured Pruning (ICLR 2024 · similarity 0.88)
- Evaluating the Zero-shot Robustness of Instruction-tuned Language Models (ICLR 2024 · similarity 0.87)
- DELIFT: Data Efficient Language model Instruction Fine-Tuning (ICLR 2025 · similarity 0.87)
- Enhancing NLU in Large Language Models Using Adversarial Noisy Instruction Tuning (AAAI 2025 · similarity 0.87)
- Instructive Decoding: Instruction-Tuned Large Language Models are Self-Refiner from Noisy Instructions (ICLR 2024 · similarity 0.87)
- AlpaGasus: Training a Better Alpaca with Fewer Data (ICLR 2024 · similarity 0.87)
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.
