计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
reinforcement-learning【效率与协作】Plan and troubleshoot XTuner RL and GRPO workflows with Ray resource pools, rollout backends, agent loops, judgers, replay buffers, evaluation, tracing, and safe launch-command construction.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when a future Researcher needs to plan, review, or diagnose XTuner V1 reinforcement-learning runs, especially GRPO-style configs that combine Ray placement groups, rollout engines, agent loops, judgers, replay buffers, advantage/loss settings, evaluation, and trace/debug outputs.
This sub-skill is for operating guidance and safe command construction. It does not start Ray, launch training, download data, or require an XTuner source checkout.
RLColocateTrainerConfig, or RLDisaggregatedTrainerConfig.--config, --work-dir, and --num-workers.ground_truth, resource mismatch, stale rollouts, debug rollout files, evaluation intervals, or trace output.data-preparation.training.model-backends.xtuner CLI tools, config-zoo search, old chat/eval commands, and model conversion belong to cli-and-tools.SyncProduceStrategyConfig() unless the user explicitly needs background rollout throughput or separate train/rollout resource pools.WORK_DIR, MODEL_PATH, DATA_PATH, and EVAL_DATA_PATH from the environment. The CLI can override cfg.trainer.work_dir with --work-dir and can override trainer.resources.num_workers for colocated trainer configs that expose resources.reward_model.ground_truth. If this field is absent, route schema conversion/validation to data-preparation before launching.XTUNER_USE_LMDEPLOY=1, XTUNER_USE_SGLANG=1, or XTUNER_USE_VLLM=1; see references/cluster-and-backends.md. Backend packages are optional and must be installed in the runtime environment before launch.ray.init(address="auto") if Ray is not already initialized, so a Ray cluster or local Ray head must already be running. Check visible accelerator, CPU, and memory resources before training.WorkerConfig, RolloutConfig, AgentLoopManagerConfig, SingleTurnAgentLoopConfig, GSM8KJudgerConfig, GRPOAdvantageConfig, GRPOLossConfig, replay buffers, evaluator, resource, and trace configs.Generate a dry launch snippet for an async GSM8K GRPO config copy:
python sub-skills/reinforcement-learning/scripts/build_rl_command.py \
--config /configs/rl_grpo_gsm8k_async.py \
--backend lmdeploy \
--model-path /models/qwen3-8b \
--data-path /data/gsm8k_train.jsonl \
--eval-data-path /data/gsm8k_val.jsonl \
--work-dir /runs/qwen3-gsm8k-grpo \
--num-workers 8
The helper emits the installed-package entry point python -m xtuner.v1.train.cli.rl ... so the generated skill does not require an XTuner source checkout.
rl_grpo_gsm8k_async.py, using local model, train data, eval data, work directory, backend, accelerator count, and --num-workers overrides.reward_model.ground_truth is missing and no inference backend flag/package is active, then route schema fixes and backend installation to the right owner.