-
-
Notifications
You must be signed in to change notification settings - Fork 899
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: Learning Rate Groups | ||
description: "Setting different learning rates by module name" | ||
--- | ||
|
||
## Background | ||
|
||
Inspired by LoRA+, Axolotl allows practitioners to specify separate learning rates for each module or groups of | ||
modules in a model. | ||
|
||
## Example | ||
|
||
```yaml | ||
lr_groups: | ||
- name: o_proj | ||
modules: | ||
- self_attn.o_proj.weight | ||
lr: 1e-6 | ||
- name: q_proj | ||
modules: | ||
- model.layers.2.self_attn.q_proj.weight | ||
lr: 1e-5 | ||
|
||
learning_rate: 2e-5 | ||
``` | ||
In this example, we have a default learning rate of 2e-5 across the entire model, but we have a separate learning rate | ||
of 1e-6 for all the self attention `o_proj` modules across all layers, and a learning are of 1e-5 to the 3rd layer's | ||
self attention `q_proj` module. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters