English

NEFTune: Noisy Embeddings Improve Instruction Finetuning

Computation and Language 2023-10-11 v2 Machine Learning

Abstract

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.

Keywords

Cite

@article{arxiv.2310.05914,
  title  = {NEFTune: Noisy Embeddings Improve Instruction Finetuning},
  author = {Neel Jain and Ping-yeh Chiang and Yuxin Wen and John Kirchenbauer and Hong-Min Chu and Gowthami Somepalli and Brian R. Bartoldson and Bhavya Kailkhura and Avi Schwarzschild and Aniruddha Saha and Micah Goldblum and Jonas Geiping and Tom Goldstein},
  journal= {arXiv preprint arXiv:2310.05914},
  year   = {2023}
}

Comments

25 pages, Code is available on Github: https://github.com/neelsjain/NEFTune

R2 v1 2026-06-28T12:44:56.630Z