通过特征对齐提升小模型性能,实现大模型高效压缩。
Feature Alignment-Based Knowledge Distillation for Efficient Compression of Large Language Models
- 用多层特征与注意力对齐,传递教师模型语义能力。
- 在GLUE等任务上接近GPT-4表现,优于DeBERTa等基线。
- 适合部署资源受限场景,如移动端或边缘设备。
本研究提出一种基于特征对齐的大语言模型知识蒸馏算法,旨在将大预训练模型的知识有效迁移至轻量级学生模型,降低计算成本同时保持高模型性能。不同于传统软标签蒸馏方法,该方法引入多层特征对齐策略,深度对齐教师模型与学生模型的中间特征及注意力机制,最大程度保留教师模型的语义表达能力和上下文建模能力。在方法设计上,构建包含特征匹配损失、注意力对齐损失和输出分布匹配损失的多任务损失函数,通过联合优化实现多层次信息传递。在GLUE数据集及多种自然语言处理任务上进行综合评估,结果表明所提模型在困惑度、BLEU、ROUGE、CER等指标上表现接近当前最先进的GPT-4模型,显著优于DeBERTa、XLNet、GPT-3等基线模型,展现出显著的性能提升与计算效率优势。研究结果表明,特征对齐蒸馏策略是一种有效的模型压缩方法,可在大幅降低计算开销和存储需求的同时维持模型能力。未来可拓展至自监督学习、跨模态特征对齐与多任务迁移学习方向,为深度学习模型的部署与优化提供更灵活高效的解决方案。
原文摘要 · Abstract (English)
This study proposes a knowledge distillation algorithm based on large language models and feature alignment, aiming to effectively transfer the knowledge of large pre-trained models into lightweight student models, thereby reducing computational costs while maintaining high model performance. Different from the traditional soft label distillation method, this method introduces a multi-layer feature alignment strategy to deeply align the intermediate features and attention mechanisms of the teacher model and the student model, maximally retaining the semantic expression ability and context modeling ability of the teacher model. In terms of method design, a multi-task loss function is constructed, including feature matching loss, attention alignment loss, and output distribution matching loss, to ensure multi-level information transfer through joint optimization. The experiments were comprehensively evaluated on the GLUE data set and various natural language processing tasks. The results show that the proposed model performs very close to the state-of-the-art GPT-4 model in terms of evaluation indicators such as perplexity, BLEU, ROUGE, and CER. At the same time, it far exceeds baseline models such as DeBERTa, XLNet, and GPT-3, showing significant performance improvements and computing efficiency advantages. Research results show that the feature alignment distillation strategy is an effective model compression method that can significantly reduce computational overhead and storage requirements while maintaining model capabilities. Future research can be further expanded in the directions of self-supervised learning, cross-modal feature alignment, and multi-task transfer learning to provide more flexible and efficient solutions for the deployment and optimization of deep learning models.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。