PR: 新增 Qwen3-8B RLOO FSDP2 Ascend NPU 训练脚本 - #105
Open
erfgss wants to merge 1 commit into
Open
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.
PR: 新增 Qwen3-8B RLOO FSDP2 Ascend NPU 训练脚本
概述
新增
verl-ascend-recipe/rloo/run_qwen3_8b_rloo_fsdp_npu.sh,提供一套在昇腾Ascend A2/A3 上使用 RLOO 算法训练 Qwen3-8B 的开箱即用启动脚本。训练侧采用 FSDP2 并行策略,推理侧采用 vLLM-Ascend 作为 rollout 引擎。主要特性
algorithm.adv_estimator=rloo),在 reward 中使用 KL 惩罚(kl_coef=0.001),不启用 critic(critic.enable=False)。gpu_memory_utilization=0.82,每 prompt 采样n=5,开启 chunked prefill、prefix caching、free_cache_engine,并配置 CUDA graph 捕获尺寸(FULL_DECODE_ONLY模式)。train.parquet/test.parquet),prompt 最大 1024 token,response 最大 4096 token。train_batch_size=256,ppo_mini_batch_size=16,学习率 1e-6(constant 调度),默认训练 100 步,每 10 步验证/保存 checkpoint。使用方式
bash run_qwen3_8b_rloo_fsdp_npu.sh \ --data_path=/path/to/data \ --model_path=/path/to/Qwen3-8B--data_path:数据目录,必须包含train.parquet和test.parquet。--model_path:Qwen3-8B 模型权重目录。verl.trainer.main_ppo,例如冒烟测试:bash run_qwen3_8b_rloo_fsdp_npu.sh \ --data_path=/workspace/data/gsm8k \ --model_path=/workspace/models \ data.train_batch_size=16 \ actor_rollout_ref.actor.ppo_mini_batch_size=4 \ trainer.total_training_steps=1 \ trainer.val_before_train=False \ trainer.test_freq=1000 \ trainer.save_freq=1000 \ trainer.log_val_generations=0