mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-06-24 17:31:18 +08:00
fix: check LoRA layers number error (#446)
This commit is contained in:
parent
837a02092d
commit
726b1ddec0
@ -21,7 +21,7 @@ def linear_to_lora_layers(model: nn.Module, num_lora_layers: int):
|
||||
if num_lora_layers > num_model:
|
||||
raise ValueError(
|
||||
f"Requested {num_lora_layers} LoRA layers "
|
||||
f"but the model only has {num_model_layers} layers."
|
||||
f"but the model only has {num_model} layers."
|
||||
)
|
||||
|
||||
if model.model_type in [
|
||||
|
Loading…
Reference in New Issue
Block a user