lucidrains/palm-rlhf-pytorch

Implementation of RLHF (Reinforcement Learning with Human Feedback) on top of the PaLM architecture. Basically ChatGPT but with PaLM

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 27 minutes ago
Added to GitGenius on September 8th, 2026
Created on December 9th, 2022
Open Issues & Pull Requests: 20 (+0)
GitHub issues: Enabled
Number of forks: 674
Total Stargazers: 7,864 (+0)
Total Subscribers: 134 (+0)

Repository Insights (GitGenius)

Most active contributors

Sign in to see contributor activity.

Related repositories by overlapping contributors

No overlapping-contributor repos identified yet.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Issue API getrepoissuespagesummary failed: 429 Rate limit exceeded. Please try again later.

Detailed Description

palm-rlhf-pytorch is a PyTorch implementation of reinforcement learning with human feedback applied to the PaLM transformer architecture.

The project addresses the challenge of aligning large language models with human preferences through a multi-stage training pipeline. It implements RLHF by first training a PaLM autoregressive transformer on language modeling, then training a separate reward model using human feedback annotations, and finally using the RLHFTrainer to optimize the base model against the reward signal. This mirrors the approach used to create ChatGPT but built on the PaLM architecture rather than GPT.

Developers considering this tool should understand that it provides the training infrastructure and architectural components but not a pretrained model ready for inference. The README explicitly states this is a framework and blueprint rather than a finished product, requiring substantial computational resources and curated human feedback data to produce a functional system. The project acknowledges related community efforts in open RLHF implementations and notes that Direct Preference Optimization represents a potential successor approach that could simplify the training pipeline significantly.

The project is marked as work in progress. Code review and bug fixes have been contributed by community members. Integration of Flash Attention from PyTorch 2.0 has been completed. The README notes that reward model training can suffer from overfitting when finetuned from pretrained transformers, though LoRA finetuning is offered as an alternative approach still under research.