arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2406.10278cs.CLcs.AI
收藏

基于提示的多控制类型长度受控生成

Prompt-Based Length Controlled Generation with Multiple Control Types

Huawei Noah’s Ark Lab(华为诺亚方舟实验室);Northwestern Polytechnical University(西北工业大学)

Renlong Jie, Xiaojun Meng, Lifeng Shang, Xin Jiang, Qun Liu

AI总结:

针对 LLM 文本长度控制类型单一的问题,提出基于提示的方法,结合规则奖励的 RL、样本过滤和标准提示提取器,实现多类型高精度长度控制并具备良好泛化性。

摘要:

鉴于大型语言模型(LLM)在广泛的 NLP 任务上表现强劲,其已吸引大量关注。在实际应用中,用户通常期望生成文本落在特定长度范围内,这使长度受控生成成为重要课题,尤其是对于 GPT 风格模型。现有长度控制方法大多聚焦于“等于”目标长度这一简单控制类型。与之不同,我们提出一种基于提示的方法,以在不同控制类型下高精度实现长度受控生成。具体而言,我们采用强化学习(RL)和样本过滤,并使用基于规则的奖励模型给出奖励信号,通过奖励遵循特定控制指令的输出来增强模型的长度控制能力。此外,我们引入标准提示提取器,将任意用户输入解析为标准控制指令。实验表明,在 CNNDM 和 NYT 等常用摘要数据集上,我们的方法在多种控制类型下显著提高了基于提示的长度控制准确率。此外,标准提示提取器和经 RL 调优的模型均对未见过的控制提示模板表现出很强的泛化能力。

英文摘要:

Large language models (LLMs) have attracted great attention given their strong performance on a wide range of NLP tasks. In practice, users often expect generated texts to fall within a specific length range, making length controlled generation an important topic, especially for GPT-style models. Existing length control methods mostly focus on a simple control type of "equal to" a target length. Different from them, we propose a prompt-based method to achieve length controlled generation under different control types with high accuracy. In particular, we adopt reinforcement learning (RL) and sample filtering with the reward signal given by rule-based reward models, which enhances the length control ability of models by rewarding outputs that follow certain control instructions. In addition, we introduce a standard prompt extractor to parse arbitrary users' input into standard control instructions. Experiments show that our method significantly improves the accuracy of prompt-based length control on popular summarization datasets like CNNDM and NYT under multiple control types. Moreover, both the standard prompt extractor and RL-tuned model show strong generalization to unseen control prompt templates.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑