[Paper Review] NEFTune: Noisy Embeddings Improve Instruction Finetuning
NEFTune adds random noise to embeddings during instruction fine-tuning, producing large gains in conversational quality across multiple models and datasets without extra compute or data.
We show that language model finetuning can be improved, sometimes dramatically, with a simple augmentation. NEFTune adds noise to the embedding vectors during training. Standard finetuning of LLaMA-2-7B using Alpaca achieves 29.79% on AlpacaEval, which rises to 64.69% using noisy embeddings. NEFTune also improves over strong baselines on modern instruction datasets. Models trained with Evol-Instruct see a 10% improvement, with ShareGPT an 8% improvement, and with OpenPlatypus an 8% improvement. Even powerful models further refined with RLHF such as LLaMA-2-Chat benefit from additional training with NEFTune.
Motivation & Objective
- Motivate improved instruction following for LLMs trained on limited fine-tuning data.
- Propose a simple embedding-space noise augmentation during fine-tuning (NEFTune).
- Evaluate the impact of NEFTune across multiple datasets and model sizes.
- Assess whether gains generalize to RLHF-tuned and resource-constrained settings.
Proposed method
- Sample instruction tokens and convert to embeddings during fine-tuning.
- Add a random noise vector to embeddings, scaled by α/√(Ld) where L is sequence length, d is embedding dimension.
- Train the model with this noised embedding forward path, using standard optimization.
- Use Alpaca-style system prompts and multiple instruction datasets for fine-tuning.
- Evaluate using AlpacaEval and OpenLLM Leaderboard tasks to assess conversational quality and factual capabilities.
- Demonstrate compatibility with QLORA for quantized low-rank adapters.
Experimental results
Research questions
- RQ1Does injecting noise into embeddings during fine-tuning improve instruction-following performance?
- RQ2How does NEFTune affect conversational quality across different model sizes and datasets?
- RQ3Does NEFTune preserve non-conversational capabilities (e.g., factual knowledge, reasoning) as measured by standard benchmarks?
- RQ4Is NEFTune effective with resource-constrained finetuning approaches like QLORA?
Key findings
- NEFTune increases AlpacaEval win rate for LLaMA-2-7B from 29.79% to 64.69%.
- NEFTune yields improvements across Evol-Instruct, ShareGPT, and OpenPlatypus datasets (e.g., 70.34%→79.60%, 68.74%→76.28%, 62.00%→70.61%).
- Average AlpacaEval win rate across the evaluated datasets improves from 57.71% to 72.80%.
- LLaMA-2-Chat (7B) gains an additional ~3–10% after NEFTune, even with prior RLHF refinement.
- NEFTune remains compatible with QLORA, showing improvements across model sizes, though gains are milder than full finetuning.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.