Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
li126com committed Dec 26, 2024
1 parent 4a04298 commit 7336f48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion configs/7B_internlm2.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
# as broadcast_load may cause loading performance degradation.
# NOTE: If using aysnc_save, there is a risk of losing the latest ckpt
# when there is a sudden training interruption.
universal_ckpt=dict(enable=True, aysnc_save=True, broadcast_load=False),
universal_ckpt=dict(enable=False, aysnc_save=True, broadcast_load=False),
)

TRAIN_FOLDER = None
Expand Down
5 changes: 3 additions & 2 deletions tests/test_training/train_CI.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from internlm.checkpoint import CheckpointManager # noqa: E402
from internlm.core.context import ParallelMode # noqa: E402
from internlm.core.context import global_context as gpc # noqa: E402
from internlm.core.trainer import TrainState, Trainer # noqa: E402
from internlm.core.trainer import Trainer, TrainState # noqa: E402
from internlm.data import ( # noqa: E402
build_train_loader_with_data_type,
build_valid_loader_with_data_type,
Expand Down Expand Up @@ -70,7 +70,8 @@ def check_model_weights(model, ckpt_path, total_equal=False):
model2_dict[key.replace("wqkv", "Wqkv")] = model2_dict.pop(key)
key = key.replace("wqkv", "Wqkv")
if key not in model1_dict:
assert False, f"Error: The key {key} for current model dose not exist in standard ckpt!"
if "Wqkv" not in key:
assert False, f"Error: The key {key} for current model dose not exist in standard ckpt!"

for key in model1_dict.keys():
if key in model2_dict:
Expand Down

0 comments on commit 7336f48

Please sign in to comment.