DcLM: Output Length Control of Large Language Models via Dynamic Length Markers

Zhe Chen, Jiaao Yu, Honglin Li


Abstract
Length-controllable text generation (LCTG) is essential for tasks like text summarization and report generation. However, large language models (LLMs) have limited awareness of output length, so precise control over the length of generated text remains a significant challenge. Most existing methods focus on prompt-based frameworks, position encoding, and reinforcement learning for model training. These approaches may affect semantic quality, and struggle to maintain consistent length control across different models and tasks. In this paper, we propose DcLM, a model-agnostic approach that introduces dynamic length markers to guide length-controllable outputs. During training, the model leverages these markers as in-context information, without learning to generate them. At inference time, an external word counter and injected length information guide the model to produce outputs of accurate lengths. We evaluate our method across multiple datasets, and the experimental results demonstrate that DcLM significantly reduces length deviation, showcasing its robust generalization ability across various length scales and tasks.
Anthology ID:
2026.findings-acl.1158
Volume:
Findings of the Association for Computational Linguistics: ACL 2026
Month:
July
Year:
2026
Address:
San Diego, California, United States
Editors:
Maria Liakata, Viviane P. Moreira, Jiajun Zhang, David Jurgens
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
23117–23131
Language:
URL:
https://preview.aclanthology.org/ingest-acl/2026.findings-acl.1158/
DOI:
Bibkey:
Cite (ACL):
Zhe Chen, Jiaao Yu, and Honglin Li. 2026. DcLM: Output Length Control of Large Language Models via Dynamic Length Markers. In Findings of the Association for Computational Linguistics: ACL 2026, pages 23117–23131, San Diego, California, United States. Association for Computational Linguistics.
Cite (Informal):
DcLM: Output Length Control of Large Language Models via Dynamic Length Markers (Chen et al., Findings 2026)
Copy Citation:
PDF:
https://preview.aclanthology.org/ingest-acl/2026.findings-acl.1158.pdf
Checklist:
 2026.findings-acl.1158.checklist.pdf