AmoebaLLM:构建任意形状的大语言模型以实现高效即时部署
AmoebaLLM: Constructing Any-Shape Large Language Models for Efficient and Instant Deployment
AI总结:
提出AmoebaLLM框架,通过知识保留子网选择、形状感知LoRA混合和就地蒸馏三个组件,实现一次性微调后即时提取任意形状LLM子网,在准确率与效率间达到最优权衡。
摘要:
受大语言模型(LLMs)在各种自然语言任务中变革性能力的推动,在各种实际应用和平台上有效部署这些模型的需求日益增长。然而,由于特定应用性能要求的差异,以及具有不同资源限制和部署流程的计算平台的快速演进,高效部署LLM的挑战变得日益突出。这些不同的要求需要LLM能够调整其结构(深度和宽度),以在不同平台和应用规范间实现最佳效率。为解决这一关键空白,我们提出AmoebaLLM,这是一个新颖的框架,旨在实现LLM任意形状子网的即时推导,这些子网达到准确率-效率前沿,并能在一次性微调后立即提取。通过这种方式,AmoebaLLM显著促进了针对各种平台和应用的快速部署。具体而言,AmoebaLLM集成了三个创新组件:(1)知识保留子网选择策略,采用动态规划方法进行深度收缩,采用重要性驱动方法进行宽度收缩;(2)形状感知的LoRA混合,以缓解微调期间子网间的梯度冲突;(3)以损失幅度平衡为微调目标的就地蒸馏方案。大量实验验证,AmoebaLLM不仅设定了LLM适应性的新标准,还成功交付了在准确率和效率间达到最先进权衡的子网。
英文摘要:
Motivated by the transformative capabilities of large language models (LLMs) across various natural language tasks, there has been a growing demand to deploy these models effectively across diverse real-world applications and platforms. However, the challenge of efficiently deploying LLMs has become increasingly pronounced due to the varying application-specific performance requirements and the rapid evolution of computational platforms, which feature diverse resource constraints and deployment flows. These varying requirements necessitate LLMs that can adapt their structures (depth and width) for optimal efficiency across different platforms and application specifications. To address this critical gap, we propose AmoebaLLM, a novel framework designed to enable the instant derivation of LLM subnets of arbitrary shapes, which achieve the accuracy-efficiency frontier and can be extracted immediately after a one-time fine-tuning. In this way, AmoebaLLM significantly facilitates rapid deployment tailored to various platforms and applications. Specifically, AmoebaLLM integrates three innovative components: (1) a knowledge-preserving subnet selection strategy that features a dynamic-programming approach for depth shrinking and an importance-driven method for width shrinking; (2) a shape-aware mixture of LoRAs to mitigate gradient conflicts among subnets during fine-tuning; and (3) an in-place distillation scheme with loss-magnitude balancing as the fine-tuning objective. Extensive experiments validate that AmoebaLLM not only sets new standards in LLM adaptability but also successfully delivers subnets that achieve state-of-the-art trade-offs between accuracy and efficiency.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。