arXiv:2411.15927cs.CLcs.AI2024-11NAACL被引 5

让大模型自己生成并理解提示词,提升推理效率。

Generative Prompt Internalization

  • 联合训练让模型自动生成提示词及理由。
  • 无需外部环境交互即可完成有效训练。
  • 适合无现成数据集的复杂提示场景。

近期基于大语言模型的应用常使用固定且冗长的提示词,带来显著计算开销。为此,我们提出生成式提示内化(GenPI),一种轻量级联合训练方法。GenPI不仅复现了带提示词模型的行为,还能生成提示内容及其引发行为变化的原因。我们在多种基于代理的应用场景中验证了该方法对复杂提示的有效内化。为在不依赖专用环境交互的情况下实现有效训练,我们引入一种数据合成技术,通过角色互换自主构建对话数据集。该方法尤其适用于仅有预定义提示但缺乏对应训练数据集的场景。通过内化复杂提示,GenPI实现了高性能与高效推理,无需显式提示。

原文摘要 · Abstract (English)

Prompts used in recent large language model based applications are often fixed and lengthy, leading to significant computational overhead. To address this challenge, we propose Generative Prompt Internalization (GenPI), a lightweight method that employs a joint training approach. GenPI not only replicates the behavior of models with prompt inputs but also generates the content of the prompt along with reasons for why the model's behavior should change accordingly. We demonstrate that our approach effectively internalizes complex prompts across various agent-based application scenarios. For effective training without interactions with the dedicated environments, we introduce a data synthesis technique that autonomously collects conversational datasets by swapping the roles of the agent and environment. This method is especially useful in scenarios where only a predefined prompt is available without a corresponding training dataset. By internalizing complex prompts, Generative Prompt Internalization enables high performance and efficient inference without the need for explicit prompts.

提示工程模型压缩高效推理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。