arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2306.03081cs.AIcs.CLcs.PLstat.CO
收藏

使用概率程序进行大语言模型的序贯蒙特卡洛引导

Sequential Monte Carlo Steering of Large Language Models using Probabilistic Programs

MIT(麻省理工学院)

Alexander K. Lew, Tan Zhi-Xuan, Gabriel Grand, Vikash K. Mansinghka

AI总结:

提出序贯蒙特卡洛(SMC)引导方法,将语言生成任务转化为离散概率序列模型的后验推理问题,在推理时强制执行LLM输出的语法和语义约束,并以与束搜索相近的计算成本解决填充、语法约束生成等任务。

摘要:

即使在微调和强化学习之后,大语言模型(LLM)也可能难以(甚至不可能)仅通过提示进行可靠控制。我们提出了一种新的推理时方法来强制执行LLM输出的语法和语义约束,称为序贯蒙特卡洛(SMC)引导。关键思想是将语言生成任务指定为一类离散概率序列模型中的后验推理问题,并用序贯蒙特卡洛推理替换标准解码。对于与束搜索相似的计算成本,SMC可以引导LLM解决各种任务,包括填充、语法约束下的生成和提示交集。为了促进SMC引导的实验,我们提出了一个概率编程库LLaMPPL(https://github.com/probcomp/hfppl),用于简洁地将新生成任务指定为语言模型概率程序,并自动化LLaMA系列Transformer的引导。

英文摘要:

Even after fine-tuning and reinforcement learning, large language models (LLMs) can be difficult, if not impossible, to control reliably with prompts alone. We propose a new inference-time approach to enforcing syntactic and semantic constraints on the outputs of LLMs, called sequential Monte Carlo (SMC) steering. The key idea is to specify language generation tasks as posterior inference problems in a class of discrete probabilistic sequence models, and replace standard decoding with sequential Monte Carlo inference. For a computational cost similar to that of beam search, SMC can steer LLMs to solve diverse tasks, including infilling, generation under syntactic constraints, and prompt intersection. To facilitate experimentation with SMC steering, we present a probabilistic programming library, LLaMPPL (https://github.com/probcomp/hfppl), for concisely specifying new generation tasks as language model probabilistic programs, and automating steering of LLaMA-family Transformers.

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

↑