# lucidrains/PaLM-rlhf-pytorch

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

Repository: https://github.com/lucidrains/PaLM-rlhf-pytorch
Canonical: https://ross.abutalabs.com/products/palm-rlhf-pytorch
Language: Python
License: MIT
License Family: permissive
Topics: artificial-intelligence, attention-mechanisms, deep-learning, reinforcement-learning, transformers, human-feedback
Last push: 2026-07-27T23:39:41+00:00

## Health v2 (maintenance only)
Score: 78/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 94, release rhythm 48, longevity 97
- inputs: {"age_days": 1363, "days_push": 37, "days_rel": 348, "gap_med": 0.0, "n_releases_24m": 21}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 7868, forks 673 (observed 2026-08-28T04:10:08.365950+00:00)

## What it is
A PyTorch library implementing Reinforcement Learning from Human Feedback (RLHF) on top of the PaLM transformer architecture, aiming to replicate ChatGPT-style training in the open. It provides the training scaffolding (reward model, PPO) but ships no pretrained model weights.

## Use cases
- train a language model with reinforcement learning from human feedback
- implement RLHF on a PaLM-style transformer in pytorch
- build an open-source ChatGPT-like model from scratch
- study how reward models and PPO are implemented for LLMs
- experiment with human preference fine-tuning of transformers

## When to choose
- you want readable reference code for RLHF components like reward modeling and PPO
- you are doing research on preference-based fine-tuning and want a customizable starting point
- you already have compute and data and need the RLHF training scaffolding

## When to avoid
- you need a ready-to-use chatbot or pretrained model for inference
- you want a production-grade, well-supported RLHF framework
- you prefer simpler preference optimization methods like DPO over PPO-based RLHF

## Facets
- artifact type: library
- maturity: experimental
- function: llm-training, reinforcement-learning, machine-learning, deep-learning
- domain: large-language-models, reinforcement-learning, deep-learning, artificial-intelligence
- platform: python
- tags: rlhf, palm, reward-model, ppo, transformers, research-code, open-source-chatgpt

## Member repositories
- lucidrains/PaLM-rlhf-pytorch (main) score 78

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:08.365950+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:33:45.145677+00:00, confidence not recorded.
  - readme: https://github.com/lucidrains/PaLM-rlhf-pytorch (fetched 2026-08-28T04:10:08.365950+00:00, sha 2256e1863046)
- Data as of 2026-08-30T08:39:29.467469+00:00.
