Skip to content

Commit 7f6e45f

Browse files
authored
Fix conversion bug (#116)
* Fix * Format
1 parent f4426c2 commit 7f6e45f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

convert_checkpoints.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,10 @@ def _merge_llama_weights(
179179
f"{len(tensors)} shards (shape = {tensors[0].shape}) for {key})"
180180
)
181181
state_dict_for_key = {}
182-
for pattern, kind in llama_model.get_weight_sharding_type.items():
182+
weight_sharding_type = (
183+
llama_model.Transformer.get_weight_sharding_type().items()
184+
)
185+
for pattern, kind in weight_sharding_type:
183186
if not key.endswith(pattern):
184187
continue
185188
with torch.no_grad():

0 commit comments

Comments
 (0)