Length Value Model: Scalable Value Pretraining for Token-Level Length Modeling

Zhen Zhang, Changyi Yang, Zijie Xia, Zhen Yang, Chengzhi Liu, Zhaotian Weng, Yepeng Liu, Haobo Chen, Jin Pan, Chenyang Zhao, Yuheng Bu, Alkesh Patel, Zhe Gan, Xin Eric Wang

TL;DR

The Length Value Model (LenVM) is a novel framework that treats remaining generation length as a token-level value estimation problem. By predicting a discounted "length return" at every decoding step, LenVM enables precise length control and continuous performance-efficiency steering for LLMs and VLMs without requiring any human annotations or retraining of the base model.

What Problem Does This Paper Address?

In modern autoregressive models, generation length is a double-edged sword: more tokens can enable deeper reasoning but also directly increase inference latency, memory usage, and cost. Despite its importance, existing methods for managing length are often "coarse-grained"—operating at the sequence level through penalties or simple prompt instructions.

There is a lack of fine-grained, token-level understanding of generation dynamics. We don't just need to know how long a response might be; we need to know, at every single step of generation, how much "horizon" remains. Addressing this gap allows for better scheduling, more efficient reasoning, and exact control over output length.

Methods

The core innovation of LenVM is formulating length modeling as a value estimation problem, drawing inspiration from Reinforcement Learning (RL).

  1. Discounted Return Formulation: Instead of predicting raw token counts (which can range from one to tens of thousands), the authors assign a constant negative reward to each generated token and apply a discount factor ($\gamma$). This produces a "discounted return" ($G_t$) that is bounded between -1 and 0 and acts as a monotone proxy for the remaining generation horizon.
  2. Architecture: LenVM attaches a lightweight scalar value head (a two-layer MLP) to the final-layer hidden states of a pre-trained LLM or VLM.
  3. Scalable Pretraining: The model is trained using a simple token-wise Mean Squared Error (MSE) loss. Crucially, this process is annotation-free: training targets are generated automatically by sampling completions from the base model and calculating their realized lengths.
  4. Inference-Time Steering:
  5. Hard Constraints: For tasks requiring exact lengths, LenVM scores candidate tokens and selects those whose predicted values best match the target remaining length.
  6. Soft Steering (Exponential Tilting): To balance quality and efficiency, the authors use "value-guided exponential tilting" to reweight the next-token distribution, favoring shorter successful reasoning paths.
Figure 1: Length Value Model (LenVM) architecture and Pipeline. At each decoding step, LenVM attaches a scalar value head to the final-layer hidden state of an LLM or VLM to predict the value Vt ∈(−1, 0). LenVM enables annotation-free and scalable value pretraining across model size, prompt count, and number of completions.

Datasets

The authors trained general LenVMs on a multi-domain mixture of approximately 2 million samples:

  • Code: OpenCodeReasoning-2 (Python)
  • Instruction Following: WildChat
  • Math: DeepMath-103K

For evaluation, they introduced LIFEBench-token, a token-based adaptation of the LIFEBench benchmark designed to test adherence to specific length constraints (Equal To, At Most, At Least). They also tested on standard reasoning benchmarks like GSM8K, MATH500, MathVista, and AIME2025.

Key Insights and Ideas

  • Length as a Value Signal: Generation length isn't just a metadata property; it can be modeled as a dense, token-level signal that reflects the model's internal reasoning state.
  • Latent Efficiency: The experiments suggest that base models often already "know" how to solve a problem concisely. LenVM doesn't teach the model new reasoning; it simply helps uncover the shorter, successful trajectories already present in the model's probability space.
  • Reasoning "Pivots": The model identifies specific tokens that act as markers for length shifts. For example, tokens like "therefore" or "clearly" correlate with a sharp decrease in the remaining horizon (shorter-horizon shifts), while tokens like "wait" or "think" signal that the model is entering a longer reasoning phase.
  • Bellman Consistency: Because the length target satisfies a Bellman-like recursion, it integrates naturally into standard RL frameworks (like PPO) as a length-specific value baseline or for reward shaping.

Key Results

  • Superior Length Control: On LIFEBench-token, LenVM improved the exact-length score of Qwen2.5-7B-Instruct from 30.9 to 64.8 in a single pass. When combined with iterative refinement (LCG), it reached a score of 83.6, significantly outperforming closed-source models like GPT-4o and Claude 3.5 Sonnet.
  • Efficiency Gains: On GSM8K, LenVM-guided steering maintained a 63% Pass@1 accuracy at a 200-token budget, whereas a simple hard truncation (cutting off the model at 200 tokens) plummeted to just 6%.
  • Pareto Frontier Improvement: As shown in Figure 2, LenVM consistently provides a better trade-off between accuracy and response length compared to standard token-budget baselines across math and vision-language tasks.
Figure 2: Performance (Pass@1) versus average generation length. LenVM-guided ex- ponential tilting (red) consistently outperforms a hard token-budget baseline (blue). The x-axis reports the average truncated response length. Since the base generator is unchanged, the result shows that the model already has the ability to solve problems with shorter generations, and LenVM helps uncover those trajectories by reweighting token choices. Models in parentheses represent the initialization checkpoints.
  • Accurate Prediction: Even before generation begins (at the prompt boundary), a 32B LenVM can predict the expected response length with a Mean Relative Error as low as 9.8% for math tasks.

Limitations and Future Work

  • Inference Overhead: Running a separate value head and scoring multiple candidate tokens adds latency. While the authors introduced an "entropy skipping" optimization that reduces overhead to 1.90x (down from 4.55x), it is still slower than vanilla decoding.
  • Policy Dependence: A LenVM is typically tied to the specific rollout policy of the model it was trained on. Its performance under significant policy shifts (e.g., using a different base model) remains an open question.
  • Future RL Integration: While this paper focuses on inference-time control, the authors highlight LenVM's potential as a dense reward signal for training future "reasoning models" that are natively optimized for both accuracy and efficiency.

Summary updated

BibTeX
@inproceedings{zhang2026length,
  author = {Zhen Zhang and Changyi Yang and Zijie Xia and Zhen Yang and Chengzhi Liu and Zhaotian Weng and Yepeng Liu and Haobo Chen and Jin Pan and Chenyang Zhao and Yuheng Bu and Alkesh Patel and Zhe Gan and Xin Eric Wang},
  title = {{Length Value Model: Scalable Value Pretraining for Token-Level Length Modeling}},
  booktitle = {COLM},
  year = {2026},
  url = {https://openreview.net/forum?id=arb5fLCFmS},
}
Figure