Skip to content

Commit 6d8f9eb

Browse files
committed
Merge remote-tracking branch 'origin' into kylesayrs/reduce-quantized-compression-memory
2 parents b37b7ff + 4759a86 commit 6d8f9eb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/compressed_tensors/utils/safetensors_load.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,11 @@ def get_nested_weight_mappings(
235235
for key, file_location in weight_mappings.items():
236236
matched = False
237237
for param_name in params_to_nest:
238-
dense_param = match_param_name(key, param_name)
239-
if dense_param:
240-
if dense_param not in nested_weight_mappings:
241-
nested_weight_mappings[dense_param] = {}
242-
nested_weight_mappings[dense_param][param_name] = file_location
238+
module_path = match_param_name(key, param_name)
239+
if module_path:
240+
if module_path not in nested_weight_mappings:
241+
nested_weight_mappings[module_path] = {}
242+
nested_weight_mappings[module_path][param_name] = file_location
243243
matched = True
244244
if return_unmatched_params and not matched:
245245
unmatched_params[key] = file_location

0 commit comments

Comments
 (0)