Sequential Monte Carlo Steering of Large Language Models using Probabilistic Programs
Alexander K. Lew, Tan Zhi-Xuan, Gabriel Grand, and Vikash K., Mansinghka

TL;DR
This paper introduces SMC steering, a novel inference-time method that uses sequential Monte Carlo to control large language models' outputs by framing generation as a probabilistic inference problem, enabling diverse constrained tasks.
Contribution
It presents a new inference approach for controlling LLM outputs using probabilistic programming and SMC, with a library for easy experimentation and steering of LLaMA models.
Findings
SMC steering achieves similar computational costs to beam search.
It effectively enforces syntactic and semantic constraints.
Enables diverse tasks like infilling and prompt intersection.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques · Topic Modeling · Speech and dialogue systems
