Skip to content

Commit 7336f48

Browse files
committed
fix bug
1 parent 4a04298 commit 7336f48

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

configs/7B_internlm2.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
# as broadcast_load may cause loading performance degradation.
4444
# NOTE: If using aysnc_save, there is a risk of losing the latest ckpt
4545
# when there is a sudden training interruption.
46-
universal_ckpt=dict(enable=True, aysnc_save=True, broadcast_load=False),
46+
universal_ckpt=dict(enable=False, aysnc_save=True, broadcast_load=False),
4747
)
4848

4949
TRAIN_FOLDER = None

tests/test_training/train_CI.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from internlm.checkpoint import CheckpointManager # noqa: E402
2121
from internlm.core.context import ParallelMode # noqa: E402
2222
from internlm.core.context import global_context as gpc # noqa: E402
23-
from internlm.core.trainer import TrainState, Trainer # noqa: E402
23+
from internlm.core.trainer import Trainer, TrainState # noqa: E402
2424
from internlm.data import ( # noqa: E402
2525
build_train_loader_with_data_type,
2626
build_valid_loader_with_data_type,
@@ -70,7 +70,8 @@ def check_model_weights(model, ckpt_path, total_equal=False):
7070
model2_dict[key.replace("wqkv", "Wqkv")] = model2_dict.pop(key)
7171
key = key.replace("wqkv", "Wqkv")
7272
if key not in model1_dict:
73-
assert False, f"Error: The key {key} for current model dose not exist in standard ckpt!"
73+
if "Wqkv" not in key:
74+
assert False, f"Error: The key {key} for current model dose not exist in standard ckpt!"
7475

7576
for key in model1_dict.keys():
7677
if key in model2_dict:

0 commit comments

Comments
 (0)