mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-06-25 18:07:28 +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:
|
if num_lora_layers > num_model:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"Requested {num_lora_layers} LoRA layers "
|
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 [
|
if model.model_type in [
|
||||||
|
Loading…
Reference in New Issue
Block a user