arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2105.14822cs.CL
收藏

循环神经网络文法的有效批处理

Effective Batching for Recurrent Neural Network Grammars

University of Tokyo(东京大学)

Hiroshi Noji, Yohei Oseki

摘要:

递归神经网络文法(Recurrent Neural Network Grammars,RNNG)作为一种融合了传统符号运算和灵活神经表示的语言模型,受到了科学界和工程界的广泛关注。然而,由于批量训练的困难,RNNG已知更难扩展。在本文中,我们为RNNG提出了有效的计算方法,其中每个操作都是通过跨多个句子的张量并行计算的。我们的PyTorch实现有效地使用了GPU,与现有的具有模型独立自动搜索功能的C++ DyNet实现相比,实现了x6的加速。此外,我们的批量RNNG还加速了推理,并根据波束大小实现了束搜索的x20-150加速。最后,我们基于来自英文维基百科的1亿个令牌的大训练数据和广泛覆盖的有针对性的句法评估基准,评估了缩放RNNG对LSTM基线的句法泛化性能。我们的RNNG实现可在https://github.com/aistairc/rnng-pytorch/上获得。

英文摘要:

As a language model that integrates traditional symbolic operations and flexible neural representations, recurrent neural network grammars (RNNGs) have attracted great attention from both scientific and engineering perspectives. However, RNNGs are known to be harder to scale due to the difficulty of batched training. In this paper, we propose effective batching for RNNGs, where every operation is computed in parallel with tensors across multiple sentences. Our PyTorch implementation effectively employs a GPU and achieves x6 speedup compared to the existing C++ DyNet implementation with model-independent auto-batching. Moreover, our batched RNNG also accelerates inference and achieves x20-150 speedup for beam search depending on beam sizes. Finally, we evaluate syntactic generalization performance of the scaled RNNG against the LSTM baseline, based on the large training data of 100M tokens from English Wikipedia and the broad-coverage targeted syntactic evaluation benchmark. Our RNNG implementation is available at https://github.com/aistairc/rnng-pytorch/.

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

↑