Dual-module Inference for Efficient Recurrent Neural Networks

Liu Liu,Lei Deng,Shuangchen Li,Jingwei Zhang,Yihua Yang,Zhenyu Gu,Yufei Ding,Yuan Xie
2019-01-01
Abstract:Using Recurrent Neural Networks (RNNs) in sequence modeling tasks is promising in delivering high-quality results but challenging to meet stringent latency requirements because of the memory-bound execution pattern of RNNs. We propose a big-little dual-module inference to dynamically skip unnecessary memory access and computation to speedup RNN inference. Leveraging the error-resilient feature of nonlinear activation functions used in RNNs, we propose to use a lightweight little module that approximates the original RNN layer, which is referred to as the big module, to compute activations of the insensitive region that are more error-resilient. The expensive memory access and computation of the big module can be reduced as the results are only used in the sensitive region. Our method can reduce the overall memory access by 40% on average and achieve 1.54 x to 1.75 x speedup on CPU-based server platform with negligible impact on model quality.
What problem does this paper attempt to address?