Skip to content

Commit f388bbe

Browse files
committed
fix
1 parent a28fdde commit f388bbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

colossalai/checkpoint_io/distributed_checkpoint_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ def load_dist_model(
408408
file_path = os.path.join(checkpoint, file)
409409
state_dict_shard = load_state_dict(file_path)
410410
for key, weight in state_dict_shard.items():
411-
if key not in covered_shards:
411+
if key not in covered_shards or rank not in covered_shards[key]:
412412
continue
413413
if dtype == None:
414414
dtype = weight.dtype

0 commit comments

Comments
 (0)