错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Neural network quantization: separate scaling of rows and columns in weight matrix

  • Xingyu Wang,
  • Yunhe Hu,
  • Zhouwang Yang

摘要

Quantization methods for neural networks use low-precision fixed-point representations of weight matrices and activation vectors to reduce memory requirements and increase inference speed. However, this reduction in the precision of the numerical representation also leads to a reduction in prediction accuracy. Existing methods aim to mitigate this effect either by approximating the fixed-point representation to the original values or by directly training the quantized network parameters. In this study, we propose a novel approach that involves separately scaling each row and column of the weight matrix before quantization. By considering the error distribution assumptions, we derive the expected error and develop an algorithm to determine the scaling ratio that minimizes this error. This approach effectively reduces the degradation of prediction accuracy in quantized networks. Furthermore, our method is applicable to various commonly used network structures and demonstrates strong performance.