Added Mixture of Depths

This commit is contained in:
Marco
2024-04-18 20:31:24 +02:00
parent 2aaaede247
commit 620add7b9f
10 changed files with 103 additions and 6 deletions

View File

@@ -69,6 +69,8 @@ def init_adapter(
for name, _ in model.named_modules():
if ".0." in name:
freeze_modules.add(name.split(".0.")[-1].split(".")[0])
elif ".1." in name: # here since MoD starts from layer 1
freeze_modules.add(name.split(".1.")[-1].split(".")[0])
trainable_layers = []
for module_name in finetuning_args.name_module_trainable: