结构化递归混合器用于大规模并行序列生成
Structured Recurrent Mixers for Massively Parallelized Sequence Generation
AI总结:
本文提出了一种结构化递归混合器架构,能够在训练时实现序列并行表示与推理时的递归表示之间的代数转换,从而在不依赖专用内核或设备特定内存管理的情况下提高训练效率、输入信息容量和推理吞吐量。
摘要:
在过去二十年中,语言建模经历了从主要使用递归架构(在训练和推理过程中按顺序处理标记)到非递归模型(在训练过程中并行处理序列元素)的转变,后者在训练效率和稳定性方面有所提升,但以较低的推理吞吐量为代价。本文介绍了一种结构化递归混合器(SRM)架构,该架构能够在训练时实现序列并行表示与推理时的递归表示之间的代数转换,尤其不需要专用内核或设备特定的内存管理。我们通过实验表明,这种双表示方法相比其他线性复杂度模型,在训练效率、输入信息容量和推理吞吐量及并发性方面具有优势。我们推测递归模型对于信息丰富的输入(如语言)在扩展序列长度方面并不理想,但因其每个样本的常数内存需求,适合在样本(批量)维度上扩展。我们提供了Mojo/MAX推理实现的SRM,其吞吐量和并发性分别比同样强大的Transformer在vLLM上的推理提高了12倍和170倍,这些增益特征与PyTorch实现导致的GSM8k Pass@k计算常数增加30%。最后,我们证明SRM是有效的强化学习训练候选。
英文摘要:
Over the last two decades, language modeling has experienced a shift from the use of predominantly recurrent architectures that process tokens sequentially during training and inference to non-recurrent models that process sequence elements in parallel during training, which results in greater training efficiency and stability at the expense of lower inference throughput. Here we introduce the Structured Recurrent Mixer, an architecture that allows for algebraic conversion between a sequence parallel representation at train time and a recurrent representation at inference, notably without the need for specialized kernels or device-specific memory management. We show experimentally that this dual representation allows for greater training efficiency, higher input information capacity, and larger inference throughput and concurrency when compared to other linear complexity models. We postulate that recurrent models are poorly suited to extended sequence length scaling for information-rich inputs typical of language, but are well suited to scaling in the sample (batch) dimension due to their constant memory per sample. We provide Mojo/MAX inference implementations of SRMs exhibiting 12x the throughput and 170x the concurrency of similarly powerful Transformers inferenced on vLLM, increases characteristic of Pytorch implementations resulting in a 30\% increase in compute-constant GSM8k Pass@k. We conclude by demonstrating that SRMs are effective reinforcement learning training candidates.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。