external-gitcode-ascend-mindspeed-fsdp2-model-migration
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "external-gitcode-ascend-mindspeed-fsdp2-model-migration" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-9549a3b2a9c290d6d3f2909d2ba4749de9b74a424b38ff93afaee4eed72b0309. Verify the upstream source and version against https://github.com/ascend-ai-coding/awesome-ascend-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Registration and loading contract for migrating model-side components to MindSpeed-MM FSDP2, suitable for implementing model plugins, ensuring loading signature compatibility, and handling token/embedding related migration needs.
Introduction source: third_party · ascend-ai-coding · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Audience
- Translation pending; see source documentation.
- Inputs and outputs
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: external-gitcode-ascend-mindspeed-fsdp2-model-migration
description: 用于模型侧迁移到 MindSpeed-MM FSDP2 注册与加载契约。适用于实现模型插件、加载签名兼容、token/embedding
更新与前向兼容时。
original-name: mindspeed-fsdp2-model-migration
synced-from: https://gitcode.com/Ascend/agent-skills
synced-date: '2026-05-26'
synced-commit: 1f7666e7768a0ceb21bb1d40ce4b5179fcb6f1d6
license: UNKNOWNMindSpeed FSDP2 模型迁移
目标
在满足框架契约的前提下,将模型层迁移到 MindSpeed-MM FSDP2,并保持源模型语义。
适用场景
- 迁移任务需要在
mindspeed_mm/fsdp/models/下创建模型插件。 - 需要新增或修复
model_id注册及 ModelHub 兼容性。 - 需要适配模型加载签名(
from_pretrained、_from_config)。
不适用场景
- 任务是数据预处理或 dataloader 行为调整。
- 任务仅涉及 YAML 映射。
- 任务仅为验证阶段问题分诊。
输入
- 源模型入口文件
- 目标
model_id - 必需的特殊 token 行为
- 目标配置中的 FSDP2 约束
runtime_assets.model_path
输出
- 模型插件实现
- 带通过/失败状态的模型迁移检查清单
- 每一处“非复用改动”的理由说明
必检项
- 注册契约:
@model_register.register("<model_id>")
- 构建契约:
from_pretrained与ModelArguments调用链兼容_from_config路径有效
- 语义契约:
- 源模型需要特殊 token 时,必须保留其处理流程
- 仅在必要时进行 embedding resize/init
- 训练契约:
- 前向路径可接收 trainer 输入并返回
.loss
- 前向路径可接收 trainer 输入并返回
防偏差执行协议
- 实施前必须完成:
- 校验
runtime_assets.model_path存在且可读 - 对照最相似案例抽取签名模式
- 校验
- 实施后必须产出:
model_contract_checklist.mdsignature_compat_report.md
- 失败即停止:
from_pretrained或_from_config任一不兼容,禁止继续后续阶段
禁止行为
- 禁止把
from_pretrained写成仅单参数签名 - 禁止仅靠“代码阅读”判定兼容,必须给调用证据
- 禁止在未确认 token-id 对齐时修改 token 常量
- 禁止删除源模型关键后处理逻辑而不给出等价替代
实施规则
- 优先复用源逻辑;仅在框架契约不兼容时做适配。
- 修改范围仅限模型插件区域。
- 不引入对源仓包路径的外部硬依赖。
- 记录每项适配的精确原因。
退出标准
- 模型可通过 ModelHub 按目标
model_id构建。 - 加载签名冲突已解决。
- 模型侧清单结论均有证据支撑。
渐进式资源
checks/model-acceptance.mdchecks/model-contract-gates.mderrors/model-error-dictionary.mderrors/triage-severity.mdexamples/minimal-io.md
仅在验收或错误分诊需要详细判据时读取这些文件。
Current listing version
0.0.1
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 针对 MindSpeed-MM FSDP2 模型迁移提供清晰的注册与加载契约指导
- 适用于模型插件开发、签名兼容等具体工程需求,解决实际痛点
Highlights
- description 准确概括核心功能,适用与不适用场景边界清晰
- 能有效引导目标用户(AI 模型开发者)识别使用时机
Areas to improve
-
缺少 When to Use 显式章节 Reported severity: Minor
文档内容已涵盖使用场景,但未设置独立 'When to Use' 标题章节
Recommendation: 建议增加 'When to Use' 显式章节以提升可读性和规范性
Highlights
- 结构完整,包含目标、输入输出、必检项、防偏差协议等关键模块
- 逻辑清晰,有明确的退出标准和实施规则
Areas to improve
-
部分基础异常处理未覆盖 Reported severity: Minor
未明确说明源模型路径不存在或不可读时的处理流程
Recommendation: 建议在防偏差协议中补充基础 I/O 异常的兜底处理逻辑
Highlights
- 强调契约检查与证据支撑,设有失败即停止的门控机制
- 列出具体必检项和禁止行为,有效降低执行偏差风险
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- gitcode.com
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.