Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion convert_checkpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,10 @@ def _merge_llama_weights(
f"{len(tensors)} shards (shape = {tensors[0].shape}) for {key})"
)
state_dict_for_key = {}
for pattern, kind in llama_model.get_weight_sharding_type.items():
weight_sharding_type = (
llama_model.Transformer.get_weight_sharding_type().items()
)
for pattern, kind in weight_sharding_type:
if not key.endswith(pattern):
continue
with torch.no_grad():
Expand Down