Reproduce “Black-Box Tuning for Language-Model-as-a-Service” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Tianxiang Sun, Yunfan Shao, Hong Qian, Xuanjing Huang, Xipeng Qiu

The Black-Box Tuning (BBT) framework enables effective adaptation of large language models (LLMs) served as black-box APIs by optimizing continuous prompts without gradient access. This is achieved by performing derivative-free optimization (CMA-ES) within a low-dimensional random subspace, often outperforming gradient-based prompt tuning methods and significantly surpassing other gradient-free approaches on various language understanding tasks.

Key insights

  • Large PTMs can be effectively adapted by optimizing a small number of parameters in a low-dimensional subspace, even without gradient information, due to their intrinsic dimensionality.
  • Derivative-free optimization, specifically CMA-ES, can achieve performance comparable to or better than gradient-based methods for prompt tuning in black-box scenarios.
  • Cross-entropy and hinge loss functions provide more informative feedback for derivative-free optimization in few-shot learning compared to negative accuracy, leading to better performance.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.