mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-06-25 01:41:19 +08:00
fix(mlx-lm): apply lora layer doesn't update the lora weights (#396)
This commit is contained in:
parent
ab8bde1590
commit
0a49ba0697
@ -33,6 +33,9 @@ def apply_lora_layers(model: nn.Module, adapter_file: str) -> nn.Module:
|
|||||||
linear_replacements.append((name, replacement_module))
|
linear_replacements.append((name, replacement_module))
|
||||||
|
|
||||||
model.update_modules(tree_unflatten(linear_replacements))
|
model.update_modules(tree_unflatten(linear_replacements))
|
||||||
|
|
||||||
|
model.update(tree_unflatten(adapters))
|
||||||
|
|
||||||
return model
|
return model
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user