解鎖預期文本生成:一種受限方法用於與大型語言模型的忠實解碼
Unlocking Anticipatory Text Generation: A Constrained Approach for Faithful Decoding with Large Language Models
December 11, 2023
作者: Lifu Tu, Semih Yavuz, Jin Qu, Jiacheng Xu, Rui Meng, Caiming Xiong, Yingbo Zhou
cs.AI
摘要
大型語言模型(LLMs)展現了強大的文本生成能力。然而,對於十億規模的模型,要實現在特定提示或指令下取得最佳結果可能具有挑戰性。此外,不良行為,如毒性或幻覺,也可能出現。儘管更大型的模型(例如ChatGPT)可能展現出在緩解這些問題方面的優勢,但仍無法完全保證預防。在這項工作中,我們提出將文本生成正式化為未來受限生成問題,以最小化不良行為並強制忠實於指示。使用LLMs 實現未來受限滿足的估計,引導文本生成過程。我們的廣泛實驗證明了所提方法在三個不同的文本生成任務中的有效性:關鍵詞受限生成(Lin等,2020)、毒性減少(Gehman等,2020)以及問答中事實的正確性(Gao等,2023)。
English
Large Language Models (LLMs) have demonstrated a powerful ability for text
generation. However, achieving optimal results with a given prompt or
instruction can be challenging, especially for billion-sized models.
Additionally, undesired behaviors such as toxicity or hallucinations can
manifest. While much larger models (e.g., ChatGPT) may demonstrate strength in
mitigating these issues, there is still no guarantee of complete prevention. In
this work, we propose formalizing text generation as a future-constrained
generation problem to minimize undesirable behaviors and enforce faithfulness
to instructions. The estimation of future constraint satisfaction, accomplished
using LLMs, guides the text generation process. Our extensive experiments
demonstrate the effectiveness of the proposed approach across three distinct
text generation tasks: keyword-constrained generation (Lin et al., 2020),
toxicity reduction (Gehman et al., 2020), and factual correctness in
question-answering (Gao et al., 2023).