rl-agent-training
Plan and adapt OpenRLHF PPO/Ray/vLLM reinforcement-learning runs, including REINFORCE++/baseline, GRPO/RLOO/Dr.GRPO, DAPO-style filtering, async and partial rollout, custom rewards, multi-turn agents, VLM agents, and OpenAI-compatible agent executors.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- rl-agent-training
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Plan and adapt OpenRLHF PPO/Ray/vLLM reinforcement-learning runs, including REINFORCE++/baseline, GRPO/RLOO/Dr.GRPO, DAPO-style filtering, async and partial rollout, custom rewards, multi-turn agents, VLM agents, and OpenAI-compatible agent executors.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/agent-functions.md5.8 KB
- 参考文档references/cli-reference.md7.1 KB
- 参考文档references/rl-workflows.md7.4 KB
- 参考文档references/troubleshooting.md7.3 KB
- 脚本scripts/create_reward_or_agent_template.py6.5 KB
03 SKILL.md 正文
OpenRLHF RL Agent Training
Use this sub-skill when the task is to configure, modify, or troubleshoot OpenRLHF RL training through python -m openrlhf.cli.train_ppo_ray, especially with Ray, vLLM, PPO-family algorithms, custom reward functions, or agent executors.
Route first
- For SFT, reward-model, DPO/IPO/KTO, or offline preference training, use the supervised-preference-training sub-skill instead.
- For dataset schemas, chat templates,
--data.input_key,--data.label_key, image keys, or prompt preprocessing, use the data-preparation sub-skill first, then return here for RL flags. - For package installation, Ray cluster launch, NCCL/CUDA environment, Slurm/container setup, reward-model serving, or checkpoint utility operations, use operations-and-utilities.
- Treat full RL shell scripts as GPU/distributed/expensive examples. Do not run them unless the user explicitly asks and the environment is ready.
Start here
- Identify the execution mode: synchronous hybrid engine, async training, async partial rollout, single-turn reward, multi-turn agent, VLM agent, or OpenAI-compatible agent server executor.
- Choose the algorithm and advantage estimator: PPO uses
gae; REINFORCE++ usesreinforce; RLOO usesrloo; REINFORCE++-baseline usesreinforce_baseline; GRPO usesgroup_norm; Dr.GRPO usesdr_grpo. - Check mandatory relationships before writing commands: group estimators need
--rollout.n_samples_per_prompt > 1; partial rollout needs--train.async_enable; VLM training must avoid critic/packing; dynamic filtering needs multi-sample rollout plus a reward source. - Use the references in this sub-skill for detailed flags, protocols, and failure handling.
References
references/rl-workflows.md: workflow choices and representative command fragments for PPO, REINFORCE++/baseline, GRPO/RLOO/Dr.GRPO, DAPO-style filtering, async, partial rollout, VLM, and OpenAI-compatible agent execution.references/agent-functions.md: contracts forreward_func.py, math reward functions,MultiTurnAgentExecutor, VLM multi-turn agents, and OpenAI-compatible executor customization.references/cli-reference.md: importanttrain_ppo_rayflag groups and validation rules.references/troubleshooting.md: rollout, Ray/vLLM placement, NCCL, reward URL, import path, agent protocol, VLM media, KL/advantage, off-policy, and OOM troubleshooting.
Helper script
Use scripts/create_reward_or_agent_template.py to create small standalone starter files:
python skills/openrlhf/sub-skills/rl-agent-training/scripts/create_reward_or_agent_template.py \
--kind math-reward \
--output reward_func.py
Supported kinds are reward, math-reward, multiturn, and vlm-multiturn. The generated files are templates distilled from OpenRLHF examples and are meant to be edited before training.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).