已合并
【bugfix】修复使用GLM-5-FP8权重量化时保存后处理报错 #226
【bugfix】修复使用GLM-5-FP8权重量化时保存后处理报错 #226
已合并
zhangz200102创建于 3月17日
zhangz200102成员
3月17日

动机:当前glm5模型保存的后处理需要读取model.norm.weight去生成rot.safetensors用于解决mtp采信率低的问题,但在FP8原始权重上报错
解决方法:模型适配器中ascendv1_save_postprocess避免使用硬编码,读取原始权重的model.safetensors.index.json去获得model.norm.weight的路径索引
Changes to be committed:
modified: msmodelslim/model/glm_5/model_adapter.py

likedislike
Pull Request已成功合入, 合并人@ascend-robot
(感谢 zhangz200102 的贡献)
ascend-robot
ascend-robot成员
3月17日 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here。
You can get sig-info at here


PR Approval Progress

✅ Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
repo-Ascend/msmodelslim ✅ rookie_hongchuan, libarry, joejoezhou (3/2) ✅ joejoezhou (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

zhangz200102, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
ascend-robotascend-robot成员
3月17日 添加了label:ascend-cla/yes
ascend-robot
ascend-robot成员
3月17日 评论:

问题/功能描述

修复模型保存后处理函数中,加载原始模型归一化层权重路径硬编码的问题。原实现直接使用固定文件名来查找权重,这在模型文件分片策略变化时会导致文件找不到的错误。本次修改旨在提升代码的健壮性和对不同模型分片格式的兼容性。

修改方案描述

修改了相关方法中获取原始模型权重的逻辑,通过读取模型的索引文件来动态确定目标张量所在的正确分片文件路径,取代了原有的硬编码方式。同时,对代码导入语句进行了规范调整。

likedislike
ascend-robot
ascend-robot成员
3月17日 评论:

Ascend docs pipeline is running...

likedislike
ascend-robotascend-robot成员
3月17日 添加了label:docs-ci-pipeline-running
ascend-robot
ascend-robot成员
3月17日 评论:

✅ 跳过 docs ci 检查,没有需要检查的文档文件

likedislike
ascend-robotascend-robot成员
3月17日 删除了label:docs-ci-pipeline-running
ascend-robotascend-robot成员
3月17日 添加了label:docs-ci-pipeline-success
zhangz200102成员
3月17日 评论:

compile

likedislike
ascend-robot
ascend-robot成员
3月17日 评论:

Ascend docs pipeline is running...

likedislike
ascend-robotascend-robot成员
3月17日 删除了label:docs-ci-pipeline-success
ascend-robotascend-robot成员
3月17日 添加了label:docs-ci-pipeline-running
ascend-robot
ascend-robot成员
3月17日 评论:

✅ 跳过 docs ci 检查,没有需要检查的文档文件

likedislike
ascend-robotascend-robot成员
3月17日 删除了label:docs-ci-pipeline-running
ascend-robotascend-robot成员
3月17日 添加了label:docs-ci-pipeline-success
ascend-robotascend-robot成员
3月17日 添加了label:ci-pipeline-running
Zzhangz200102成员
3月17日 关联了issue:[Bug] 【自提】GLM-5-FP8权重量化时报错 FileNotFoundError
ascend-robotascend-robot成员
3月17日 删除了label:ci-pipeline-running
ascend-robotascend-robot成员
3月17日 添加了label:ci-pipeline-passed
ascend-robot
ascend-robot成员
3月17日 评论:
流水线 PR-pipeline_msmodelslim#622 已完成
阶段 任务名 状态 详情
编译构建 Build_msmodelslim ✅ >>>
恶意代码检查 Antipoison_MindStudio-ModelSlim ✅ >>>
编码安全与规范检查 CodeCheck_MindStudio-ModelSlim ✅ >>>
开源片段检查 SCA_MindStudio-ModelSlim ✅ >>>
开发者测试 UT_msmodelslim ✅ >>>
PreSmoke_msmodelslim ✅ >>>
流水线 PR-pipeline_msmodelslim ✅ >>>
likedislike
rookie_hongchuan成员
3月17日 评论:

/lgtm

likedislike
libowen
libowen成员
3月17日 评论:

/lgtm

likedislike
ascend-robotascend-robot成员
3月17日 添加了label:lgtm
joejoezhou成员
3月17日 评论:

/approve

likedislike
ascend-robotascend-robot成员
3月17日 添加了label:approved
ascend-robot
ascend-robot成员
3月17日 评论:

Review Guide

This pull-request passes review.
Committers who wrote a comment of /approve are: joejoezhou.
Reviewers who wrote a comment of /lgtm are: joejoezhou, rookie_hongchuan, libarry.

likedislike
ascend-robotascend-robot成员
3月17日 合入了pull request