onescience-parallel SKILL.md skillA
onescience-parallel from onescience-ai/oneskills is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add onescience-ai/oneskills/onescience-parallel@git:20261030.3665286Pins git:20261030.3665286 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- onescience-ai/oneskills
- Path
skills/onescience-parallel/SKILL.md- Versions recorded
- 5
- Latest version
- git:20261030.3665286, committed Oct 30, 2026
- First version recorded
- Jun 10, 2026
- Size
- 37,492 bytes
- Repository stars
- 24
- License
- MIT
将 PyTorch 模型改造为支持 Pipeline Parallelism (PP) + Tensor Parallelism (TP) 的分布式训练模型。 适用场景:单机单卡模型改多卡分布式、模型拆分为多个 pipeline stage、替换 nn.Linear 为并行线性层、 编写 forward_step_func / model_provider / dataset_provider、配置 PipelineTensorShapeConfig、 创建 Distributed 版本模块(DistributedFuser / DistributedAttention / DistributedMlp)。 当用户提到以下任何关键词时,务必使用此 skill: "流水线并行"、"pipeline parallel"、"模型并行改造"、"分布式训练"、"stage 拆分"、 "ColumnParallelLinear"、"RowParallelLinear"、"pretrain 接口"、"forward_step_func"、 "model_provider"、…
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
## 输入获取方式
本技能支持两种输入方式:
1. **上下文 handoff**(默认):从调用方传入的 `step_handoff` 获取任务信息。
2. **文件 handoff**(autonomous_mode):从 `.onescience/handoff/step_{step_id}.yaml`
读取任务信息。执行后,将结果写入 `.onescience/handoff/step_{step_id}_result.yaml`。
启动时优先检查 `.onescience/handoff/` 目录是否存在对应的交接文件;若存在则使用文件模式,否则使用上下文模式。
文件交接格式参见 `skills/onescience-orchestrator/references/file_handoff_contract.md`。
# Pipeline Parallel 改造 Skill
## 重要原则(必读)
1. **复用 OneScience 模块**:所有基础模块必须使用 `onescience` 已有实现,禁止重复实现
2. **先读后写**:开始前必须阅读 `context.md` 和 `architecture.md`
3. **参考已有实现**:必须参考 `examples/earth/pangu_weather_distributed/` 的 pangu 实现
4. **保持参数一致性**:进行并行改造时,各 Stage 类的 `__init__` 参数签名和内部初始化逻辑应尽可能与原模型保持完全一致(如 `config`、 `mask` 等参数的处
理),避免随意更改参数名或逻辑。
5. **严禁循环导入**:在创建 Distributed 模块(如 `{StyleName}DistributedFuser`)时, **禁止**在模块内部导入 `OneFuser`、 `OneTransformer` 等顶层包装类
,因为这些包装类通常已经导入了你的 Distributed 模块,会导致 `ImportError`。应直接导入具体的子模块类(如 `from .{stylename}distributedlocalsiefuser im
port {StyleName}DistributedLocalSIEFuser`)。
---
## 改造三步流程
```
步骤 1:模型拆分 (PP) → 步骤 2: TP 并行模块 → 步骤 3:训练接口对接
```
---
## 步骤 1:模型拆分(Pipeline Parallel)
### 1.1 切分策略
按前向执行顺序找**计算串行边界**,切点满足:
- 数据依赖最少(只有一个 tensor 出口)
…Read the whole file at its exact version.
How to install
mdr add onescience-ai/oneskills/onescience-parallel@sha256:6e3d2d1af2d26186The line at the top of this page pins the label git:20261030.3665286, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_hvxk2x6dh5yjchgk)
3 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 5 versions of this file, between Jun 10, 2026 and Oct 30, 2026, about one every 36 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20261030.3665286 latest | 2026-10-30 | 3665286 | 37,492 B | A | view · diff |
| git:20260814.1419d1c | 2026-08-14 | 1419d1c | 36,638 B | A | view · diff |
| git:20260708.9ba4099 | 2026-07-08 | 9ba4099 | 36,033 B | A | view · diff |
| git:20260612.7611060 | 2026-06-12 | 7611060 | 36,018 B | A | view · diff |
| git:20260610.3755d06 | 2026-06-10 | 3755d06 | 32,456 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (37492 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
onescience-ai/oneskills · 24 stars · license MIT · pushed 2026-11-04 · branch master
API
GET https://markdownregistry.com/api/v1/artifacts/art_hvxk2x6dh5yjchgk GET https://markdownregistry.com/api/v1/resolve?ref=onescience-ai/oneskills/onescience-parallel GET https://markdownregistry.com/api/v1/blob/6e3d2d1af2d26186786cae98b772ad5d295a51afcce143d437248c35ef6779cd
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.