Parallel RLHF Training with Decoupled Inference Weight Updates

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The training efficiency of reinforcement learning models, particularly in reinforcement learning from human feedback (RLHF), is hindered by the alternation of inference and training processes, leading to low sample generation rates and resource wastage.

Innovation Solution

Decouple the inference and training processes, allowing them to run in parallel with independent GPU memory spaces, and apply inference-specific acceleration techniques like paged attention and continuous batching to enhance efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If inference and training processes are alternated sequentially, then resource allocation is simplified, but training efficiency and sample generation rate deteriorate

Engineering Contradiction:
Improveprocess management complexityVSAvoidtraining efficiency
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The patent segments the reinforcement learning system into independent inference processes and training processes that operate in parallel. Each inference process generates training samples independently, while training processes update model weights independently. This segmentation eliminates the sequential alternation between inference and training, allowing both to occur simultaneously, thereby resolving the contradiction between simplified process management and training efficiency.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a new dimension of parallel execution by running inference and training processes simultaneously in different computational spaces. Inference processes execute forward propagation to generate samples, while training processes execute backward propagation to update weights, both occurring in the same time dimension but independent computational threads. This dimensional separation resolves the efficiency loss from sequential execution.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Ease of manufacture

If inference processes use standard attention mechanisms, then implementation is straightforward, but computational efficiency and resource utilization deteriorate

Engineering Contradiction:
Improveimplementation simplicityVSAvoidinference speed
Core Design Contradiction:
Ease of manufactureVSProductivity

Solution Approach 1:

The patent applies parameter changes to the attention mechanism by implementing paged attention, which divides the attention computation into manageable pages or blocks. This transforms the standard attention mechanism into a more efficient version that reduces memory access patterns and improves computational throughput. The parameter change in how attention is computed (from monolithic to paged) resolves the contradiction between implementation simplicity and inference speed.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent implements continuous batching, which prepares and processes multiple inference requests in batches before execution. This preliminary organization of inference tasks allows for better resource utilization and reduced overhead per sample. By pre-batching requests, the system achieves higher inference throughput without significantly increasing implementation complexity.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If model weights are updated frequently during training, then model convergence improves, but communication overhead and resource wastage increase

Engineering Contradiction:
Improvemodel convergenceVSAvoidcommunication overhead
Core Design Contradiction:
ReliabilityVSLoss of energy

Solution Approach 1:

The patent implements periodic weight updates where training processes update model weights at scheduled intervals rather than continuously after every sample generation. This periodic action maintains model convergence by ensuring regular weight updates while reducing the frequency of communications between training and inference processes. The periodic update strategy resolves the contradiction between convergence reliability and communication overhead by finding an optimal update frequency.

Inventive Principle:
Principle #19Periodic action

Data Source

PatentUS20250348750A1Reinforcement learning model training methods and apparatuses
Publication Date: 2025.11.13 ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
  • US20250348750A1 patent drawing
  • US20250348750A1 patent drawing

AI summary

Methods, computer-readable media, and apparatuses relate to a reinforcement learning model training are described. An example model training system includes at least one training process and at least one inference process. An example method includes: in an inference process, obtaining a latest model weight, updating a weight value of a reinforcement learning model; generating response data based on input data by using an updated reinforcement learning model, forming a training sample based on the input data and the response data, and storing the training sample in a target storage area; and in a training process, obtaining the training sample from the target storage area; updating a weight value of the reinforcement learning model based on the training sample, and sending an updated model weight to the inference process.