Repository navigation
fix(checkpoint): 保留专家反向转换的单例维度 - #1442
Closed
xingleixu123 wants to merge 1 commit into
Closed
xingleixu123 wants to merge 1 commit into
xingleixu123 wants to merge 1 commit into
Conversation
This was referenced Nov 4, 2026
3 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind bug
What does this PR do / why do we need it:
复用 Transformers
MergeModulelist的前向及其 Split 目标名逻辑,仅将反向squeeze()限定到专家轴,避免原权重的单例维度被额外删除。例:(1,1) -> (E,1,1) -> (1,1);原上游逆转换得到标量。将薄兼容放入现有
components/checkpoint/weight_conversion.py,模型适配器组合公共 Merge、Transpose、WeightConverter 与 HF Concatenate,不再各自实现 Pack/Unpack。上游已有同一修复 Transformers #49773,核验时仍 open;本修改保留已锁定依赖版本的可逆语义,不 monkeypatch 上游模块。仅一个 Python 逻辑文件;本轮按要求不带 UT/ST,实际复现和测试代码独立归档。此问题不被归因为 29B 历史训练精度差异。
Which issue(s) this PR fixes:
Related: https://github.com/hf1s/hyper-parallel/issues/357;总跟踪 hf1s#353,供 模型 #1439 复用。保持 Draft,不自动关闭问题。
Test Plan and Test result:
d4b9242922143481824fb8587680f2112ccd1cdb。(H,I)=(3,2)与单例(1,1):每组加载及逆导出的 72 个 FQN shape/dtype/值逐项一致。Code review checklist [illustration]: