mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-08-29 18:26:37 +08:00
Update lora.py
This commit is contained in:
parent
95d44228c9
commit
0f790c4c84
@ -177,7 +177,7 @@ def train_model(
|
|||||||
):
|
):
|
||||||
model.freeze()
|
model.freeze()
|
||||||
if args.fine_tune_type == "full":
|
if args.fine_tune_type == "full":
|
||||||
for l in model.layers[-min(args.num_layers, 0) :]:
|
for l in model.layers[-max(args.num_layers, 0) :]:
|
||||||
l.unfreeze()
|
l.unfreeze()
|
||||||
elif args.fine_tune_type in ["lora", "dora"]:
|
elif args.fine_tune_type in ["lora", "dora"]:
|
||||||
# Convert linear layers to lora/dora layers and unfreeze in the process
|
# Convert linear layers to lora/dora layers and unfreeze in the process
|
||||||
|
Loading…
Reference in New Issue
Block a user