Skip to main content
QUICK REVIEW

[Paper Review] ReMax: A Simple, Effective, and Efficient Reinforcement Learning Method for Aligning Large Language Models

Ziniu Li, Xu Tian|arXiv (Cornell University)|Oct 16, 2023
Topic ModelingComputer Science6 citations
TL;DR

ReMax is a novel reinforcement learning method for aligning large language models that eliminates the value model used in PPO, leveraging fast simulation, deterministic transitions, and trajectory-level rewards to achieve 50% lower memory usage, 2x faster training per iteration, and simpler implementation with only 6 lines of code—while maintaining or improving performance on LLM alignment tasks.

ABSTRACT

Reinforcement Learning from Human Feedback (RLHF) is key to aligning Large Language Models (LLMs), typically paired with the Proximal Policy Optimization (PPO) algorithm. While PPO is a powerful method designed for general reinforcement learning tasks, it is overly sophisticated for LLMs, leading to laborious hyper-parameter tuning and significant computation burdens. To make RLHF efficient, we present ReMax, which leverages 3 properties of RLHF: fast simulation, deterministic transitions, and trajectory-level rewards. These properties are not exploited in PPO, making it less suitable for RLHF. Building on the renowned REINFORCE algorithm, ReMax does not require training an additional value model as in PPO and is further enhanced with a new variance reduction technique. ReMax offers several benefits over PPO: it is simpler to implement, eliminates more than 4 hyper-parameters in PPO, reduces GPU memory usage, and shortens training time. ReMax can save about 46% GPU memory than PPO when training a 7B model and enables training on A800-80GB GPUs without the memory-saving offloading technique needed by PPO. Applying ReMax to a Mistral-7B model resulted in a 94.78% win rate on the AlpacaEval leaderboard and a 7.739 score on MT-bench, setting a new SOTA for open-source 7B models. These results show the effectiveness of ReMax while addressing the limitations of PPO in LLMs.

Motivation & Objective

  • To address the high computational cost and memory overhead of Proximal Policy Optimization (PPO) in Reinforcement Learning from Human Feedback (RLHF) for large language models.
  • To identify underutilized properties of RLHF tasks—fast simulation, deterministic transitions, and trajectory-level rewards—that could enable a simpler, more efficient algorithm.
  • To design a new RL algorithm that eliminates the value model without sacrificing performance, reducing complexity and resource demands.
  • To demonstrate that a simplified, variance-reduced REINFORCE-based method can outperform PPO in efficiency while maintaining alignment quality.

Proposed method

  • ReMax is based on the REINFORCE algorithm but enhanced with a novel variance-reduction technique tailored for large language models.
  • It removes the value model entirely, which eliminates the need to train, store, and backpropagate through an additional neural network.
  • The method uses two response generations per prompt: one for the policy gradient and one for variance reduction, leveraging the deterministic nature of token generation.
  • It exploits the fact that LLM responses are fast to generate, transitions are deterministic based on past tokens, and rewards are only provided at the end of a sequence.
  • The algorithm is implemented in just 6 lines of code, significantly reducing hyperparameter tuning compared to PPO.
  • Memory savings come from eliminating the value model’s parameters, gradients, and optimizer states, cutting memory usage by ~50%.

Experimental results

Research questions

  • RQ1Can a reinforcement learning algorithm for LLM alignment be designed without a value model, while maintaining or improving performance?
  • RQ2To what extent can the properties of fast simulation, deterministic transitions, and trajectory-level rewards in RLHF be exploited to simplify and accelerate training?
  • RQ3Does eliminating the value model lead to measurable improvements in memory efficiency and training speed without sacrificing alignment quality?
  • RQ4Can a simplified, REINFORCE-based method with variance reduction outperform PPO in both efficiency and effectiveness for LLM alignment?

Key findings

  • ReMax reduces memory usage by approximately 50% compared to PPO, enabling training of Llama2-7B on A100-80GB GPUs where PPO fails without offloading.
  • With offloading, ReMax supports a maximum batch size of 160 on 4 A100-80GB GPUs, compared to 120 for PPO, allowing higher throughput.
  • On a single GPU, ReMax supports a batch size of 42 with offloading, while PPO can only manage 32, and both fail without offloading.
  • ReMax achieves a 2.5× speed-up in training time on 4 GPUs by eliminating the need for offloading, reducing total training time from 10.2 hours to 2.8 hours for one epoch.
  • Per-iteration training time for ReMax is about half that of PPO, with ReMax taking 2.8 hours per epoch versus PPO’s 6.0 hours on 4 GPUs with offloading.
  • Despite its simplicity, ReMax maintains strong alignment performance, with no degradation in task effectiveness compared to PPO.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.