Update _utils.py
This commit is contained in:
parent
648bde7f06
commit
66874d9918
1 changed files with 1 additions and 1 deletions
|
|
@ -96,7 +96,7 @@ def prepare_model_for_kbit_training(
|
|||
|
||||
# Freeze all parameters except LoRA
|
||||
import re
|
||||
with torch.inference_mode():
|
||||
with torch.no_grad():
|
||||
for name, param in model.named_parameters():
|
||||
if ".lora_A." in name or ".lora_B." in name or ".lora_magnitude_vector" in name:
|
||||
param.requires_grad_(True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue