Large language models (LLMs) have shown increasing power on various natural language processing (NLP) tasks. However, tuning these models for downstream tasks usually needs exorbitant costs or is unavailable due to commercial considerations. Recently, black-box tuning has been proposed to address this problem by optimizing task-specific prompts without accessing the gradients and hidden representations. However, most existing works have yet fully exploited the potential of gradient-free optimization under the scenario of few-shot learning. In this paper, we describe BBT-RGB, a suite of straightforward and complementary techniques for enhancing the efficiency and performance of black-box optimization. Specifically, our method includes three plug-and-play components: (1) Two-stage derivative-free optimization strategy that facilitates fast convergence and mitigates overfitting; (2) Automatic verbalizer construction with its novel usage under few-shot settings; (3) Better prompt initialization policy based on instruction search and auto-selected demonstration. Extensive experiments across various tasks on natural language understanding and inference demonstrate the effectiveness of our method. Our codes are publicly available at https://github.com/QiushiSun/BBT-RGB.
翻译:大型语言模型(LLMs)在各种自然语言处理(NLP)任务中展现出日益强大的能力。然而,针对下游任务对这些模型进行调优通常需要高昂的成本,或因商业考虑而不可行。近期,黑盒调优被提出以解决该问题,其通过优化任务特定提示来避免访问梯度和隐含表示。然而,现有工作大多未充分利用少样本学习场景下无梯度优化的潜力。本文提出BBT-RGB,一套简洁且互补的技术套件,旨在提升黑盒优化的效率与性能。具体而言,我们的方法包含三个即插即用组件:(1)两阶段无导数优化策略,可促进快速收敛并缓解过拟合;(2)自动言语化器构建及其在少样本设置下的新颖用法;(3)基于指令搜索与自动选择的示例的更好提示初始化策略。在自然语言理解与推理的各项任务上进行的广泛实验验证了本方法的有效性。我们的代码已公开于 https://github.com/QiushiSun/BBT-RGB。