arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.12200cs.CLcs.LG
收藏

APT:用于高效训练和推理的预训练语言模型自适应剪枝与微调

APT: Adaptive Pruning and Tuning Pretrained Language Models for Efficient Training and Inference

University of Washington(华盛顿大学);Allen Institute for Artificial Intelligence(艾伦人工智能研究所);Apple(苹果公司)

Bowen Zhao, Hannaneh Hajishirzi, Qingqing Cao

AI总结:

本文提出APT框架,通过在微调早期动态添加显著微调参数并丢弃不重要参数,同时提升大型语言模型的训练和推理效率,在大幅减少参数和内存占用的同时保持高任务性能。

摘要:

大型语言模型(LM)的微调和推理通常被认为是昂贵的。预训练LM上的参数高效微调通过更新少量LM参数来减少训练内存,但并未提高推理效率。结构化剪枝通过移除一致的参数块来提高LM推理效率,但通常会增加训练内存和时间。为了同时提高训练和推理效率,我们引入了APT,它自适应地对LM的参数进行剪枝和微调。在微调的早期阶段,APT动态添加显著的微调参数以实现快速准确的收敛,同时丢弃不重要的参数以提高效率。与基线相比,我们的实验表明,在剪枝RoBERTa和T5模型并保留40%参数时,APT维持了高达98%的任务性能;在保留70%参数时,保持了86.4%的LLaMA模型性能。此外,APT将LM微调速度最高提升了8倍,并将大型LM的训练内存占用最高减少了70%。

英文摘要:

Fine-tuning and inference with large Language Models (LM) are generally known to be expensive. Parameter-efficient fine-tuning over pretrained LMs reduces training memory by updating a small number of LM parameters but does not improve inference efficiency. Structured pruning improves LM inference efficiency by removing consistent parameter blocks, yet often increases training memory and time. To improve both training and inference efficiency, we introduce APT that adaptively prunes and tunes parameters for the LMs. At the early stage of fine-tuning, APT dynamically adds salient tuning parameters for fast and accurate convergence while discarding unimportant parameters for efficiency. Compared to baselines, our experiments show that APT maintains up to 98% task performance when pruning RoBERTa and T5 models with 40% parameters left while keeping 86.4% LLaMA models' performance with 70% parameters remained. Furthermore, APT speeds up LMs fine-tuning by up to 8x and reduces large LMs memory training footprint by up to 70%.

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

↑