Lune

EMNLP2023Top-tier venue

trlX: A Framework for Large Scale Reinforcement Learning from Human Feedback

Alexander Havrilla, Maksym Zhuravinskyi, Duy Phung, Aman Tiwari, Jonathan Tow, Stella Biderman, Quentin Anthony, Louis Castricato

Abstract

Reinforcement learning from human feedback (RLHF) utilizes human feedback to better align large language models with human preferences via online optimization against a learned reward model. Current RLHF paradigms rely on Proximal Policy Optimization (PPO), which quickly becomes a challenge to implement and scale up to large architectures. To address this difficulty we present the trlX library as a featurecomplete open-source framework for RLHF fine-tuning of models up to and exceeding 70 billion parameters. We implement support for multiple types of distributed training including distributed data parallel, model sharded, as well as tensor, sequential, and pipeline parallelism. To increase the accessibility of RLHF to researchers, we implement compute-and memory-saving features that give trlX the flexibility to support users with a wide range of compute resources. This includes offline RL methods like Implicit Language Q Learning (ILQL), low-rank adapters, and the Hydra architecture. We find offline fine-tuning offers competitive performance relative to online algorithms while being easier to implement, train, and scale. To evaluate our framework we train RLHF models on two separate well-known tasks using publicly available human preference data. Models trained with trlX achieve preference win-rates over baselines at rates comparable to the original works.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

16 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • PUZZLE: Efficiently Aligning Large Language Models through Light-Weight Context Switch cites Training language models to follow instructions with human feedback
  • Better Estimation of the Kullback-Leibler Divergence Between Language Models cites HybridFlow: A Flexible and Efficient RLHF Framework
  • Better Estimation of the Kullback-Leibler Divergence Between Language Models cites Training language models to follow instructions with human feedback
  • Pythia: A Suite for Analyzing Large Language Models Across Training and Scaling cites Language Models are Few-Shot Learners
  • HybridFlow: A Flexible and Efficient RLHF Framework cites Language Models are Few-Shot Learners
  • HybridFlow: A Flexible and Efficient RLHF Framework cites Training language models to follow instructions with human feedback
  • Super-NaturalInstructions: Generalization via Declarative Instructions on 1600+ NLP Tasks cites Language Models are Few-Shot Learners
  • 8-bit Optimizers via Block-wise Quantization cites Language Models are Few-Shot Learners
  • Token-level Direct Preference Optimization cites Pythia: A Suite for Analyzing Large Language Models Across Training and Scaling
  • Token-level Direct Preference Optimization cites Language Models are Few-Shot Learners
  • Token-level Direct Preference Optimization cites Training language models to follow instructions with human feedback
  • β-DPO: Direct Preference Optimization with Dynamic β cites Pythia: A Suite for Analyzing Large Language Models Across Training and Scaling
  • β-DPO: Direct Preference Optimization with Dynamic β cites Training language models to follow instructions with human feedback
  • Training language models to follow instructions with human feedback cites Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers16

  1. Token-level Direct Preference OptimizationYongcheng Zeng, Guoqing Liu, Weiyu Ma, Ning Yang et al.ICML 2024 · 136 citations
  2. β-DPO: Direct Preference Optimization with Dynamic βJunkang Wu, Yuexiang Xie, Zhengyi Yang, Jiancan Wu et al.NeurIPS 2024 · 114 citations
  3. HybridFlow: A Flexible and Efficient RLHF FrameworkGuangming Sheng, Chi Zhang, Zilingfeng Ye, Xibin Wu et al.EuroSys 2025 · 61 citations
  4. PUZZLE: Efficiently Aligning Large Language Models through Light-Weight Context SwitchKinman Lei, Yuyang Jin, Mingshu Zhai, Kezhao Huang et al.USENIX ATC 2024 · 19 citations
  5. Better Estimation of the Kullback-Leibler Divergence Between Language ModelsAfra Amini, Tim Vieira, Ryan CotterellNeurIPS 2025 · 12 citations

Builds on8

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
  3. Pythia: A Suite for Analyzing Large Language Models Across Training and ScalingStella Biderman, Hailey Schoelkopf, Quentin Gregory Anthony, Herbie Bradley et al.ICML 2023 · 1,822 citations
  4. 8-bit Optimizers via Block-wise QuantizationTim Dettmers, Mike Lewis, Sam Shleifer, Luke ZettlemoyerICLR 2022 · 457 citations
  5. Super-NaturalInstructions: Generalization via Declarative Instructions on 1600+ NLP TasksYizhong Wang, Swaroop Mishra, Pegah Alipoormolabashi, Yeganeh Kordi et al.EMNLP 2022 · 238 citations

Related papers

  1. Back to Basics: Revisiting REINFORCE-Style Optimization for Learning from Human Feedback in LLMsArash Ahmadian, Chris Cremer, Matthias Gallé, Marzieh Fadaee et al.ACL 2024 · 20 citations
  2. RRHF: Rank Responses to Align Language Models with Human FeedbackHongyi Yuan, Zheng Yuan, Chuanqi Tan, Wei Wang et al.NeurIPS 2023 · 515 citations
  3. OPPO: Accelerating PPO-based RLHF via Pipeline OverlapKaizhuo Yan, Yingjie Yu, Yifan Yu, Haizhong Zheng et al.ICLR 2026 · 4 citations
  4. Is DPO Superior to PPO for LLM Alignment? A Comprehensive StudyShusheng Xu, Wei Fu, Jiaxuan Gao, Wenjie Ye et al.ICML 2024 · 274 citations
  5. ReMax: A Simple, Effective, and Efficient Reinforcement Learning Method for Aligning Large Language ModelsZiniu Li, Tian Xu, Yushun Zhang, Zhihang Lin et al.ICML 2024 · 165 citations
Dusk over the sea between two cliffs drawn in fine vertical lines