examples/tutorial/skypilot/README.md
Run verl reinforcement learning training jobs on Kubernetes clusters or cloud platforms with GPU nodes using SkyPilot.
Choose the installation based on your target platform:
# For Kubernetes only
pip install "skypilot[kubernetes]"
# For AWS
pip install "skypilot[aws]"
# For Google Cloud Platform
pip install "skypilot[gcp]"
# For Azure
pip install "skypilot[azure]"
# For multiple platforms
pip install "skypilot[kubernetes,aws,gcp,azure]"
See https://docs.skypilot.co/en/latest/getting-started/installation.html
Export necessary API keys for experiment tracking:
# For Weights & Biases tracking
export WANDB_API_KEY="your-wandb-api-key"
# For gated Hugging Face models (if needed)
export HF_TOKEN="your-huggingface-token"
Run the following commands from the repository root.
sky launch -c verl-ppo examples/tutorial/skypilot/verl-ppo.yaml \
--secret WANDB_API_KEY -y
Runs PPO training on GSM8K dataset using Qwen2.5-0.5B-Instruct model across 2 nodes with H100 GPUs. Based on examples in ../../ppo_trainer/.
sky launch -c verl-grpo examples/tutorial/skypilot/verl-grpo.yaml \
--secret WANDB_API_KEY -y
Runs GRPO (Group Relative Policy Optimization) training on MATH dataset using Qwen2.5-7B-Instruct model. Memory-optimized configuration for 2 nodes. Based on examples in ../../grpo_trainer/.
The SkyPilot launch configurations currently cover PPO and GRPO. For Agent Loop and tool-use training, use the maintained Agent Loop tutorial to validate the model, tool, and sandbox configuration before adapting it to a cluster task. No preconfigured SkyPilot task is currently provided for this workflow.
The example YAML files are pre-configured with:
infra: k8s) - can be changed to infra: aws or infra: gcp, etc.--secret WANDB_API_KEYHF_TOKEN to the task's
secrets section and pass it with --secret HF_TOKEN-c <name>: Cluster name for managing the job--secret KEY: Pass secrets for API keys (can be used multiple times)-y: Skip confirmation promptsky status
sky logs verl-ppo # View logs for the PPO job
ssh verl-ppo
sky status --endpoint 8265 verl-ppo # Get dashboard URL
sky down verl-ppo