Abstract
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.
Introduction
To maximize the performance of Large Language Models (LLMs), researchers typically employ either Prompt Optimization—refining natural language instructions—or Fine-Tuning—updating internal model weights. Historically, these strategies have been treated as independent domains: prompting as a discrete search problem and fine-tuning as a continuous optimization problem.
However, this separation ignores the deep interdependence between the two. Fine-tuning is highly sensitive to the prompts used during training, and prompts alone cannot address fundamental internal knowledge gaps. MetaTuner addresses this by co-optimizing both natural language prompts and model parameters, unlocking a synergistic potential where instructions and weights evolve together to solve complex tasks.
The MetaTuner Framework
The authors introduce MetaTuner, a dual-branch architecture designed for "co-optimization." The framework consists of three primary components:
- The Meta Encoder: A shared encoder (typically the initial layers of an LLM) processes the input query, ensuring that both prompt and parameter generation are grounded in a unified task understanding.
- Dual Decoders: The meta encoder feeds into two specialized branches: the Prompt Decoder, which generates query-specific, discrete natural language prompts, and the Parameter Decoder, a hyper-network that generates query-specific LoRA (Low-Rank Adaptation) weights.
- Supervised Regularization: To overcome the non-differentiability of discrete text tokens, the framework uses a surrogate loss. A "warm-up" phase identifies high-performing prompts as "expert signals" to train the prompt decoder, while the parameter decoder is trained via standard task rewards.
Key Results
MetaTuner was evaluated on rigorous reasoning benchmarks including MATH, GSM8K, and HotpotQA. It consistently outperformed standalone fine-tuning (SFT, DPO) and standalone prompt optimization (BPO, OPRO) methods across the board.
On the Qwen2.5-7B backbone, MetaTuner achieved 48.67% on MATH, significantly higher than the standard SFT baseline of 41.33% shown in Figure 2. Similarly, it reached 78.92% on GSM8K (compared to 61.41% for SFT). It also surpassed BetterTogether, a leading hybrid baseline, by an average relative improvement of 10.15% on 7B models and 17.08% on 3B models.
Insights and Discussion
- The "Prompt-Weight" Synergy: The research demonstrates that weights and prompts are deeply interdependent. Fine-tuning with sub-optimal prompts can actually degrade performance compared to simple prompt optimization on a frozen model. MetaTuner's co-optimization ensures that the model finds the optimal balance between explicit instruction and implicit knowledge.
- Discrete Regularization: Unlike "soft prompt" methods that use continuous vectors, MetaTuner's use of discrete, human-readable text acts as a form of regularization. This prevents the model from collapsing into nonsensical representations and improves interpretability.
- Efficiency and Scalability: While generating custom parameters for every query adds minor latency (~0.43s), the MetaTuner-C variant mitigates this by clustering similar queries to reuse prompts and parameters. Future work suggests a Mixture of Experts (MoE) approach to route queries to specialized LoRA modules for even greater production scalability.
Conclusion
MetaTuner successfully bridges the gap between prompt engineering and model fine-tuning. By treating prompts and parameters as a unified optimization target, the framework achieves state-of-the-art performance on complex reasoning tasks, proving that the "synergistic potential" of these two approaches is a vital frontier for LLM development.
Summary updated