L1: Controlling How Long A Reasoning Model Thinks With Reinforcement Learning

Pranjal Aggarwal, Sean Welleck
3/6/2025
cs.CLcs.AIcs.LG

No official code found. Best implementation: cmu-l3/l1 (265 stars, MIT, last commit 2025-05-14).

Abstract

Reasoning language models have shown an uncanny ability to improve performance at test-time by ``thinking longer''-that is, by generating longer chain-of-thought sequences and hence using more compute. However, the length of their chain-of-thought reasoning is not controllable, making it impossible to allocate test-time compute to achieve a desired level of performance. We introduce Length Controlled Policy Optimization (LCPO), a simple reinforcement learning method that optimizes for accuracy and adherence to user-specified length constraints. We use LCPO to train L1, a reasoning language model that produces outputs satisfying a length constraint given in its prompt. L1's length control allows for smoothly trading off computational cost and accuracy on a wide range of tasks, and outperforms the state-of-the-art S1 method for length control. Furthermore, we uncover an unexpected short chain-of-thought capability in models trained with LCPO. Specifically, using LCPO we derive Short Reasoning Models (SRMs), that exhibit similar reasoning patterns as full-length reasoning models, but can generate CoT lengths comparable to non-reasoning models. They demonstrate significant performance gains, for instance, our 1.5B L1 model surpasses GPT-4o at equal reasoning lengths. Overall, LCPO enables precise control over reasoning length, allowing for fine-grained allocation of test-time compute and accuracy. We release code and models at https://www.cmu-l3.github.io/l1

View on arXivView PDF

Code Implementations(1)

cmu-l3/l1Community67%
MIT

L1: Controlling How Long A Reasoning Model Thinks With Reinforcement Learning

26530Shell, PythonMar 6, 20251 years agoMIT

Similar Papers

Cite this paper

@article{aggarwal2025controlling,
  title  = {L1: Controlling How Long A Reasoning Model Thinks With Reinforcement Learning},
  author = {Pranjal Aggarwal and Sean Welleck},
  year   = {2025},
  eprint = {2503.04697},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.04697v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2503.04697.svg)](https://codeofpaper.com/paper/2503.04697)

Discussion