fix: check LoRA layers number error (#446)

This commit is contained in:
Madroid Ma 2024-02-16 22:03:33 +08:00 committed by GitHub
parent 837a02092d
commit 726b1ddec0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 [