Skip to content

Commit

Permalink
fix lookup and add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
winglian committed Dec 26, 2024
1 parent 32ab034 commit 932fe10
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Empty file added docs/lr_groups.qmd
Empty file.
7 changes: 6 additions & 1 deletion src/axolotl/core/trainer_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,12 @@ def create_optimizer_grouped_parameters(self, opt_model, optimizer_kwargs):
if lr_groups_lookup and any(
group_modules in name for group_modules in lr_groups_lookup
):
group_name = lr_groups_lookup[name]
lr_group_module = [
group_modules
for group_modules in lr_groups_lookup
if group_modules in name
][0]
group_name = lr_groups_lookup[lr_group_module]
params[f"to_weight_decay_{group_name}"][name] = param
else:
params["to_weight_decay"][name] = param
Expand Down

0 comments on commit 932fe10

Please sign in to comment.