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

分层注意力编码器-解码器

Hierarchical Attention Encoder Decoder

ETH Zürich(苏黎世联邦理工学院)

Asier Mujika

AI总结:

本文提出基于HRED架构的分层注意力编码器-解码器,通过低频处理、隐式嵌入解释和sampled softmax实现无高频解码器训练,显著降低内存并缩短训练时间。

摘要:

大语言模型的最新进展表明,自回归建模能够生成复杂且新颖的序列,并在许多现实场景中得到应用。然而,这些模型必须以自回归方式生成输出,在处理长序列时会非常耗时。压缩数据的分层自回归方法已被提出作为一种解决方案,但这些方法仍以原始数据频率生成输出,导致模型速度慢且内存消耗大。本文提出一种基于 Hierarchical Recurrent Encoder Decoder(HRED,分层循环编码器-解码器)架构的模型。该模型在没有全局上下文的情况下独立编码输入子序列,使用较低频率的模型处理这些序列,并以原始数据频率解码输出。通过将编码器解释为隐式定义的嵌入矩阵,并使用 sampled softmax 估计,我们开发了一种训练算法,能够在没有高频解码器的情况下训练整个模型,而高频解码器正是分层方法中最耗内存和计算的部分。在最后一个简短阶段,我们训练解码器以原始粒度生成数据。我们的算法显著降低了训练自回归模型的内存需求,并改善了总训练挂钟时间。

英文摘要:

Recent advances in large language models have shown that autoregressive modeling can generate complex and novel sequences that have many real-world applications. However, these models must generate outputs autoregressively, which becomes time-consuming when dealing with long sequences. Hierarchical autoregressive approaches that compress data have been proposed as a solution, but these methods still generate outputs at the original data frequency, resulting in slow and memory-intensive models. In this paper, we propose a model based on the Hierarchical Recurrent Encoder Decoder (HRED) architecture. This model independently encodes input sub-sequences without global context, processes these sequences using a lower-frequency model, and decodes outputs at the original data frequency. By interpreting the encoder as an implicitly defined embedding matrix and using sampled softmax estimation, we develop a training algorithm that can train the entire model without a high-frequency decoder, which is the most memory and compute-intensive part of hierarchical approaches. In a final, brief phase, we train the decoder to generate data at the original granularity. Our algorithm significantly reduces memory requirements for training autoregressive models and it also improves the total training wall-clock time.

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

↑