拖放式大型語言模型:零樣本提示到權重轉換
Drag-and-Drop LLMs: Zero-Shot Prompt-to-Weights
June 19, 2025
作者: Zhiyuan Liang, Dongwen Tang, Yuhao Zhou, Xuanlei Zhao, Mingjia Shi, Wangbo Zhao, Zekai Li, Peihao Wang, Konstantin Schürholt, Damian Borth, Michael M. Bronstein, Yang You, Zhangyang Wang, Kai Wang
cs.AI
摘要
現代參數高效微調(PEFT)方法,如低秩適應(LoRA),降低了定制大型語言模型(LLMs)的成本,但仍需針對每個下游數據集進行單獨的優化運行。我們引入了拖放式LLMs(\textit{DnD}),這是一種提示條件參數生成器,通過將少量未標記的任務提示直接映射到LoRA權重更新,從而消除了每任務訓練的需求。一個輕量級文本編碼器將每個提示批次蒸餾成條件嵌入,然後通過級聯的超卷積解碼器轉換為完整的LoRA矩陣集。一旦在多樣化的提示-檢查點對集合中進行訓練,DnD能在幾秒內生成任務特定參數,實現:i) 相比全微調降低高達12,000倍的成本,ii) 在未見的常識推理、數學、編碼和多模態基準測試中,平均性能提升高達30%,iii) 儘管從未見過目標數據或標籤,仍能實現穩健的跨域泛化。我們的結果表明,提示條件參數生成是基於梯度適應快速專用化LLMs的可行替代方案。我們的項目可在https://jerryliang24.github.io/DnD{https://jerryliang24.github.io/DnD}查看。
English
Modern Parameter-Efficient Fine-Tuning (PEFT) methods such as low-rank
adaptation (LoRA) reduce the cost of customizing large language models (LLMs),
yet still require a separate optimization run for every downstream dataset. We
introduce Drag-and-Drop LLMs (\textit{DnD)}, a prompt-conditioned
parameter generator that eliminates per-task training by mapping a handful of
unlabeled task prompts directly to LoRA weight updates. A lightweight text
encoder distills each prompt batch into condition embeddings, which are then
transformed by a cascaded hyper-convolutional decoder into the full set of LoRA
matrices. Once trained in a diverse collection of prompt-checkpoint pairs, DnD
produces task-specific parameters in seconds, yielding i) up to
12,000times lower overhead than full fine-tuning, ii) average gains
up to 30\% in performance over the strongest training LoRAs on unseen
common-sense reasoning, math, coding, and multimodal benchmarks, and iii)
robust cross-domain generalization despite never seeing the target data or
labels. Our results demonstrate that prompt-conditioned parameter generation is
a viable alternative to gradient-based adaptation for rapidly specializing
LLMs. Our project is available at
https://jerryliang24.github.io/DnD{https://jerryliang24.github.io/DnD}.