让大模型实时自适应新任务,只调权重中的一小部分。
Transformer-Squared: Self-adaptive LLMs
- 通过强化学习训练专家向量,动态混合实现任务自适应。
- 比LoRA少参数、更高效,跨模型和多模态表现稳定。
- 适合需要快速响应新任务的部署场景,如智能客服、机器人。
自适应大语言模型旨在解决传统微调方法计算成本高、应对多样任务能力僵化的问题。我们提出Transformer-Squared,一种新型自适应框架,通过在推理时仅调整权重矩阵中的单一组件,实现实时适应未见任务。该方法采用两阶段机制:首先由调度系统识别任务特征,再将任务特定的‘专家’向量(经强化学习训练)动态混合,生成针对当前输入提示的目标行为。实验表明,该方法在多个基准上持续优于主流方法(如LoRA),参数更少、效率更高。此外,Transformer-Squared展现出对不同大模型架构及多模态任务(包括视觉-语言任务)的良好泛化能力。本工作为提升大模型的可适应性与任务性能提供了可扩展、高效的解决方案,推动真正动态、自组织人工智能系统的发展。
原文摘要 · Abstract (English)
Self-adaptive large language models (LLMs) aim to solve the challenges posed by traditional fine-tuning methods, which are often computationally intensive and static in their ability to handle diverse tasks. We introduce Transformer-Squared, a novel self-adaptation framework that adapts LLMs for unseen tasks in real-time by selectively adjusting only the singular components of their weight matrices. During inference, Transformer-Squared employs a two-pass mechanism: first, a dispatch system identifies the task properties, and then task-specific 'expert' vectors, trained using reinforcement learning, are dynamically mixed to obtain targeted behavior for the incoming prompt. Our method consistently outperforms ubiquitous approaches such as LoRA, with fewer parameters and greater efficiency. Furthermore, Transformer-Squared demonstrates versatility across different LLM architectures and modalities, including vision-language tasks. Transformer-Squared represents a significant leap forward, offering a scalable, efficient solution for enhancing the adaptability and task-specific performance of LLMs, paving the way for truly dynamic, self-organizing AI systems.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。