lm-human-preferences is the official OpenAI codebase that implements the method from the paper Fine-Tuning Language Models from Human Preferences. Its purpose is to show how to align language models with human judgments by training a reward model from human comparisons and then fine-tuning a policy model using that reward signal. The repository includes scripts to train the reward model (learning to rank or score pairs of outputs), and to fine-tune a policy (a language model) with reinforcement learning (or related techniques) guided by that reward model. The code is provided “as is” and explicitly says it may no longer run out-of-the-box due to dependencies or dataset migrations. It was tested on the smallest GPT-2 (124M parameters) under a specific environment (TensorFlow 1.x, specific CUDA / cuDNN combinations). It includes utilities for launching experiments, sampling from policies, and simple experiment orchestration.

Features

  • Training a reward model from human preference comparisons
  • Fine-tuning a policy (language model) guided by the reward model
  • Sampling / inference utilities to generate outputs from the trained policy
  • Experiment orchestration (launch.py) to combine stages (reward + policy)
  • Label handling and mapping from human comparisons to scalar reward signals
  • Support for small GPT-2 (124M) model as reference environment

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow LM Human Preferences

LM Human Preferences Web Site

Other Useful Business Software
Accounting practice management software Icon
Accounting practice management software

Accountants, accounting firms, tax attorneys, tax professionals

Canopy is a cloud-based practice management software for accounting and tax firms, offering tools for client engagement, document management, workflow automation, and time & billing. Its Client Engagement platform centralizes interactions with a secure portal, customizable branding, and email integration, while the Document Management system enables organized, paperless file storage. The Workflow module enhances visibility into tasks and projects through templates, task assignments, and automation, reducing human error. Additionally, the Time & Billing feature tracks billable hours, generates invoices, and processes payments, ensuring accurate financial management. With its comprehensive features, Canopy streamlines operations, reduces stress, and enhances client experiences.
Learn More
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of LM Human Preferences!

Additional Project Details

Programming Language

Python

Related Categories

Python Large Language Models (LLM)

Registered

2025-10-03