arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.21766cs.CLcs.AI
收藏

CoFrGeNet:用于语言生成的连分式架构

CoFrGeNet: Continued Fraction Architectures for Language Generation

IBM Research(IBM研究院)

Amit Dhurandhar, Vijil Chenthamarakshan, Dennis Wei, Tejaswini Pedapati, Karthikeyan Natesan Ramamurthy, Rahul Nair

AI总结:

受连分式启发,提出CoFrGeNet架构,用新函数类替换Transformer中的多头注意力和前馈网络,在参数量减少1/2至2/3的情况下,在下游分类、问答、推理和文本理解任务上达到或超越原模型性能。

摘要:

Transformer可以说是语言生成的首选架构。本文受连分式启发,引入了一种用于生成建模的新函数类。实现该函数类的架构族称为CoFrGeNets——连分式生成网络。我们基于该函数类设计了新颖的架构组件,可以替换Transformer块中的多头注意力和前馈网络,同时需要的参数少得多。我们推导了自定义梯度公式,以比使用标准PyTorch梯度更准确、更高效地优化所提出的组件。我们的组件是即插即用的替换,几乎不需要改变已为基于Transformer的模型建立的训练或推理过程,从而使我们的方法易于集成到大型工业工作流中。我们在两个非常不同的Transformer架构GPT2-xl(1.5B)和Llama3(3.2B)上进行了实验,前者我们在OpenWebText和GneissWeb上预训练,后者我们在docling数据混合(包含九个不同数据集)上预训练。结果表明,我们的模型在下游分类、问答、推理和文本理解任务上的性能与原始模型相当,有时甚至更优,而参数量仅为原始模型的2/3到1/2,预训练时间更短。我们相信,未来针对硬件定制的实现将进一步发挥我们架构的真正潜力。

英文摘要:

Transformers are arguably the preferred architecture for language generation. In this paper, inspired by continued fractions, we introduce a new function class for generative modeling. The architecture family implementing this function class is named CoFrGeNets - Continued Fraction Generative Networks. We design novel architectural components based on this function class that can replace Multi-head Attention and Feed-Forward Networks in Transformer blocks while requiring much fewer parameters. We derive custom gradient formulations to optimize the proposed components more accurately and efficiently than using standard PyTorch-based gradients. Our components are a plug-in replacement requiring little change in training or inference procedures that have already been put in place for Transformer-based models thus making our approach easy to incorporate in large industrial workflows. We experiment on two very different transformer architectures GPT2-xl (1.5B) and Llama3 (3.2B), where the former we pre-train on OpenWebText and GneissWeb, while the latter we pre-train on the docling data mix which consists of nine different datasets. Results show that the performance on downstream classification, Q\& A, reasoning and text understanding tasks of our models is competitive and sometimes even superior to the original models with $\frac{2}{3}$ to $\frac{1}{2}$ the parameters and shorter pre-training time. We believe that future implementations customized to hardware will further bring out the true potential of our architectures.

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

↑