协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
advanced-rl-distributed【开发与工程】Plan and debug advanced ms-swift RLHF, GRPO/GKD, rollout, Ray, and Megatron distributed workflows.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the task involves advanced preference optimization, GRPO rollout orchestration, custom rewards/plugins, Ray scheduling, or Megatron-SWIFT distributed execution in ms-swift.
swift rlhf with --rlhf_type grpo, gkd, ppo, dpo, kto, rm, cpo, simpo, or orpo when the task asks for RLHF mechanics, reward behavior, rollout placement, or advanced algorithm options.swift sample and swift rollout when sampling, PRM/ORM filtering, rollout servers, vLLM weight sync, or multi-turn rollout servers are part of an RL plan.megatron rlhf, megatron sft, megatron export, Ray YAML configs, Mcore-Bridge, TP/PP/CP/EP/VPP, sequence parallel, and multi-node launch debugging.swift rlhf, reward/plugin patterns, sampling, rollout servers, and multi-turn guidance.| User Need | Start With | Key Checks |
|---|---|---|
| GRPO with custom rewards | swift rlhf --rlhf_type grpo | num_generations >= 2, reward names registered, required dataset columns passed through |
| External rollout server | swift rollout plus swift rlhf --vllm_mode server | host/port/base URL, --vllm_server_pass_dataset true for multi-turn/env rows |
| Megatron GRPO/GKD | megatron rlhf | optional Megatron stack, TP×PP×CP divisibility, completion-level batch formulas |
| Ray Megatron GRPO/GKD | megatron rlhf --use_ray true --config CONFIG.yaml | train, rollout, optional teacher GPU groups, colocate vs separate mode |
| Sampling/RFT data generation | swift sample | sampler engine, PRM/ORM memory split, cache file pass, plugin registration |
A minimal ms-swift install can expose the base swift routes while advanced backends remain absent. Treat missing ray, megatron-core, mcore-bridge, transformer-engine, apex, flash-attn, vllm, lmdeploy, sglang, or evalscope as optional capability gaps to solve only for the requested workflow. For Megatron-SWIFT, install the Megatron extra and a compatible Megatron-style stack such as pip install "ms-swift[megatron]" -U, then validate with the backend checker before planning GPU-heavy commands.