arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2307.09702cs.CLcs.LG
收藏

面向大语言模型的高效引导生成方法

Efficient Guided Generation for Large Language Models

Normal Computing

Brandon T. Willard, Rémi Louf

AI总结:

该研究将神经文本生成重构为有限状态机状态转移问题,提出基于正则表达式与上下文无关文法的模型无关高效引导生成方法,开销低、性能优于现有方案,已在开源Python库Outlines中实现。

摘要:

本文展示了如何将神经文本生成问题以有限状态机的状态转移形式进行建设性重构。该框架通过在语言模型词表上构建索引,提出了一种利用正则表达式与上下文无关文法引导文本生成的高效方法。该方法具备模型无关性,可用于强制注入领域特定知识与约束,还能通过保证生成文本的结构来构建可靠接口。它在词元序列生成过程中仅增加极少开销,且性能显著优于现有方案。相关实现已在开源Python库Outlines中提供。

英文摘要:

In this article we show how the problem of neural text generation can be constructively reformulated in terms of transitions between the states of a finite-state machine. This framework leads to an efficient approach to guiding text generation with regular expressions and context-free grammars by allowing the construction of an index over a language model's vocabulary. The approach is model agnostic, allows one to enforce domain-specific knowledge and constraints, and enables the construction of reliable interfaces by guaranteeing the structure of the generated text. It adds little overhead to the token sequence generation process and significantly outperforms existing solutions. An implementation is provided in the open source Python library Outlines

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

↑