通过稀疏张量分解实现细粒度参数共享,显著压缩Transformer模型且性能损失极小。
Learning Fine-grained Parameter Sharing via Sparse Tensor Decomposition
- 将多层MLP权重拼接后分解为共享基与稀疏投影矩阵,联合优化降低冗余。
- ViT压缩达33%,损失小于1%准确率;结合微调可压缩57%。
- 适用于资源受限设备部署,尤其适合对压缩与精度平衡要求高的场景。
大型神经网络在诸多任务中取得顶尖性能,但其庞大体量限制了在资源受限设备上的部署。现有压缩方法中,跨层参数共享在Transformer模型中仍较少被探索。本文提出细粒度参数共享(FiPS),一种统一的Transformer MLP压缩框架,融合跨块参数共享、低秩分解与稀疏性于单一优化目标。FiPS将一组Transformer块中的MLP权重矩阵拼接,并分解为共享基和稀疏的层特定投影矩阵。两者均通过奇异值分解(SVD)初始化,并通过逐块重构误差最小化联合优化。该方法在ImageNet-1k上使Vision Transformers(ViTs)压缩高达33%,顶-1准确率损失低于1%;结合微调后压缩可达57%。同时,在大型语言模型(LLMs)上压缩达20%,在相同压缩率下优于现有基于SVD的方法,在困惑度与下游任务表现更优。结合量化感知训练(QAT),Gemma-2-2B的3位FiPS实现的困惑度低于2位QAT,且达到8倍压缩。结果表明,细粒度参数共享是高效可行的Transformer MLP压缩方案。
原文摘要 · Abstract (English)
Large neural networks achieve state-of-the-art performance on many tasks, yet their sheer size hinders deployment on resource-constrained devices. Among existing compression approaches, cross-layer parameter sharing remains relatively unexplored for transformer models. In this paper, we introduce Fine-grained Parameter Sharing (FiPS), a unified framework for compressing transformer Multi-Layer Perceptrons (MLPs) that combines cross-block parameter sharing, low-rank factorization, and sparsity in a single optimization. FiPS concatenates MLP weight matrices across a group of transformer blocks and factorizes them into a shared basis and sparse, layer-specific projection matrices. Both factors are initialized via singular value decomposition (SVD) and jointly optimized by block-wise reconstruction error minimization. FiPS compresses Vision Transformers (ViTs) by up to 33% with less than 1% top-1 accuracy loss on ImageNet-1k, and by up to 57% when combined with fine-tuning. It also compresses Large Language Models (LLMs) by up to 20% while outperforming existing SVD-based methods in perplexity and downstream benchmarks at matched compression. Combined with Quantization-Aware Training (QAT), 3-bit FiPS on Gemma-2-2B achieves lower perplexity than 2-bit QAT alone while matching the same 8x compression. These results establish fine-grained parameter sharing as a practical and effective approach for transformer MLP compression.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。