Skip to content

feat(recipe): add Ascend Megatron OPD recipes - #89

Open
egangu wants to merge 3 commits into
verl-project:mainfrom
egangu:codex/opd-megatron-vllm-ascend
Open

feat(recipe): add Ascend Megatron OPD recipes#89
egangu wants to merge 3 commits into
verl-project:mainfrom
egangu:codex/opd-megatron-vllm-ascend

Conversation

@egangu

@egangu egangu commented Aug 24, 2026

Copy link
Copy Markdown

交付内容

关联社区任务:#21

本 PR 在独立 opd/ 目录交付两条经过四卡验证的 Megatron + vLLM Ascend OPD 配方:

  • Qwen2.5-0.5B student <- Qwen2.5-3B-Instruct teacher,GSM8K,forward_kl_topk、top-k 64;
  • Qwen3-VL-2B-Instruct student <- Qwen3-VL-4B-Instruct teacher,Geo3K,K1、top-k 64、policy-gradient weighting、无 task reward。

同时包含:

  • 单文件中英双语算法适配调优文档;
  • 可由仓库安装器解析的 REQUIRED_VERL.txt
  • Qwen3-VL ragged MRoPE 和 reverse-KL finite-value 的独立兼容 patch。

核心 VeRL 改动对应 verl PR #7333。recipe 现固定官方 release/v0.8.0,并在源码安装时应用仓库内兼容 patch,不再依赖个人 fork。

四卡验收结果

链路 训练 reward 前/后窗口 loss 前/后窗口 稳态 global TPS 下游 step0 / step100
Qwen2.5 / GSM8K 100/100,exit 0 0.00833 / 0.16667 0.54703 / 0.27079 223.41 0.607% / 28.279%
Qwen3-VL / Geo3K 100/100,exit 0 0.225000 / 0.248906 0.268061 / 0.207617 1368.02 composite 0.251581 / 0.271048

完整、未截断训练日志:public Gist。本次按交付约定核对日志内容,不设置日志哈希门禁。

实践文档与运行说明:opd/README.md

检查

  • bash -n opd/run_qwen2_5_0_5b_megatron_npu.sh opd/run_qwen3_vl_2b_megatron_npu.sh — passed
  • shellcheck opd/*.sh — passed
  • 两条脚本使用 /bin/echo 的参数 dry-run — passed;模型对、四卡 2+2、batch、序列长度、OPD loss 和100步配置解析正确
  • bash install_verl.sh --recipe opd --show — passed
  • git apply --check --unidiff-zero against the recorded PATCH_BASE — passed
  • uvx pre-commit run --files <changed files> — passed(Ruff hooks无适用 Python 文件)
  • git diff --check upstream/main...HEAD — passed
  • Standards/spec 双轴 review 及修复后复审 — passed

本次 recipe 仓迁移没有重复启动100步训练;上表来自同一解析配置的已完成四卡验收运行,完整日志已公开。

This contribution was developed with assistance from OpenAI Codex. The human submitter remains responsible for review, validation, and submission.

Add the Qwen2.5 and Qwen3-VL four-NPU OPD launchers, a bilingual practice guide, the exact reviewed VeRL dependency, and the standalone compatibility patch.

Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Egan <yanggangu@outlook.com>
Comment thread opd/REQUIRED_VERL.txt Outdated
UPSTREAM=https://github.com/egangu/verl.git
MODE=pinned_commit
COMMIT=94f869c00b85beb177276cbbb0124f366be28db6
PIP_INSTALL=pip install verl@git+https://github.com/egangu/verl.git@94f869c00b85beb177276cbbb0124f366be28db6

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

当前安装为私人分支,需要修改为release/0.8.0或其他release分支

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已在 d153c75 修正:改用官方 verl-project/verl@release/v0.8.0;源码安装会先应用仓库内兼容 patch,不再依赖个人 fork。README 已同步,且 release 上的 patch check、安装器 dry-run、脚本语法与参数 dry-run 均通过。

egangu and others added 2 commits September 1, 2026 15:58
Signed-off-by: Egan <yanggangu@outlook.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Egan <yanggangu@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants