Length Controlled Generation for Black-box LLMs
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) have demonstrated impressive instruction following capabilities, while still struggling to accurately manage the length of the generated text, which is a fundamental requirement in many real-world applications. Existing length control methods involve fine-tuning the parameters of LLMs, which is inefficient and suboptimal for practical use. In this paper, we propose a novel iterative sampling framework for text length control, integrating the Metropolis-Hastings algorithm with an importance sampling acceleration strategy. This framework efficiently and reliably regulates LLMs to generate length-constrained text without modifying the underlying parameters, thereby preserving the original capabilities of LLMs. Experimental results demonstrate that our framework achieves almost 100% success rates of length control on Llama3.1 for tasks such as length-controlled abstractive summarization and length-constrained instruction following, with minimal additional computational overhead. This also highlights the significant potential of our method for precise length control across a broader range of applications, without compromising the versatility of LLMs.
Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Builds on 21 of its 50 references that are in the map. First posted on arXiv 19 Dec 2024.
Builds on
21 of 50 references.
References · 21
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023GPT-4 Technical Reportcited by 18,132
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2014Sequence to Sequence Learning with Neural Networkscited by 2,974
- 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
- 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,674
- 2024Length-Controlled AlpacaEval: A Simple Way to Debias Automatic Evaluatorscited by 865
- 2016Abstractive Text Summarization Using Sequence-to-Sequence RNNs and Beyondcited by 809
- 2024A Survey on Large Language Models for Code Generationcited by 646
9 more
- 2023What Makes Good Data for Alignment? A Comprehensive Study of Automatic Data Selection in Instruction Tuningcited by 354
- 2023A Long Way to Go: Investigating Length Correlations in RLHFcited by 285
- 2024From r to Q^*: Your Language Model is Secretly a Q-Functioncited by 242
- 2024A Survey on Recent Advances in LLM-Based Multi-turn Dialogue Systemscited by 170
- 2024Multi-Step Reasoning with Large Language Models, a Surveycited by 140
- 2017Controllable Abstractive Summarizationcited by 110
- 2019Positional Encoding to Control Output Sequence Lengthcited by 56
- 2024Following Length Constraints in Instructionscited by 45
- 2021LenAtten: An Effective Length Controlling Unit For Text Summarizationcited by 14
Built on by
Citing papers per year: 2025: 2; 2026: 6.
8 papers.
- 2025From Sub-Ability Diagnosis to Human-Aligned Generation: Bridging the Gap for Text Length Control via MARKERGENcited by 2
- 2026LARFT: Closing the Cognition-Action Gap for Length Instruction Following in Large Language Modelscited by 1
- 2026TiCo: Time-Controllable Spoken Dialogue Modelcited by 1
- 2025Progress Ratio Embeddings: An Impatience Signal for Robust Length Control in Neural Text Generationcited by 0
- 2026HOMURA: Taming the Sand-Glass for Time-Constrained LLM Translation via Reinforcement Learningcited by 0
- 2026PLOT: Enhancing Preference Learning via Optimal Transportcited by 0
- 2026Length Value Model: Scalable Value Pretraining for Token-Level Length Modelingcited by 0
- 2026Towards Faithful Sentimental Image Captioning via Evidence-Aware Multi-Agent Reasoningcited by 0
- 2026Towards Faithful Sentimental Image Captioning via Evidence-Aware Multi-Agent Reasoning28 Jul 2026
- 2026Length Value Model: Scalable Value Pretraining for Token-Level Length Modeling29 Apr 2026
- 2026PLOT: Enhancing Preference Learning via Optimal Transport2 Apr 2026
- 2026TiCo: Time-Controllable Spoken Dialogue Model23 Mar 2026
- 2026LARFT: Closing the Cognition-Action Gap for Length Instruction Following in Large Language Models25 Feb 2026
- 2026HOMURA: Taming the Sand-Glass for Time-Constrained LLM Translation via Reinforcement Learning15 Jan 2026
- 2025Progress Ratio Embeddings: An Impatience Signal for Robust Length Control in Neural Text Generation7 Dec 2025
- 2025From Sub-Ability Diagnosis to Human-Aligned Generation: Bridging the Gap for Text Length Control via MARKERGEN19 Feb 2025