已合并
TP2D看护用例+说明文档 #2343
AtomGit-Bot创建于 2025年3月5日
TP2D看护用例+说明文档 #2343
已合并
AtomGit-Bot创建于 2025年3月5日
refs/pull/2343/head合入到master
AtomGit-Bot
2025年3月5日
  1. TP2D看护用例+说明文档
  2. 加载实际权重,忽略 ___extra_state参数
def parallell_linear_2D_init_wrapper(fn):
    @wraps(fn)
    def wrapper(self, *args, **kwargs):
        fn(self, *args, **kwargs)
        self._register_load_state_dict_pre_hook(
            lambda state_dict, prefix, *args, **kwargs: state_dict.setdefault(f'{prefix}_extra_state'))

    return wrapper
likedislike
Pull Request已成功合入, 合并人@
(感谢 AtomGit-Bot 的贡献)
AAtomGit-Bot
2025年3月6日 更新了说明
AtlasAccountAtlasAccount成员
2025年3月6日 移除了   ci-pipeline-running 标签
AAtomGit-Bot
2025年3月6日 推送了代码
AtlasAccountAtlasAccount成员
2025年3月6日 添加了   ci-pipeline-running 标签
AAtomGit-Bot
2025年3月6日 更新了说明
此处折叠了106条消息 查看更多
AtlasAccountAtlasAccount成员
2025年3月6日 添加了   ci-pipeline-failed 标签
wx_4e191bb7af2025年3月6日进行代码检视1
mindspeed_llm/tasks/megatron_adaptor.py
@@ -92,6 +92,10 @@ class MegatronAdaptation:
9292 group.add_argument('--swap-attention', action='store_true', default=False)
9393 group.add_argument('--memory-fragmentation', type=bool, default=False)
9494 group.add_argument('--layerzero', action='store_true', default=False)
95+ group.add_argument("--megatron-cp-in-bnsd", action='store_true',
96+ help="Megatron CP in bnsd.")
97+ group.add_argument('--use-fusion-attn-v2', action='store_true', default=False,
98+ help='use fusion_attention ops version 2')
9599
96100 for feature in FEATURES_LIST:
97101 feature.default_patches = False
@@ -268,6 +272,11 @@ class CoreAdaptation(MegatronAdaptationABC):
268272 attention_init)
269273 MegatronAdaptation.register('megatron.core.transformer.attention.SelfAttention.__init__',
270274 self_attention_init_wrapper)
275+ if MegatronAdaptation.get_args().tp_2d:
wx_4e191bb7af2025年3月6日评论:

这里需要使用if else吧,megatron.core.transformer.attention.SelfAttention.__init__269行已经打过patch了,这里if成立会重复导致报错吧。

likedislike
wx_4e191bb7af2025年3月6日进行代码检视1
mindspeed_llm/training/arguments.py
@@ -1317,3 +1318,4 @@
13171318 
13181319 
13191320def _validate_noop_layer(args):
wx_4e191bb7af2025年3月6日评论:

我们不支持的特性参数最好在dummy函数里进行屏蔽,支持的特性才会注册参数

likedislike
AtlasAccountAtlasAccount成员
2025年3月6日 移除了   ci-pipeline-running 标签
wx_4e191bb7af
2025年3月7日 评论:

/lgtm

likedislike