TensorX
返回文献探索

Paper · arXiv 2407.09298

Transformer Layers as Painters

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

15 upvotesJuly 12, 2024arXiv 预印本
AI 摘要

Empirical studies on frozen transformers reveal differences between lower/final and middle layers and suggest that these models can maintain robustness and trade accuracy for latency by skipping or rearranging layers.

transformersfrozen modelslower layersfinal layersmiddle layersskipping layersparallel layers

Abstract

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.

北京市昌平区探索星信息技术及软件开发工作室

京ICP备2026059466号
Transformer Layers as Painters | TensorX