What problem does it solve?
This Skill addresses the challenge of scaling reinforcement learning (RL) with large language models (LLMs), specifically focusing on the integration of Megatron-LM for training and SGLang for high-throughput rollout generation.
Core Features & Use Cases
- Megatron-LM Integration: Leverages Megatron-LM for full parallelism support in actor model training.
- SGLang Rollout Generation: Utilizes SGLang for high-throughput rollout generation with router support.
- Data Buffer Management: Offers flexible prompt management and sample storage for data buffers.
- Model Support: Supports training of various LLM models like GLM, Qwen3, DeepSeek V3/R1, and Llama 3.
- Use Case: Ideal for researchers and practitioners looking to implement custom data generation workflows or require tight integration with Megatron-LM for RL scaling.
Quick Start
Run the following command to start a GRPO training session:
python train.py \
--actor-num-nodes 1 \
--actor-num-gpus-per-node 4 \
--rollout-num-gpus 4 \
--advantage-estimator grpo \
--use-kl-loss --kl-loss-coef 0.001 \
--rollout-batch-size 32 \
--n-samples-per-prompt 8 \
--global-batch-size 256 \
--num-rollout 3000 \
--prompt-data /path/to/data.jsonl \
${MODEL_ARGS[@]} ${CKPT_ARGS[@]}