New Hybrid Fine-Tuning Paradigm for LLMs: Algorithm Design and Convergence Analysis Framework
Organizations: Department of Computer Science University of Maryland College Park, MD 20742, USA · Department of Computer Science and Engineering University of Texas Arlington Arlington, TX 76019, USA
Abstract
Fine-tuning Large Language Models (LLMs) typically involves either full fine-tuning, which updates all model parameters, or Parameter-Efficient Fine-Tuning (PEFT), which adjusts a small subset of parameters. However, both approaches have inherent limitations: full fine-tuning is computationally expensive, while PEFT often struggles to learn new knowledge and exhibits suboptimal performance. To overcome these issues, we propose a novel hybrid fine-tuning approach that jointly updates both LLMs and PEFT modules using a combination of zeroth-order and first-order optimization methods. To analyze our new algorithm, we develop a theoretical framework centered on the concept of hybrid smoothness condition, which accounts for the heterogeneous nature of the optimization landscape in joint LLM and PEFT training. We derive a rigorous convergence analysis for the convergence of reshuffling-type SGD algorithm under multiple learning rates and demonstrate its effectiveness through extensive empirical studies across various downstream tasks and model architectures. On the practical side, our results demonstrate consistent performance improvement, making the approach a viable solution for large-scale language model fine-tuning.
Figures & tables
| Pairwise Comparison | First-Order PEFT vs. Hybrid | |||||||||||||
| Model | Task | SST-2 | RTE | WSC | WiC | COPA | WinoG. | Task | SST-2 | RTE | WSC | WiC | COPA | WinoG. |
| Task Type | ——— Classification ——– | — Reasoning — | Task Type | ——— Classification ——– | — Reasoning — | |||||||||
| Llama-2-7b | FO-Prompt | 95.6 | 59.9 | 36.5 | 58.5 | 88.0 | 67.2 | FO-Prompt | 95.6 | 59.9 | 36.5 | 58.5 | 88.0 | 67.2 |
| Hybrid-Prompt | 95.9 | 59.9 | 61.5 | 64.4 | 88.0 | 68.9 | FO-Prefix | 91.1 | 60.6 | 51.9 | 51.7 | 83.0 | 66.2 | |
| FO-Prefix | 91.1 | 60.6 | 51.9 | 51.7 | 83.0 | 66.2 | FO-LoRA | 94.6 | 62.1 | 60.6 | 61.6 | 84.0 | 68.5 | |
| Hybrid-Prefix | 91.6 | 60.6 | 42.3 | 51.5 | 85.0 | 64.3 | Hybrid-Prompt | 95.9 | 59.9 | 61.5 | 64.4 | 88.0 | 68.9 | |
| Optimizer | Theoretical Memory | Asymptotical Memory | Empirical Memory | Consumed GPU |
| FO-SGD (LLM) | 54 GB | A6000 | ||
| ZO-SGD (LLM) | 32 GB | A6000 | ||
| FO-SGD (Prompt) | 46 GB | A6000 | ||
| Hybrid ZO-SGD (LLM+Prompt) | 46 GB | A6000 |
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
| SST2 | Copa | WinoGrande | |||||
| steps | steps | steps | |||||
| Llama-2-7b | ZO-FT | ||||||
| FO-Prompt | / | / | / | ||||
| Hybrid-Prompt | |||||||
| FO-Prefix | / | / | / | ||||
| Hybrid-Prefix | |||||||
Fine-Tuning
Fine-tuning adapts pretrained models to new tasks, domains, and behaviors by updating some or all of their parameters.
See all 250 papers