rl-and-rewards
Guides agents configuring Axolotl GRPO, EBFT, custom reward functions, vLLM training servers, NeMo Gym, Hatchery, and async online RL checks.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- rl-and-rewards
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Guides agents configuring Axolotl GRPO, EBFT, custom reward functions, vLLM training servers, NeMo Gym, Hatchery, and async online RL checks.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/ebft.md5.0 KB
- 参考文档references/grpo.md6.2 KB
- 参考文档references/reward-functions.md5.1 KB
- 参考文档references/troubleshooting.md6.4 KB
- 脚本scripts/validate_reward_function.py9.4 KB
03 SKILL.md 正文
RL and Rewards
Use this sub-skill when the task involves Axolotl online RL or reward-driven training: GRPO, GDPO-style reward aggregation, custom reward functions, axolotl vllm-serve for training, EBFT feature-matching rewards, NeMo Gym environment rewards, Hatchery-style remote RL flows, or async rollout debugging.
Route By Task
- For GRPO configs, vLLM serving, async prefetch, replay, re-roll, and importance sampling, read references/grpo.md.
- For EBFT structured or strided feature-matching runs, read references/ebft.md.
- For reward function signatures, deterministic checks, multiple rewards, rollout functions, NeMo Gym rewards, and Hatchery reward hooks, read references/reward-functions.md.
- For symptom-driven fixes around rewards, vLLM, async rollouts, EBFT mode selection, and resource constraints, read references/troubleshooting.md.
- Before training, validate a local reward function with scripts/validate_reward_function.py:
python scripts/validate_reward_function.py rewards.py:accuracy_reward.
Quick Workflow
- Classify the method first:
rl: grpofor programmatic verifiers or environment rewards,rl: ebftfor feature matching against ground-truth completions, and route DPO/KTO/ORPO/SimPO preference data topreference-tuning. - For GRPO, define the YAML, reward module, and vLLM plan together;
trl.reward_funcs,trl.num_generations,trl.max_completion_length,trl.use_vllm, andvllm.host/vllm.portmust agree. - For EBFT, choose
ebft.modebefore copying settings: structured mode uses prompt plusground_truthand usually vLLM, while strided mode uses tokenized document anchors and does not require vLLM. - Run local deterministic reward checks before
axolotl train; then useaxolotl preprocess config.yaml --debugonly for data/tokenization visibility andaxolotl train config.yamlonly after the user accepts runtime cost. - For server-backed RL, start or verify the generation/environment services before training;
axolotl vllm-serve config.yamlmust serve the same base model as the training config.
Boundaries
- This sub-skill owns GRPO/GDPO online RL, reward functions, vLLM serving relationships, async rollout features, EBFT structured/strided setup, NeMo Gym reward routing, Hatchery reward hooks, and safe local reward validation.
- Route static DPO, KTO, ORPO, SimPO, reward-model, and process-reward-model preference workflows to
preference-tuning. - Route generic dataset format mapping,
chat_template, schema discovery, and YAML-only validation todata-and-configs. - Route cluster launch, DeepSpeed/FSDP tuning, GPU placement, and throughput engineering to
distributed-and-performance. - Route model architecture quirks, tokenizer templates, LoRA/QLoRA target modules, and adapter loading to
model-loading-and-adapters. - Route CLI mechanics, fetch/docs commands, inference, and merge-lora operations to
cli-and-operations.
Evidence Notes
This guidance is distilled from Axolotl GRPO, EBFT, vLLM serving, RLHF, schema, integration, example, and unit-test evidence. It does not claim live training, vLLM, GPU, model-loading, or environment-service verification.
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).