Skip to content

Commit

Permalink
Revert "Fix the names of two sets of weight and bias in mcore_to_nemo…
Browse files Browse the repository at this point in the history
…_mapping" (NVIDIA#11560)

* Revert "Fix the names of two sets of weight and bias in mcore_to_nemo_mapping (NVIDIA#9628)"

This reverts commit 6784db5.

* keep underscores

Signed-off-by: ashors1 <[email protected]>

---------

Signed-off-by: ashors1 <[email protected]>
  • Loading branch information
ashors1 authored Dec 13, 2024
1 parent 849e58e commit 6932216
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/checkpoint_converters/convert_gpt_nemo_to_mcore.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ def build_key_mapping(nemo_cfg):
for wb in ('weight', 'bias') if has_layernorm_bias else ('weight',):
mcore_to_nemo_mapping.update(
{
f"{mcore_prefix}.{i}.input_layernorm.{wb}": f"{nemo_prefix}.{i}.input_layernorm.{wb}",
f"{mcore_prefix}.{i}.pre_mlp_layernorm.{wb}": f"{nemo_prefix}.{i}.post_attention_layernorm.{wb}",
f"{mcore_prefix}.{i}.self_attention.linear_qkv.layer_norm_{wb}": f"{nemo_prefix}.{i}.input_layernorm.{wb}",
f"{mcore_prefix}.{i}.mlp.linear_fc1.layer_norm_{wb}": f"{nemo_prefix}.{i}.post_attention_layernorm.{wb}",
}
)

Expand Down

0 comments on commit 6932216

Please sign in to comment.