InstructZero : Optimisation efficace des instructions pour les modèles de langage de grande taille en boîte noire
InstructZero: Efficient Instruction Optimization for Black-Box Large Language Models
June 5, 2023
Auteurs: Lichang Chen, Jiuhai Chen, Tom Goldstein, Heng Huang, Tianyi Zhou
cs.AI
Résumé
Les grands modèles de langage (LLMs) sont des suiveurs d'instructions, mais il peut être difficile de trouver la meilleure instruction pour différentes situations, en particulier pour les LLMs en boîte noire sur lesquels la rétropropagation est interdite. Au lieu d'optimiser directement l'instruction discrète, nous optimisons un prompt souple de faible dimension appliqué à un LLM open-source pour générer l'instruction pour le LLM en boîte noire. À chaque itération de la méthode proposée, que nous appelons InstructZero, un prompt souple est converti en instruction à l'aide du LLM open-source, qui est ensuite soumis au LLM en boîte noire pour une évaluation en zero-shot, et la performance est envoyée à l'optimisation bayésienne pour produire de nouveaux prompts souples améliorant la performance en zero-shot. Nous évaluons InstructZero sur différentes combinaisons de LLMs open-source et d'APIs, y compris Vicuna et ChatGPT. Nos résultats montrent qu'InstructZero surpasse les méthodes SOTA d'auto-instruction sur une variété de tâches en aval. Notre code et nos données sont disponibles publiquement à l'adresse 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.