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

Transformer层作为画家

Transformer Layers as Painters

Emergence AI;Sakana AI;Institute of Science Tokyo(东京科学研究院)

Qi Sun, Marc Pickett, Aakash Kumar Nain, Llion Jones

AI总结:

为理解Transformer内部机制,通过对冻结模型的实证研究揭示其低层、最后层与中间层的差异及中间层的一致性,发现部分问题对层跳过、重排序或并行运行具有鲁棒性,为模型优化提供依据。

摘要:

尽管Transformer在大型语言模型中几乎被普遍采用,但其内部工作机制尚未被充分理解。我们旨在更好地理解在预训练Transformer的各层中移除或重组信息的影响。这种理解既可以更好地利用现有模型,也可以通过架构改进产生新变体。我们对冻结模型进行了一系列实证研究,结果表明预训练Transformer的低层和最后层与中间层存在差异,但中间层具有惊人的一致性。我们进一步发现,某些类别的问题对跳过层、以与训练时不同的顺序运行层或并行运行层具有鲁棒性。我们的观察表明,即使是冻结的预训练模型也可以通过跳过层或并行运行层来优雅地权衡准确性和延迟。

英文摘要:

Despite their nearly universal adoption for large language models, the internal workings of transformers are not well understood. We aim to better understand the impact of removing or reorganizing information throughout the layers of a pretrained transformer. Such an understanding could both yield better usage of existing models as well as to make architectural improvements to produce new variants. We present a series of empirical studies on frozen models that show that the lower and final layers of pretrained transformers differ from middle layers, but that middle layers have a surprising amount of uniformity. We further show that some classes of problems have robustness to skipping layers, running the layers in an order different from how they were trained, or running the layers in parallel. Our observations suggest that even frozen pretrained models may gracefully trade accuracy for latency by skipping layers or running layers in parallel.

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

↑