Skip to content

Commit 2c692fe

Browse files
yaoyu-33claude
andcommitted
[misc] fix: address cuichenx PR review comments for MiniMax-M2
- Remove dtype-mismatch silencing in hf_megatron_roundtrip_multi_gpu.py: only cast to float32 for params listed in IGNORE_PRECISION_PARAMS, not silently whenever dtypes differ (which would hide real issues) - Remove /lustre reference from MiniMax-M2 slurm_conversion.sh example mount Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
1 parent 80bafee commit 2c692fe

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎examples/conversion/hf_megatron_roundtrip_multi_gpu.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@ def main(
166166
original_param = bridge.hf_pretrained.state[name]
167167
compare_param = param
168168
compare_original = original_param
169-
# Cast to float32 when dtypes differ (e.g. fp8 HF weights vs bf16 Megatron,
170-
# or Megatron keeping expert_bias in float32 while HF uses bfloat16)
171-
if compare_param.dtype != compare_original.dtype or any(p in name for p in IGNORE_PRECISION_PARAMS):
169+
# Cast to float32 for params with known precision mismatches.
170+
# Any new known mismatch should be recorded in IGNORE_PRECISION_PARAMS above.
171+
if any(p in name for p in IGNORE_PRECISION_PARAMS):
172172
compare_param = param.float()
173173
compare_original = original_param.float()
174174
match = torch.allclose(compare_param, compare_original.to(compare_param.device), atol=1e-1)

‎examples/models/minimax_m2/slurm_conversion.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
CONTAINER_IMAGE=""
4444
# CONTAINER_IMAGE="/path/to/container.sqsh"
4545
CONTAINER_MOUNTS=""
46-
# CONTAINER_MOUNTS="/lustre:/lustre,/path/to/project:/opt/Megatron-Bridge"
46+
# CONTAINER_MOUNTS="/path/to/shared/storage:/mnt/storage,/path/to/project:/opt/Megatron-Bridge"
4747
WORKDIR="/opt/Megatron-Bridge"
4848

4949
# ── Tokens / Caches ──────────────────────────────────────────────────────

0 commit comments

Comments
 (0)