arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.20202cs.AI
收藏

一个 QuantLLM 适用于所有:一次微调量化 LLMs 以实现高效部署

One QuantLLM for ALL: Fine-tuning Quantized LLMs Once for Efficient Deployments

South China University of Technology(华南理工大学);The Hong Kong University of Science and Technology(香港科技大学);Salesforce AI Research(Salesforce AI研究院);Tsinghua University(清华大学)

Ke Yi, Yuhui Xu, Heng Chang, Chen Tang, Yuan Meng, Tong Zhang, Jia Li

AI总结:

针对LLM量化部署需重复训练的问题,提出OFA框架通过解耦权重和引入低秩适配器,一次性训练生成多场景最优子网络,在LLaMA2上验证可保持高性能并显著减少部署时间。

摘要:

大型语言模型(LLMs)发展迅速,但面临显著的内存需求。虽然量化在 LLMs 上展现出潜力,但当前方法通常需要漫长的训练来缓解量化损失带来的性能下降。然而,在不同资源约束的多样化场景(如服务器和个人电脑)中部署 LLMs,需要为每个应用重复训练,这加剧了漫长的训练问题。鉴于此,训练一个一次训练适用于所有(OFA)的超级网络(supernet)是有利的,它能够通过一次性训练为下游应用产生多样化的最优子网络。然而,当前语言模型的规模阻碍了效率,并加剧了子网络间权重共享带来的干扰。我们进行了将 once-for-all 框架扩展到大型语言模型的初步尝试。具体而言,我们解耦共享权重以消除干扰,并引入 Low-Rank adapters 以提高训练效率。此外,我们观察到传统均匀采样导致训练资源分配不均。我们引入了一个非参数调度器来调整每种量化配置的采样率,从而在不同需求的子网络之间实现更均衡的分配。我们在 LLaMA2 系列上验证了该方法,下游评估证实了我们在面临多场景时能够保持高性能,同时显著减少部署时间。

英文摘要:

Large Language Models (LLMs) have advanced rapidly but face significant memory demands. While quantization has shown promise for LLMs, current methods typically require lengthy training to alleviate the performance degradation from quantization loss. However, deploying LLMs across diverse scenarios with different resource constraints, e.g., servers and personal computers, requires repeated training per application, which amplifies the lengthy training problem. Given that, it is advantageous to train a once-for-all (OFA) supernet capable of yielding diverse optimal subnets for downstream applications through one-shot training. Nonetheless, the scale of current language models impedes efficiency and amplifies interference from weight sharing between subnets. We make an initial attempt to extend the once-for-all framework to large language models. Specifically, we decouple shared weights to eliminate the interference and incorporate Low-Rank adapters for training efficiency. Furthermore, we observe the imbalance allocation of training resources from the traditional uniform sampling. A non-parametric scheduler is introduced to adjust the sampling rate for each quantization configuration, achieving a more balanced allocation among subnets with varying demands. We validate the approach on LLaMA2 families, and downstream evaluation confirms our ability to maintain high performance while significantly reducing deployment time faced with multiple scenarios.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑