Prompt optimization and fine-tuning are two major approaches to improve the performance of Large Language Models (LLMs). They enhance the capabilities of LLMs from complementary perspectives: the former through explicit natural language, and the latter through implicit parameter updates. However, prior work has typically studied them in isolation, leaving their synergistic potential largely underexplored. To bridge this gap, in this paper, we introduce MetaTuner, a novel framework that jointly integrates prompt optimization and fine-tuning for LLM training. Specifically, we introduce two neural networks to generate prompts and parameters, respectively, while allowing them to share a common bottom encoding layer to enable knowledge sharing. By the guidance of the final supervised signals, our framework is optimized to discover the optimal combinations between the prompts and parameters. Given that prompt learning involves discrete optimization while fine-tuning operates in a continuous parameter space, we design a supervised regularization loss to train our framework effectively. Extensive experiments across diverse benchmarks show that our method consistently outperforms the baselines.
翻译:提示优化与微调是提升大型语言模型性能的两大主要途径。它们从互补的视角增强LLM的能力:前者通过显式的自然语言实现,后者则通过隐式的参数更新达成。然而,先前的研究通常将二者孤立探讨,其协同潜力在很大程度上尚未得到充分探索。为弥合这一差距,本文提出MetaTuner——一个将提示优化与微调联合集成于LLM训练的新型框架。具体而言,我们引入两个神经网络分别生成提示与参数,同时允许它们共享一个共同的底层编码层以实现知识共享。在最终监督信号的引导下,我们的框架通过优化来发现提示与参数之间的最优组合。鉴于提示学习涉及离散优化而微调在连续参数空间中进行,我们设计了一种监督正则化损失以有效训练本框架。在多样化基准测试上的大量实验表明,我们的方法始终优于基线模型。