Technique to improve instruction finetuning of LLMs
Top 73.8% on sourcepulse
NEFTune introduces a simple yet effective method to enhance instruction fine-tuning for Large Language Models (LLMs) by adding random noise to embedding vectors during training. This technique, aimed at researchers and practitioners working with LLMs, significantly improves conversational quality and instruction-following capabilities without requiring additional compute or data.
How It Works
NEFTune injects noise into the embedding layer's output during the forward pass of fine-tuning. By adding uniformly distributed noise scaled by a factor noise_alpha
, the method perturbs the embedding space. This perturbation is hypothesized to improve generalization and robustness, leading to substantial gains in downstream conversational tasks, as demonstrated by a significant jump in AlpacaEval performance. The noise is only applied during training, ensuring standard behavior during inference.
Quick Start & Requirements
Highlighted Details
Maintenance & Community
The project has seen integration into major libraries like Huggingface TRL and Ludwig.ai, indicating active development and adoption. Direct contact information for the author is available in the linked paper for feedback and inquiries.
Licensing & Compatibility
The repository does not explicitly state a license. However, its integration into Huggingface and Ludwig suggests a permissive approach, but users should verify licensing for commercial or closed-source applications.
Limitations & Caveats
The study's findings are primarily based on AlpacaEval, which relies on a single judge (GPT-4) and may have biases. Validation on larger LLM variants (70B+) and diverse datasets was limited due to computational constraints. The exact mechanism behind NEFTune's effectiveness remains an open research question.
1 year ago
1 day