arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1909.06091cs.CLcs.LG
收藏

4位精度及以上的神经机器翻译

Neural Machine Translation with 4-Bit Precision and Beyond

University of Edinburgh(爱丁堡大学)

Alham Fikri Aji, Kenneth Heafield

摘要:

神经机器翻译(NMT)是资源密集型的。我们设计了一个量化过程,以压缩NMT模型更好地为有限的硬件能力的设备。由于大多数神经网络参数接近于零,我们采用对数量化代替定点量化。然而,我们发现偏置项不太适合对数量化,但注意到它们只占模型的一小部分,因此我们将其保留为未压缩。我们还建议在重新训练过程中使用错误反馈机制,以将压缩模型作为陈旧梯度保留。我们的经验表明,基于Transformer或RNN架构的NMT模型可以压缩到4位精度,而不会出现任何明显的质量下降。模型可以被压缩到二进制精度,尽管质量较低。与Transformer相比,RNN架构似乎对量化更鲁棒。

英文摘要:

Neural Machine Translation (NMT) is resource intensive. We design a quantization procedure to compress NMT models better for devices with limited hardware capability. Because most neural network parameters are near zero, we employ logarithmic quantization in lieu of fixed-point quantization. However, we find bias terms are less amenable to log quantization but note they comprise a tiny fraction of the model, so we leave them uncompressed. We also propose to use an error-feedback mechanism during retraining, to preserve the compressed model as a stale gradient. We empirically show that NMT models based on Transformer or RNN architecture can be compressed up to 4-bit precision without any noticeable quality degradation. Models can be compressed up to binary precision, albeit with lower quality. The RNN architecture seems to be more robust to quantization, compared to the Transformer.

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

↑