Skip to content
Open
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
7 changes: 6 additions & 1 deletion modelopt/torch/opt/plugins/mcore_dist_checkpointing.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
DROP_SUBSTRINGS = [
"fp4",
"fp8",
"tp_",
"parallel",
"cuda_graph",
"init_",
Expand All @@ -49,6 +48,10 @@
"pipeline",
"comm",
"batch",
"pg_collection",
]
DROP_STARTSWITH = [
"tp_", # would drop 'mtp_*' otherwise
]


Expand Down Expand Up @@ -145,6 +148,8 @@ def _parse_transformer_config(transformer_config: dict) -> dict:
for k, v in transformer_config.items():
if any(substring in k for substring in DROP_SUBSTRINGS):
continue
if any(k.startswith(prefix) for prefix in DROP_STARTSWITH):
continue
if isinstance(v, (bool, int, str)):
config[k] = v
else:
Expand Down