Skip to content

Commit 62fa472

Browse files
committed
Fix potential Safetensors memory leak and limit system RAM usage while loading model
1 parent 617fd2a commit 62fa472

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lora.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def __init__(self, model, lora_config_path, lora_path):
114114

115115
# Move to target device
116116

117-
device = self.config.device_map.map(target_key, loading = True)
117+
device = self.config.device_map.map(target_key)
118118
tensor = tensor.to(device, non_blocking = True)
119119

120120
# Store adapter tensor

0 commit comments

Comments
 (0)