arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2312.07759cs.LG
收藏

IDKM:通过隐式可微分k-Means实现内存高效的神经网络量化

IDKM: Memory Efficient Neural Network Quantization via Implicit, Differentiable k-Means

Department of Computer Science, UC Santa Bar bara, Santa Barbara;Center for Control, Dynamical Systems

Sean Jaffe, Ambuj K. Singh, Francesco Bullo

AI总结:

针对可微分k-means(DKM)权重量化算法内存占用高的问题,提出隐式可微分k-means(IDKM)及其无雅可比反向传播变体,降低内存与梯度计算复杂度,可在DKM无法训练的硬件上量化Resnet18且性能相当。

摘要:

以最小的性能损失压缩大型神经网络,对于实现其在边缘设备上的部署至关重要。Cho等人(2022)提出了一种权重量化方法,该方法使用一种名为可微分k-means(DKM)的基于注意力的聚类算法。尽管DKM取得了当前最优的结果,但其性能受到高内存依赖的限制。我们提出了一种隐式可微分k-means算法(IDKM),消除了DKM的主要内存限制。设t为k-means迭代次数,m为权重向量数量,b为每个簇地址的比特数,IDKM将单个k-means层的整体内存复杂度从$\boldsymbol{\text{O}}(t \times m \times 2^b)$降低至$\boldsymbol{\text{O}}(m \times 2^b)$。我们还提出了一种变体——带无雅可比反向传播的IDKM(IDKM-JFB),其梯度计算的时间复杂度也与t无关。我们通过实验验证了方法的可行性:在相同设置下,IDKM以更少的计算时间和内存达到了与DKM相当的性能。我们还使用IDKM和IDKM-JFB对大型神经网络Resnet18进行量化,而DKM在该硬件上完全无法训练。

英文摘要:

Compressing large neural networks with minimal performance loss is crucial to enabling their deployment on edge devices. (Cho et al., 2022) proposed a weight quantization method that uses an attention-based clustering algorithm called differentiable $k$-means (DKM). Despite achieving state-of-the-art results, DKM's performance is constrained by its heavy memory dependency. We propose an implicit, differentiable $k$-means algorithm (IDKM), which eliminates the major memory restriction of DKM. Let $t$ be the number of $k$-means iterations, $m$ be the number of weight-vectors, and $b$ be the number of bits per cluster address. IDKM reduces the overall memory complexity of a single $k$-means layer from $\mathcal{O}(t \cdot m \cdot 2^b)$ to $\mathcal{O}( m \cdot 2^b)$. We also introduce a variant, IDKM with Jacobian-Free-Backpropagation (IDKM-JFB), for which the time complexity of the gradient calculation is independent of $t$ as well. We provide a proof of concept of our methods by showing that, under the same settings, IDKM achieves comparable performance to DKM with less compute time and less memory. We also use IDKM and IDKM-JFB to quantize a large neural network, Resnet18, on hardware where DKM cannot train at all.

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

↑