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

Аннотация

Крупные языковые модели (LLM) следуют инструкциям, однако поиск оптимальной инструкции для различных ситуаций может быть сложной задачей, особенно для "черных ящиков" LLM, где использование обратного распространения запрещено. Вместо непосредственной оптимизации дискретной инструкции мы оптимизируем низкоразмерный мягкий промт, применяемый к открытой LLM, чтобы сгенерировать инструкцию для "черного ящика" LLM. На каждой итерации предложенного метода, который мы называем InstructZero, мягкий промт преобразуется в инструкцию с помощью открытой LLM, которая затем передается в "черный ящик" LLM для оценки в режиме zero-shot, а результаты отправляются в байесовскую оптимизацию для создания новых мягких промтов, улучшающих производительность в режиме zero-shot. Мы оцениваем InstructZero на различных комбинациях открытых LLM и API, включая Vicuna и ChatGPT. Наши результаты показывают, что InstructZero превосходит современные методы автоматической генерации инструкций в различных задачах. Наш код и данные доступны по адресу 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