arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.13697cs.CLcs.AI
收藏

提示烘焙

Prompt Baking

California Institute of Technology(加州理工学院);University of Toronto(多伦多大学)

Aman Bhargava, Cameron Witkowski, Alexander Detkov, Matt Thomson

AI总结:

提出Prompt Baking技术,通过最小化KL散度将提示直接烘焙进LLM权重,在多基准上提升零样本性能并缓解提示遗忘,结合重新提示与烘焙实现迭代自我改进。

摘要:

改变LLM行为的两种主要方式是提示和权重更新(例如微调)。提示LLM简单且有效,以自然语言显式地指定所需的改变,而权重更新则提供了更具表达力和更持久的行为改变,通过在大数据集上训练隐式地指定。我们提出了一种将提示“烘焙”到LLM权重中的技术。Prompt Baking将提示$u$和初始权重$θ$转换为一组新的权重$θ_u$,使得新的“烘焙后”的LLM表现得像原始带提示的LLM。在数学上,我们最小化$P_θ(\cdot | u)$和$P_{θ_u}(\cdot)$之间的KL散度,其中$P$是LLM在token序列上的概率分布。在我们所有的实验中,我们发现提示可以很容易地被烘焙成权重更新。烘焙思维链提示提高了在GSM8K、ASDiv、MBPP、ARC-Easy、ARC-Challenge和CommonsenseQA基准上的零样本性能。烘焙新闻标题直接更新了LLM的知识。烘焙指令和角色设定缓解了长序列上的“提示遗忘”。此外,提前停止烘焙会创建“半烘焙”模型,持续缩放提示强度。烘焙后的模型保留了其对进一步提示和烘焙的敏感性,包括使用已烘焙提示进行重新提示。令人惊讶的是,重新提示的模型在指令遵循、数学推理和编程基准上产生了进一步的性能提升。将重新提示和重新烘焙推向极限会产生一种我们称之为Prompt Pursuit的迭代自我改进形式,在指令遵循上的初步结果展示了显著的性能提升。最后,我们讨论了对AI安全、持续模型更新、增强基于LLM的智能体的实时学习能力以及生成更稳定的AI角色的启示。

英文摘要:

Two primary ways to change LLM behavior are prompting and weight updates (e.g., fine-tuning). Prompting LLMs is simple and effective, specifying the desired changes explicitly in natural language, whereas weight updates provide more expressive and permanent behavior changes, specified implicitly via training on large datasets. We present a technique for "baking" prompts into the weights of an LLM. Prompt Baking converts a prompt $u$ and initial weights $θ$ to a new set of weights $θ_u$ such that new "baked" LLM behaves like the original prompted LLM. Mathematically, we minimize the KL divergence between $P_θ(\cdot | u)$ and $P_{θ_u}(\cdot)$, where $P$ is the LLM's probability distribution over token sequences. Across all our experiments, we find prompts can be readily baked into weight updates. Baking chain-of-thought prompts improves zero-shot performance on GSM8K, ASDiv, MBPP, ARC-Easy, ARC-Challenge, and CommonsenseQA benchmarks. Baking news headlines directly updates an LLM's knowledge. And baking instructions & personas alleviates "prompt forgetting" over long sequences. Furthermore, stopping baking early creates "half-baked" models, continuously scaling prompt strength. Baked models retain their sensitivity to further prompting and baking, including re-prompting with the baked-in prompt. Surprisingly, the re-prompted models yield further performance gains in instruction following, as well as math reasoning and coding benchmarks. Taking re-prompting and re-baking to the limit yields a form of iterative self-improvement we call Prompt Pursuit, and preliminary results on instruction following exhibit dramatic performance gains. Finally, we discuss implications for AI safety, continuous model updating, enhancing real-time learning capabilities in LLM-based agents, and generating more stable AI personas.

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

↑