LLMs能否追踪其输出长度?一种动态反馈机制用于精确长度控制
Can LLMs Track Their Output Length? A Dynamic Feedback Mechanism for Precise Length Regulation
AI总结:
本文提出一种动态反馈机制,用于提升LLM在生成文本时对长度的精确控制,通过无训练方法和进一步微调实现更准确的长度调节。
摘要:
精确控制生成文本的长度是现实应用中的常见要求。然而,尽管在遵循人类指令方面取得了显著进展,大型语言模型(LLMs)仍然难以完成此任务。在本工作中,我们证明LLMs往往无法准确测量其响应长度,导致对长度约束的遵守不佳。为了解决这个问题,我们提出了一种新的长度调节方法,该方法在生成过程中结合动态长度反馈,使模型能够适应性调整以达到目标长度。在摘要和传记任务上的实验表明,我们的无训练方法在实现目标token、单词或句子数量的精度方面显著提升,而不会影响质量。此外,我们还证明进一步的监督微调使我们的方法能够有效泛化到更广泛的文本生成任务。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。