feat(recipe): add Nemotron Nano 9B v2 GRPO recipe for Ascend - #110
Open
OnPathXD wants to merge 1 commit into
Open
feat(recipe): add Nemotron Nano 9B v2 GRPO recipe for Ascend#110OnPathXD wants to merge 1 commit into
OnPathXD wants to merge 1 commit into
Conversation
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.
适配范围
关联社区任务:#70
本 PR 提供 NVIDIA Nemotron Nano 9B v2 在 8 张 Ascend NPU 上执行 GRPO 训练的 recipe。训练侧使用 BF16 Megatron,rollout 侧使用 vLLM-Ascend async mode,reward 使用 DAPO rule reward。
实现沿用
verl的 canonical Nemotron Nano Megatron GRPO 示例。针对模型的 Mamba2 层,单一 Bash 脚本通过VERL_USE_EXTERNAL_MODULES加载临时运行模块:训练与 prefill 接入 MindSpeed-LLM NPU SSD,单 token decode 使用可由FULL_DECODE_ONLY捕获的 NPU tensor 路径,不需要额外修改verl仓库源码。文件职责
grpo/nemotron-nano-9b-v2/run_nemotron_nano_9b_v2_grpo_megatron_npu.shgrpo/nemotron-nano-9b-v2/README.mdgrpo/nemotron-nano-9b-v2/assets/reward_curve.pnggrpo/nemotron-nano-9b-v2/assets/loss_curve.png八卡运行入口
准备模型及 DAPO-Math-17k、AIME-2024 parquet 后,从
verl根目录执行:验收配置使用 train batch size 32、每个 prompt 生成 16 条 response、PPO mini/micro batch size 32/8、prompt/response 上限 2048/1024、Megatron TP8、vLLM-Ascend TP8、512 个 rollout max sequences。图模式为
FULL_DECODE_ONLY,capture sizes 为 1 至 512 的二次幂。完整环境、参数和可覆盖项见grpo/nemotron-nano-9b-v2/README.md。验收记录
平台:8 x Ascend 910B3。
从初始权重连续训练 13 小时 00 分 09 秒,完成 77 个 optimizer steps。
critic/rewards/mean首 10 步 / 末 10 步TPS 采用训练日志中的
perf/throughput单 NPU 值,并乘以 8 得到聚合值。reward 首尾窗口增量为正,平均单 NPU TPS 高于 100 tokens/s。grpo/nemotron-nano-9b-v2/README.md核对结果
bash -n grpo/nemotron-nano-9b-v2/run_nemotron_nano_9b_v2_grpo_megatron_npu.shgit diff --checkCloses #70