What problem does it solve?
This Skill enables efficient training and optimization of large language models using reinforcement learning from human feedback (RLHF), allowing for high-performance and resource-efficient training of models.
Core Features & Use Cases
- High-Performance RLHF Training: Utilizes Ray and vLLM for distributed training with accelerated inference.
- Large Model Training: Supports training models with sizes up to 70B parameters.
- Algorithm Support: Offers a variety of reinforcement learning algorithms including PPO, GRPO, RLOO, and DPO.
- Use Case: Ideal for researchers and engineers looking to train large language models for tasks such as text generation, language understanding, and question answering.
Quick Start
Train a large language model using the openrlhf-training skill with the following command:
ray start --head --node-ip-address 0.0.0.0 --num-gpus 8
ray job submit --address="http://127.0.0.1:8265" \
-- python3 -m openrlhf.cli.train_ppo_ray \
--ref_num_nodes 1 --ref_num_gpus_per_node 8 \
--reward_num_nodes 1 --reward_num_gpus_per_node 8 \
--critic_num_nodes 1 --critic_num_gpus_per_node 8 \
--actor_num_nodes 1 --actor_num_gpus_per_node 8 \
--vllm_num_engines 4 --vllm_tensor_parallel_size 2 \
--colocate_all_models \
--pretrain OpenRLHF/Llama-3-8b-sft-mixture \
--reward_pretrain OpenRLHF/Llama-3-8b-rm-700k \
--save_path ./output/llama3-8b-rlhf \
--micro_train_batch_size 8 --train_batch_size 128 \
--micro_rollout_batch_size 16 --rollout_batch_size 1024 \
--max_epochs 1 --prompt_max_len 1024 --generate_max_len 1024 \
--zero_stage 3 --bf16 \
--actor_learning_rate 5e-7 --critic_learning_rate 9e-6 \
--init_kl_coef 0.01 --normalize_reward \
--vllm_enable_sleep --deepspeed_enable_sleep