神经网络加权Quantization:目标无再训练三元组(TNT)
Neural Networks Weights Quantization: Target None-retraining Ternary (TNT)
摘要:
深度神经网络(DNN)的权重量化已被证明是在边缘设备(如移动设备、ASIC和FPGA)上实现DNN的有效解决方案,因为它们没有足够的资源来支持涉及数百万个高精度权重和乘法累加运算的计算。本文提出了一种新的方法来压缩DNN的高精度权重向量到三进制向量,即基于余弦相似性的目标非训练三进制(TNT)压缩方法。我们的方法利用余弦相似性而不是文献中常用的欧氏距离,并成功地减少了搜索空间的大小,以找到从3N到N的最佳三元向量,其中N是目标向量的维数。因此,TNT寻找理论上最优的三元向量的计算复杂性仅为O(N log(N))。此外,我们的实验表明,当我们用高精度参数对DNN模型进行三值化时,所获得的量化模型可以表现出足够高的精度,因此不需要重新训练模型。
英文摘要:
Quantization of weights of deep neural networks (DNN) has proven to be an effective solution for the purpose of implementing DNNs on edge devices such as mobiles, ASICs and FPGAs, because they have no sufficient resources to support computation involving millions of high precision weights and multiply-accumulate operations. This paper proposes a novel method to compress vectors of high precision weights of DNNs to ternary vectors, namely a cosine similarity based target non-retraining ternary (TNT) compression method. Our method leverages cosine similarity instead of Euclidean distances as commonly used in the literature and succeeds in reducing the size of the search space to find optimal ternary vectors from 3N to N, where N is the dimension of target vectors. As a result, the computational complexity for TNT to find theoretically optimal ternary vectors is only O(N log(N)). Moreover, our experiments show that, when we ternarize models of DNN with high precision parameters, the obtained quantized models can exhibit sufficiently high accuracy so that re-training models is not necessary.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。