Discover and explore top open-source AI tools and projects—updated daily.
Train language models from scratch using pure reinforcement learning
Top 95.7% on SourcePulse
This repository provides an implementation for training language models from scratch using pure reinforcement learning (RL), aiming to optimize generalization over memorization. It targets researchers and practitioners interested in alternative LLM training paradigms beyond traditional pretrain-sft-rl pipelines. The core benefit is exploring a novel RL-centric approach to LLM development.
How It Works
The project implements a GPT-2 architecture trained exclusively with RL, utilizing a "referee model" approach. This referee model, trained on ground truth data, scores the predictions of the main language model. This method allows for convergence with reasonable compute, where the referee model's size is not necessarily larger than the model being trained.
Quick Start & Requirements
bash start.sh
(sets up environment, downloads data/models) then python avatarl.py
(single GPU) or torchrun --nproc_per_node=8 avatarl.py
(multi-GPU).pip install modal
, modal setup
, then modal run modal_train.py:train_avatarl_single_node
.Highlighted Details
Maintenance & Community
The project is primarily driven by "tokenbender." Contributions are welcome via pull requests.
Licensing & Compatibility
Licensed under the Apache 2.0 license. This license is permissive and generally compatible with commercial use and closed-source linking.
Limitations & Caveats
Early development stages involved significant iteration and debugging, with some experimental approaches proving inefficient or unstable. The project's success relies on the effectiveness of the referee model and the RL reward shaping.
4 weeks ago
Inactive