ChatPaper.aiChatPaper

InstructZero:针对黑盒大型语言模型的高效指令优化

InstructZero: Efficient Instruction Optimization for Black-Box Large Language Models

June 5, 2023
作者: Lichang Chen, Jiuhai Chen, Tom Goldstein, Heng Huang, Tianyi Zhou
cs.AI

摘要

大型语言模型(LLMs)是指令跟随者,但在不同情况下找到最佳指令可能具有挑战性,尤其是对于禁止反向传播的黑盒LLMs。我们并非直接优化离散指令,而是优化应用于开源LLM的低维软提示,以生成黑盒LLM的指令。在所提出的方法InstructZero的每次迭代中,将软提示转换为指令,然后将其提交给黑盒LLM进行零次评估,并将性能发送到贝叶斯优化以生成改进零次性能的新软提示。我们在不同组合的开源LLMs和API上评估了InstructZero,包括Vicuna和ChatGPT。我们的结果表明,在各种下游任务中,InstructZero优于SOTA自动指令方法。我们的代码和数据可在https://github.com/Lichang-Chen/InstructZero 上公开获取。
English
Large language models~(LLMs) are instruction followers, but it can be challenging to find the best instruction for different situations, especially for black-box LLMs on which backpropagation is forbidden. Instead of directly optimizing the discrete instruction, we optimize a low-dimensional soft prompt applied to an open-source LLM to generate the instruction for the black-box LLM. On each iteration of the proposed method, which we call InstructZero, a soft prompt is converted into an instruction using the open-source LLM, which is then submitted to the black-box LLM for zero-shot evaluation, and the performance is sent to Bayesian optimization to produce new soft prompts improving the zero-shot performance. We evaluate InstructZero on different combinations of open-source LLMs and APIs including Vicuna and ChatGPT. Our results show that InstructZero outperforms SOTA auto-instruction methods across a variety of downstream tasks. Our code and data are publicly available at https://github.com/Lichang-Chen/InstructZero.
PDF50December 15, 2024