Skip to content

Commit

Permalink
layer selection for ia3 (NVIDIA#7417)
Browse files Browse the repository at this point in the history
* layer selection for ia3

Signed-off-by: arendu <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: arendu <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: Sasha Meister <[email protected]>
  • Loading branch information
2 people authored and ssh-meister committed Oct 5, 2023
1 parent f6fc39a commit 2147faa
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,11 @@ def __init__(self, cfg: DictConfig, trainer: Trainer):
self.name_key_to_cfg[k] = infused_adapter_cfg
else:
raise ValueError(f"PEFT Key {k} is unknown.")

self.layer_selection = cfg.peft.ia3_tuning.get("layer_selection", None)
if self.layer_selection is None:
self.layer_selection = list(range(1, cfg.num_layers + 1))

super().__init__(cfg, trainer)


Expand Down

0 comments on commit 2147faa

Please sign in to comment.