Structured pruning methods have proven effective in reducing the model size and accelerating inference speed in various network architectures such as Transformers. Despite the versatility of encoder-decoder models in numerous NLP tasks, the structured pruning methods on such models are relatively less explored compared to encoder-only models. In this study, we investigate the behavior of the structured pruning of the encoder-decoder models in the decoupled pruning perspective of the encoder and decoder component, respectively. Our findings highlight two insights: (1) the number of decoder layers is the dominant factor of inference speed, and (2) low sparsity in the pruned encoder network enhances generation quality. Motivated by these findings, we propose a simple and effective framework, NASH, that narrows the encoder and shortens the decoder networks of encoder-decoder models. Extensive experiments on diverse generation and inference tasks validate the effectiveness of our method in both speedup and output quality.
翻译:结构化剪枝方法已被证实在多种网络架构(如Transformer)中能有效压缩模型规模并加速推理速度。尽管编码器-解码器模型在众多自然语言处理任务中具有通用性,但与仅含编码器的模型相比,针对此类模型的结构化剪枝方法研究相对较少。本研究从编码器组件与解码器组件解耦剪枝的视角,探究了编码器-解码器模型的结构化剪枝行为。研究发现揭示了两个关键点:(1) 解码器层数是影响推理速度的主导因素;(2) 剪枝后的编码器网络保持低稀疏度可提升生成质量。基于上述发现,我们提出了一种简单有效的框架NASH,该框架通过缩窄编码器网络并缩短解码器网络来优化编码器-解码器模型。在多样化生成任务与推理任务上的大量实验验证了本方法在加速效果与输出质量两方面的有效性。