Skip to content
Preprint

How Much is Left? LLMs Linearly Encode Their Remaining Output Length

Jul 2026 · 1 citation · 26 references
Computer Science

TL;DR

Training minimal-capacity linear probes on frozen hidden states of three open-weight 7-8B models across seven completion-style datasets finds three converging pieces of evidence that LLMs maintain a plan-like internal representation of output length, interpreted as evidence that LLMs maintain a plan-like internal representation of output length.

Abstract

Large language models generate one token at a time, yet their responses show remarkably consistent length structure: step-by-step solutions converge in predictable token counts, retrievals stop after a few sentences, retractions extend responses by measurable amounts. We ask whether the model carries an internal estimate of how much response remains. Training minimal-capacity linear probes on frozen hidden states of three open-weight 7-8B models across seven completion-style datasets, we find three converging pieces of evidence. First, total response length is linearly decodable from the prompt's last hidden state alone, before any output is emitted. Second, probe directions trained on natural-language datasets transfer broadly, including to controlled synthetic completions never seen in training, outperforming a statistical baseline; the converse direction generally fails, and this asymmetry is itself informative. Third, on curated high-loss completions, the probe's per-position estimate shifts upward at the moment the model retracts and restarts a partial solution, a directional behavior no position-only predictor can reproduce (qualitative, not aggregate). We frame this as approximate estimation of remaining generation length, distinct from exact-counting impossibility results for transformers, and interpret it as evidence that LLMs maintain a plan-like internal representation of output length (decodable, not necessarily used causally).

View source

Similar papers

Jul 2026

A Better Start for Language Models: Domain-Conditional Position Offsets

A domain-conditional position offset is shown to improve retrieval reranking and domain classification when decisions depend on early in-domain tokens, and to be a lightweight, hot switchable tool for short in-domain scoring and calibration.

Ye Qiao · 0 citations
Preprint Aug 2026

When Is Noise Response Universal? Tokenization as the Hidden Variable in Language Models

The degradation rate across neural models, both sentence embeddings and decoder-only LLMs, is studied, and how consistent it is depends on the scale of the noise: under word-level noise, models with very different architectures decline along nearly the same curve, while under character-level noise they separate.

Ye-Fan Tao, Gerald Friedland, Lu-Yang Kong · 0 citations
Jul 2026

Structured Output Collapses Answer Diversity Across 44 Language Models

When a language model must choose one answer from a large space of equally valid options, a format clause --"Reply with JSON only"-- changes which answer it chooses, and structured output is how software consumes language models.

Tapan Parikh · 0 citations
Preprint Aug 2026

Encoded but Not Actionable: Auditing the Decode-Generate-Steer Gap in Frozen LLMs for Geometric Constraints

Large language models (LLMs) have demonstrated strong performance on structured reasoning tasks, but what they encode and whether it informs model behavior remain unclear. We investigate this question through geometric reasoning, using parametric CAD constraints as a controlled testbed for separating local pairwise rel...

M. Liang, Xin-Zhao Cheng, Faizan Wajid · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.