Mechanism

Modifies the SFT forward/loss pass to prevent memorization and improve conversational generation. NEFTune injects uniform random noise U(−1,1)\mathcal{U}(-1,1) scaled by αLd\frac{\alpha}{\sqrt{Ld}} into token embeddings during SFT; Prompt-Loss Weighting adds a small weight λ∈[0,0.05]\lambda \in [0, 0.05] on prompt tokens or upweights final-answer / pivotal tokens relative to boilerplate formatting tokens.

Practical Notes

NEFTune significantly increases AlpacaEval win rates when SFT datasets are small and prone to overfitting.

References

  1. NEFTune: Noisy Embeddings Improve Instruction Finetuning ↗

    Neel Jain, Ping-yeh Chiang, Yuxin Wen, John Kirchenbauer, Hong-Min Chu, Gowthami Somepalli et al. · 2023

    All 13 authors

    Neel Jain, Ping-yeh Chiang, Yuxin Wen, John Kirchenbauer, Hong-Min Chu, Gowthami Somepalli, Brian R. Bartoldson, Bhavya Kailkhura, Avi Schwarzschild, Aniruddha Saha, Micah Goldblum, Jonas Geiping, Tom Goldstein

  2. Instruction Tuning With Loss Over Instructions ↗

    Zhengyan Shi, Adam X. Yang, Bin Wu, Laurence Aitchison, Emine Yilmaz, Aldo Lipani · 2024