mlsanityData to 7 Oct 2026

Length Controlled Generation for Black-box LLMs

arXiv 2412.14656 ↗First posted 19 Dec 2024cs.CLcited by 8

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

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2023GPT-4 Technical Reportcited by 18,132
  4. 2024The Llama 3 Herd of Modelscited by 14,192
  5. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  6. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  7. 2014Sequence to Sequence Learning with Neural Networkscited by 2,974
  8. 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
  9. 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,674
  10. 2024Length-Controlled AlpacaEval: A Simple Way to Debias Automatic Evaluatorscited by 865
  11. 2016Abstractive Text Summarization Using Sequence-to-Sequence RNNs and Beyondcited by 809
  12. 2024A Survey on Large Language Models for Code Generationcited by 646
9 more
  1. 2023What Makes Good Data for Alignment? A Comprehensive Study of Automatic Data Selection in Instruction Tuningcited by 354
  2. 2023A Long Way to Go: Investigating Length Correlations in RLHFcited by 285
  3. 2024From r to Q^*: Your Language Model is Secretly a Q-Functioncited by 242
  4. 2024A Survey on Recent Advances in LLM-Based Multi-turn Dialogue Systemscited by 170
  5. 2024Multi-Step Reasoning with Large Language Models, a Surveycited by 140
  6. 2017Controllable Abstractive Summarizationcited by 110
  7. 2019Positional Encoding to Control Output Sequence Lengthcited by 56
  8. 2024Following Length Constraints in Instructionscited by 45
  9. 2021LenAtten: An Effective Length Controlling Unit For Text Summarizationcited by 14

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 2; 2026: 6.

8 papers.