Okay, let's look at common learning rates for fine-tuning a 7B parameter language model using LoRA with your specified parameters (r=16, alpha=32, dropout=0.05).
Based on the search results, here's a breakdown of common learning rates (LR) for fine-tuning a 7B model using LoRA, considering your parameters (r=16, alpha=32, dropout=0.05):
Common Range and Starting Points:
1e-4 (or 0.0001) is frequently cited as a standard or default starting point for LoRA fine-tuning[1][2]. Several guides and examples suggest using this rate[2].
2e-4 (or 0.0002) is another commonly used value, seen in successful fine-tuning examples, like one for Llama-2-7B with r=16 (though alpha=16 in that specific case)[3]. Some discussions also mention 2e-4 as a typical rate for 7B models[4].
3e-5 (or 0.00003) has been used effectively to stabilize training when higher learning rates like 1e-4 caused issues[1].
- Higher rates are possible with LoRA: LoRA generally allows for potentially higher learning rates compared to full fine-tuning[5]. Values up to
5e-4 have been mentioned in some contexts[6].
Key Considerations:
- Sensitivity: LoRA is known to be sensitive to the learning rate[2]. A rate that's too high can lead to training instability (loss exploding)[1].
- Experimentation is Crucial: While the above are common starting points, the optimal learning rate heavily depends on your specific dataset, task, and other hyperparameters (like batch size and scheduler)[7]. These values are best treated as starting points for your own tuning[7][8].
- Learning Rate Schedulers: Using a learning rate scheduler, like cosine annealing (decaying the LR over time), is common practice and can significantly impact performance, especially when using optimizers like SGD, though its impact might be less pronounced with Adam/AdamW[9].
- Alpha/Rank Ratio: Your
alpha/r ratio is 32/16 = 2. Some sources suggest alpha = 2 * r as a good heuristic[9][10]. The alpha value acts as a scaling factor for the LoRA updates[9]. Tuning alpha can be seen as somewhat similar to tuning the learning rate[7]. The learning rates mentioned above (like 1e-4, 2e-4) are often used with these common alpha/rank ratios[1][3].
- Comparison to Full Fine-tuning: Learning rates for LoRA are typically higher than for full fine-tuning, where rates like
1e-5 or 5e-6 might be more appropriate[2][8].
Recommendation:
Given your setup (7B model, r=16, alpha=32), a good starting point would be 1e-4 or 2e-4. Monitor your training loss closely. If you observe instability (loss spikes or doesn't decrease smoothly), try reducing the learning rate, perhaps to 5e-5 or 3e-5[1]. Remember to use a suitable learning rate scheduler, like cosine decay[9][8].