Sequential Monte Carlo Steering of Large Language Models using Probabilistic Programs

要約

大規模言語モデル(LLM)は、微調整や強化学習を行っても、プロンプトだけで確実に制御することは不可能ではないにせよ、困難である場合がある。我々は、LLMの出力に構文的・意味的な制約を課す新しい推論時間アプローチを提案する。重要なアイデアは、言語生成タスクを離散確率的シーケンスモデルのクラスの事後推論問題として指定し、標準的な復号化を逐次モンテカルロ推論に置き換えることである。ビームサーチと同様の計算コストで、SMCはLLMを操り、インフィリング、構文制約下の生成、プロンプト交差など、多様なタスクを解決することができる。SMCステアリングの実験を容易にするため、新しい生成タスクを言語モデルの確率的プログラムとして簡潔に指定し、LLaMAファミリーのトランスフォーマーのステアリングを自動化する確率的プログラミングライブラリLLaMPPL (https://github.com/probcomp/LLaMPPL)を発表した。

要約(オリジナル)

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/LLaMPPL), for concisely specifying new generation tasks as language model probabilistic programs, and automating steering of LLaMA-family Transformers.

arxiv情報

著者 Alexander K. Lew,Tan Zhi-Xuan,Gabriel Grand,Vikash K. Mansinghka
発行日 2023-06-05 17:55:05+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

カテゴリー: cs.AI, cs.CL, cs.PL, stat.CO パーマリンク