arXiv:2508.01506cs.LGcs.AI2025-08AAAI被引 15

提出FlashSVD,让低秩大模型推理内存减少70%,适合设备端部署。

FlashSVD: Memory-Efficient Inference with Streaming for Low-Rank Models

  • 将低秩投影融合进注意力和前馈网络,实时计算不存中间激活
  • 在BERT-Base上峰值激活内存降低70.2%,瞬时内存降75%
  • 无需额外延迟,可无缝集成现有低秩压缩模型,适合移动端

奇异值分解(SVD)近年来被广泛用于大语言模型压缩,实现20%-80%参数减少且精度损失极小。然而,现有SVD方法仅关注权重内存压缩,忽略了推理时通过标准密集CUDA内核应用截断因子带来的激活内存开销。实验表明,该激活开销随序列长度和隐藏维度增长,导致当前SVD压缩技术无法降低峰值推理内存,限制其在真实设备上的部署。本文提出FlashSVD,一种面向SVD压缩大模型的端到端、秩感知流式推理框架。通过将低秩投影核直接融合进自注意力与前馈网络管道,避免生成全尺寸激活缓冲区。截断因子的小块分批加载到片上SRAM,即时计算并立即释放,保持高GPU利用率且无额外延迟。在标准编码器基准(如BERT-Base)上,FlashSVD将峰值激活内存减少高达70.2%,瞬时中间内存减少75%,同时不损失精度,为低秩大模型在内存受限场景下的实用部署提供了可行路径。

原文摘要 · Abstract (English)

Singular Value Decomposition (SVD) has recently seen a surge of interest as a simple yet powerful tool for large language models (LLMs) compression, with a growing number of works demonstrating 20-80% parameter reductions at minimal accuracy loss. Previous SVD-based approaches have focused primarily on reducing the memory footprint of model weights, largely overlooking the additional activation memory overhead incurred during inference when applying truncated factors via standard dense CUDA kernels. Our experiments demonstrate that this activation overhead, scaling with sequence length and hidden dimension, prevents current SVD compression techniques from achieving any reduction in peak inference memory, thereby limiting their viability for real-world, on-device deployments. We introduce FlashSVD, a novel, end-to-end rank-aware streaming inference framework specifically designed for SVD-compressed large language models. FlashSVD can be seamlessly integrated with any model that employs SVD-based methods for parameter reduction. By fusing low-rank projection kernels directly into both the self-attention and feed-forward network (FFN) pipelines, FlashSVD avoid materializing full-size activation buffers. Instead, small tiles of the truncated factors are loaded into on-chip SRAM, multiplied and reduced on the fly, and immediately evicted, preserving high GPU occupancy and adding no extra latency. On standard encoder benchmarks (e.g., BERT-Base), FlashSVD cuts peak activation memory by up to 70.2% and intermediate transient memory by 75%, all while incur no accuracy loss with upstreaming compression methods, offering a practical path toward memory-constrained deployment of low-rank LLMs.

大模型压缩内存优化低秩推理加速

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。