The End of Manual Decoding: Towards Truly End-to-End Language Models

Zhichao Wang, Dongyang Ma, Xinting Huang, Deng Cai, Tian Lan, Jiahao Xu, Haitao Mi, Xiaoying Tang, Yan Wang

Abstract

The "end-to-end" label for LLMs is a misnomer. In practice, they depend on a non-differentiable decoding process that requires laborious, hand-tuning of hyperparameters like temperature and top-p. This paper introduces AutoDeco, a novel architecture that enables truly "end-to-end" generation by learning to control its own decoding strategy. We augment the standard transformer with lightweight heads that, at each step, dynamically predict context-specific temperature and top-p values alongside the next-token logits. This approach transforms decoding into a parametric, token-level process, allowing the model to self-regulate its sampling strategy within a single forward pass. Through extensive experiments on eight benchmarks, we demonstrate that AutoDeco not only significantly outperforms default decoding strategies but also achieves performance comparable to an oracle-tuned baseline derived from "hacking the test set"—a practical upper bound for any static method. Crucially, we uncover an emergent capability for instruction-based decoding control: the model learns to interpret natural language commands (e.g., "generate with low randomness") and adjusts its predicted temperature and top-p on a token-by-token basis, opening a new paradigm for steerable and interactive LLM decoding.

Introduction

While Large Language Models (LLMs) are celebrated as "end-to-end" systems, the final stage of text generation—decoding—remains a manual bottleneck. Currently, users must heuristically select static hyperparameters such as Temperature (to control randomness) and Top-p (to control the diversity of the candidate pool).

This reliance on manual tuning presents two significant challenges. First, identifying optimal settings often requires exhaustive "grid searching" or "hacking the test set." Second, static settings are inherently suboptimal; a model may require high creativity (high temperature) for brainstorming but high precision (low temperature) for factual computation. Current models apply a "one-size-fits-all" strategy across entire sequences, forcing a trade-off between creativity and accuracy.

The AutoDeco Architecture

To address these limitations, we propose AutoDeco, an architecture that transforms decoding into a self-regulating, truly end-to-end process. AutoDeco augments standard Transformers with two lightweight, 2-layer MLP heads that predict decoding parameters dynamically.

Figure 1: Comparison between traditional manual decoding and the proposed AutoDeco end-to-end decoding architecture.

Dynamic Parameter Prediction

At each generation step, the AutoDeco heads process the model's hidden state to predict context-specific temperature ($\hat{T}$) and top-p ($\hat{P}$) values. These values are generated alongside the standard next-token logits, allowing the model to adjust its sampling strategy token-by-token based on the immediate context.

Differentiable "Soft" Top-p

Standard top-p sampling employs a "hard cutoff" that zeroes out tokens below a cumulative probability threshold. This operation is non-differentiable, which prevents training via standard backpropagation. AutoDeco overcomes this by introducing a "soft" mask using a ReLU-based exponential decay. This innovation allows gradients to flow from the final cross-entropy loss back into the hyperparameter heads, enabling end-to-end training.

Figure 3: Visualization of the differentiable soft top-p mask compared to the traditional hard cut-off mask.

Training and Evaluation

The AutoDeco heads are trained on "reject sampling trajectories"—contrasting successful and unsuccessful reasoning paths—using the DeepMath-103K dataset. To ensure robustness, we employ Easy-Token Masking (ignoring loss on trivial tokens) and Dynamic Fine-Tuning to manage uncertainty.

Performance and Generalization

We evaluated AutoDeco across a diverse set of benchmarks, including mathematical reasoning (AIME, BeyondAIME) and general-purpose tasks (GPQA-Diamond, MMLU-Pro, LiveCodeBenchV6, IFEval).

Key results include:

  • Performance Gains: On Llama-3.1-Nemotron-8B, AutoDeco improved average math scores by ~3.5 points over default sampling. On R1-Distill-Qwen-7B, general task scores increased by 4.4 points.
  • Oracle-Level Accuracy: AutoDeco's performance nearly matches "Expert-Guided" baselines—theoretical upper bounds where static parameters are perfectly tuned for each specific test set.
  • Minimal Overhead: The MLP heads add only 1-2% latency and a negligible memory footprint (~4MB).

Emergent Capabilities: Instruction-Based Steering

A significant discovery is AutoDeco's emergent ability for Natural Language Control. By prepending commands such as "generate with low randomness," the model autonomously adjusts its internal $\hat{T}$ and $\hat{P}$ values. This suggests that the model has learned a "meta-skill" for interpreting human intent regarding style and certainty, achieving over 95% consistency in parameter adjustment.

Conclusion and Future Work

AutoDeco represents a significant step toward truly autonomous LLMs by eliminating the need for manual decoding tuning. While the model currently excels at directional adjustment (e.g., lowering temperature when asked for certainty), future work will focus on achieving precise absolute control. We also plan to explore joint training of the backbone and decoding heads to unlock even more granular, token-level steering capabilities.

Summary updated

Abstract

The "end-to-end" label for LLMs is a misnomer. In practice, they depend on a non-differentiable decoding process that requires laborious, hand-tuning of hyperparameters like temperature and top-p. This paper introduces AutoDeco, a novel architecture that enables truly "end-to-end" generation by learning to control its own decoding strategy. We augment the standard transformer with lightweight heads that, at each step, dynamically predict context-specific temperature and top-p values alongside the next-token logits. This approach transforms decoding into a parametric, token-level process, allowing the model to self-regulate its sampling strategy within a single forward pass. Through extensive experiments on eight benchmarks, we demonstrate that AutoDeco not only significantly outperforms default decoding strategies but also achieves performance comparable to an oracle-tuned baseline derived from "hacking the test set"-a practical upper bound for any static method. Crucially, we uncover an emergent capability for instruction-based decoding control: the model learns to interpret natural language commands (e.g., "generate with low randomness") and adjusts its predicted temperature and top-p on a token-by-token basis, opening a new paradigm for steerable and interactive LLM decoding.
BibTeX
@inproceedings{wang2026end,
  author = {Zhichao Wang and Dongyang Ma and Xinting Huang and Deng Cai and Tian Lan and Jiahao Xu and Haitao Mi and Xiaoying Tang and Yan Wang},
  title = {{The End of Manual Decoding: Towards Truly End-to-End Language Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=cPTgQDMD5p},
}
Figure