openrlhf-training
High-performance RLHF framework with Ray+vLLM acceleration. Use for PPO, GRPO, RLOO, DPO training of large models (7B-70B+). Built on Ray, vLLM, ZeRO-3. 2× faster than DeepSpeedChat with distributed architecture and GPU resource sharing.
Installation
Pick a client and clone the repository into its skills directory.
Installation
About this skill
High-performance RLHF framework with Ray+vLLM acceleration. Use for PPO, GRPO, RLOO, DPO training of large models (7B-70B+). Built on Ray, vLLM, ZeRO-3. 2× faster than DeepSpeedChat with distributed architecture and GPU resource sharing.
How to use
Przygotuj środowisko Docker z obsługą NVIDIA, uruchamiając obraz PyTorch 25.02 z GPU. Zamontuj katalog roboczy jako wolumin, aby mieć dostęp do plików treningowych.
Zainstaluj OpenRLHF i jego zależności (Ray, vLLM, PyTorch, Transformers, DeepSpeed) poleceniem pip install openrlhf[vllm]. Przed instalacją odinstaluj pakiety konfliktujące: xgboost, transformer_engine, flash_attn i pynvml.
Uruchom klaster Ray na maszynie głównej, wskazując liczbę dostępnych GPU (np. 8 GPU) poleceniem ray start --head --node-ip-address 0.0.0.0 --num-gpus 8.
Skonfiguruj trening PPO, definiując liczbę węzłów i GPU dla każdego komponentu (model referencyjny, reward model, krytyk, aktor) oraz parametry vLLM takie jak liczba silników inferencji i rozmiar batch'a.
Wyślij zadanie treningowe do klastra Ray poleceniem ray job submit, podając ścieżkę do skryptu train_ppo_ray, model wstępnie wytrenowany (np. Llama-3-8b-sft-mixture) oraz parametry optymalizacji (learning rate, liczba epok, max_len dla promptów i generacji).
Monitoruj postęp treningu i zapisz wytrenowany model w wskazanym katalogu wyjściowym (np. ./output/llama3-8b-rlhf).