mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-09-01 12:49:50 +08:00
version bump + some fixes (#792)
This commit is contained in:
@@ -54,6 +54,10 @@ def linear_to_lora_layers(
|
||||
"""
|
||||
|
||||
num_layers = len(model.layers)
|
||||
|
||||
if num_lora_layers < 0:
|
||||
num_lora_layers = num_layers
|
||||
|
||||
if num_lora_layers > num_layers:
|
||||
raise ValueError(
|
||||
f"Requested {num_lora_layers} LoRA layers "
|
||||
|
Reference in New Issue
Block a user