使用变分推理对堆叠LLM进行联合提示优化
Joint Prompt Optimization of Stacked LLMs using Variational Inference
AI总结:
本文提出将堆叠LLM视为深度语言网络,利用变分推理联合优化各层提示,实验表明两层网络可超越单层性能,有望以更小模型达到GPT-4水平。
摘要:
大型语言模型(LLMs)可以被视为将序列映射到序列分布的计算原子单元。因此,它们可以被视为语言网络中的随机语言层,其中可学习的参数是每一层的自然语言提示。通过堆叠两个这样的层并将一层的输出馈送到下一层,我们获得了一个深度语言网络(DLN)。我们首先展示如何有效地为1层语言网络(DLN-1)执行提示优化。然后,我们提出一个扩展到2层DLN(DLN-2)的方法,其中必须学习两个提示。关键思想是将第一层的输出视为一个潜在变量,这需要推理,并将要学习的提示视为生成分布的参数。我们首先在多个推理和自然语言理解任务中测试DLN-1的有效性。然后,我们展示DLN-2可以达到比单层更高的性能,表明即使网络中的每个LLM更小且能力更弱,我们也有望达到与GPT-4相当的性能。
英文摘要:
Large language models (LLMs) can be seen as atomic units of computation mapping sequences to a distribution over sequences. Thus, they can be seen as stochastic language layers in a language network, where the learnable parameters are the natural language prompts at each layer. By stacking two such layers and feeding the output of one layer to the next, we obtain a Deep Language Network (DLN). We first show how to effectively perform prompt optimization for a 1-Layer language network (DLN-1). Then, we present an extension that applies to 2-layer DLNs (DLN-2), where two prompts must be learned. The key idea is to consider the output of the first layer as a latent variable, which requires inference, and prompts to be learned as the parameters of the generative distribution. We first test the effectiveness of DLN-1 in multiple reasoning and natural language understanding tasks. Then, we show that DLN-2 can reach higher performance than a single layer, showing promise that we might reach comparable performance to GPT-4, even when each LLM in the network is smaller and less powerful.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。