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/.
翻译:作为融合传统象征性行动和灵活的神经表现的一种语言模式,经常性神经网络语法吸引了科学和工程两方面的极大关注,然而,据知由于分批培训的困难,RNNG更难扩大规模。在本文中,我们建议对RNNG进行有效的分批,因为每次分批的分批都是在多个句子中与加仑并行计算。我们的PyTorrch实施有效地使用了GPU, 并实现了与现有的C++ DyNet实施模式独立自动连接的x6的加速。此外,我们分批的RNNG还加快了推断,并实现了X20-150的加速波束搜索,视波束大小而定。最后,我们根据英国维基百兆维基百兆的大型培训数据和广泛覆盖目标合成评估基准,对照LSTM基准评估了按比例的RNNG的合成性一般表现。我们的RNG实施可以在 https://github.com/aistairc/rng-pytorch/上查阅。