Precisely controlling the length of generated text is a common requirement in real-world applications. However, despite significant advancements in following human instructions, Large Language Models (LLMs) still struggle with this task. In this work, we demonstrate that LLMs often fail to accurately measure their response lengths, leading to poor adherence to length constraints. To address this issue, we propose a novel length regulation approach that incorporates dynamic length feedback during generation, enabling adaptive adjustments to meet target lengths. Experiments on summarization and biography tasks show our training-free approach significantly improves precision in achieving target token, word, or sentence counts without compromising quality. Additionally, we demonstrate that further supervised fine-tuning allows our method to generalize effectively to broader text-generation tasks.


翻译:精确控制生成文本的长度是实际应用中的常见需求。然而,尽管在遵循人类指令方面取得了显著进展,大型语言模型(LLMs)在此任务上仍存在困难。在本研究中,我们证明LLMs常常无法准确测量其响应长度,导致对长度约束的遵循效果不佳。为解决此问题,我们提出了一种新颖的长度调控方法,该方法在生成过程中引入动态长度反馈,从而能够进行自适应调整以满足目标长度。在摘要和传记任务上的实验表明,我们这种无需训练的方法在实现目标标记数、词数或句子数方面显著提高了精度,且不损害生成质量。此外,我们证明进一步的监督微调可以使我们的方法有效地泛化到更广泛的文本生成任务中。

0
下载
关闭预览

相关内容

【ICML2025】从混淆的离线数据中自动构造奖励函数
专知会员服务
9+阅读 · 2025年5月22日
[ICML2024]消除偏差:微调基础模型以进行半监督学习
专知会员服务
18+阅读 · 2024年5月23日
【ICML2024】TIMEX++: 通过信息瓶颈学习时间序列解释
专知会员服务
17+阅读 · 2024年5月16日
【CVPR2023】DynamicDet:目标检测的统一动态架构
专知会员服务
26+阅读 · 2023年4月15日
AAAI 2022 | ProtGNN:自解释图神经网络
专知
10+阅读 · 2022年2月28日
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
17+阅读 · 2008年12月31日
VIP会员
相关VIP内容
【ICML2025】从混淆的离线数据中自动构造奖励函数
专知会员服务
9+阅读 · 2025年5月22日
[ICML2024]消除偏差:微调基础模型以进行半监督学习
专知会员服务
18+阅读 · 2024年5月23日
【ICML2024】TIMEX++: 通过信息瓶颈学习时间序列解释
专知会员服务
17+阅读 · 2024年5月16日
【CVPR2023】DynamicDet:目标检测的统一动态架构
专知会员服务
26+阅读 · 2023年4月15日
相关基金
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
17+阅读 · 2008年12月31日
Top
微信扫码咨询专知VIP会员