English
Related papers

Related papers: Transformer tricks: Precomputing the first layer

200 papers

The remarkable capabilities of Large Language Models (LLMs) are overshadowed by their immense computational cost. While recent work has shown that many LLM layers can be reordered or even removed with minimal impact on accuracy, these…

Machine Learning · Computer Science 2026-01-07 Ramón Calvo González , Daniele Paliotta , Matteo Pagliardini , Martin Jaggi , François Fleuret

State of the art sequence-to-sequence models for large scale tasks perform a fixed number of computations for each input sequence regardless of whether it is easy or hard to process. In this paper, we train Transformer models which can make…

Computation and Language · Computer Science 2020-02-18 Maha Elbayad , Jiatao Gu , Edouard Grave , Michael Auli

We introduce ReplaceMe, a generalized training-free depth pruning method that effectively replaces transformer blocks with a linear operation, while maintaining high performance for low compression ratios. In contrast to conventional…

Computation and Language · Computer Science 2026-02-20 Dmitriy Shopkhoev , Ammar Ali , Magauiya Zhussip , Valentin Malykh , Stamatios Lefkimmiatis , Nikos Komodakis , Sergey Zagoruyko

Data Prefetching is a technique that can hide memory latency by fetching data before it is needed by a program. Prefetching relies on accurate memory access prediction, to which task machine learning based methods are increasingly applied.…

Hardware Architecture · Computer Science 2022-05-31 Pengmiao Zhang , Ajitesh Srivastava , Anant V. Nori , Rajgopal Kannan , Viktor K. Prasanna

Transformer plays a vital role in the realms of natural language processing (NLP) and computer vision (CV), specially for constructing large language models (LLM) and large vision models (LVM). Model compression methods reduce the memory…

Machine Learning · Computer Science 2024-04-09 Yehui Tang , Yunhe Wang , Jianyuan Guo , Zhijun Tu , Kai Han , Hailin Hu , Dacheng Tao

The Transformer is an extremely powerful and prominent deep learning architecture. In this work, we challenge the commonly held belief in deep learning that going deeper is better, and show an alternative design approach that is building…

Machine Learning · Computer Science 2022-11-10 Jason Ross Brown , Yiren Zhao , Ilia Shumailov , Robert D Mullins

Transformers suffer from the computational overhead of their quadratic dependence on the length of sequences processed. We present three methods, all adding an intermediate step between training and inference/generation, which extend the…

Machine Learning · Computer Science 2024-08-21 R. I. Cukier

Large language models have steadily increased in size to achieve improved performance; however, this growth has also led to greater inference time and computational demands. Consequently, there is rising interest in model size reduction…

The computational complexity of the self-attention mechanism in popular transformer architectures poses significant challenges for training and inference, and becomes the bottleneck for long inputs. Is it possible to significantly reduce…

Machine Learning · Computer Science 2024-10-16 Yingyu Liang , Zhizhou Sha , Zhenmei Shi , Zhao Song , Yufa Zhou

Pruning is an effective way to reduce the huge inference cost of Transformer models. However, prior work on pruning Transformers requires retraining the models. This can add high training cost and high complexity to model deployment, making…

Computation and Language · Computer Science 2022-10-18 Woosuk Kwon , Sehoon Kim , Michael W. Mahoney , Joseph Hassoun , Kurt Keutzer , Amir Gholami

Self-supervised speech representation models, particularly those leveraging transformer architectures, have demonstrated remarkable performance across various tasks such as speech recognition, speaker identification, and emotion detection.…

Audio and Speech Processing · Electrical Eng. & Systems 2025-01-20 Teresa Dorszewski , Albert Kjøller Jacobsen , Lenka Tětková , Lars Kai Hansen

This study investigates transformer model compression by systematically pruning its layers. We evaluated 14 pruning strategies across nine diverse datasets, including 12 strategies based on different signals obtained from layer activations,…

Machine Learning · Computer Science 2025-01-08 Md Shoaibur Rahman

Despite their dominance in modern DL and, especially, NLP domains, transformer architectures exhibit sub-optimal performance on long-range tasks compared to recent layers that are specifically designed for this purpose. In this work,…

Machine Learning · Computer Science 2023-11-29 Itamar Zimerman , Lior Wolf

Pre-training has marked numerous state of the arts in high-level computer vision, while few attempts have ever been made to investigate how pre-training acts in image processing systems. In this paper, we tailor transformer-based…

Computer Vision and Pattern Recognition · Computer Science 2022-03-22 Wenbo Li , Xin Lu , Shengju Qian , Jiangbo Lu , Xiangyu Zhang , Jiaya Jia

Multilayer transformer networks consist of interleaved self-attention and feedforward sublayers. Could ordering the sublayers in a different pattern lead to better performance? We generate randomly ordered transformers and train them with…

Computation and Language · Computer Science 2020-04-24 Ofir Press , Noah A. Smith , Omer Levy

Large language models (LLMs) have recently emerged as powerful tools for tackling many language-processing tasks. Despite their success, training and fine-tuning these models is still far too computationally and memory intensive. In this…

Computer Vision and Pattern Recognition · Computer Science 2024-10-22 Roy Miles , Pradyumna Reddy , Ismail Elezi , Jiankang Deng

We present a new training methodology for transformers using a multilevel, layer-parallel approach. Through a neural ODE formulation of transformers, our application of a multilevel parallel-in-time algorithm for the forward and…

Machine Learning · Computer Science 2026-01-27 Shuai Jiang , Marc Salvadó-Benasco , Eric C. Cyr , Alena Kopaničáková , Rolf Krause , Jacob B. Schroder

Algorithmic reasoning requires capabilities which are most naturally understood through recurrent models of computation, like the Turing machine. However, Transformer models, while lacking recurrence, are able to perform such reasoning…

Machine Learning · Computer Science 2023-05-03 Bingbin Liu , Jordan T. Ash , Surbhi Goel , Akshay Krishnamurthy , Cyril Zhang

Transformers are widely applied to solve natural language understanding and computer vision tasks. While scaling up these architectures leads to improved performance, it often comes at the expense of much higher computational costs. In…

Computer Vision and Pattern Recognition · Computer Science 2022-02-25 Cedric Renggli , André Susano Pinto , Neil Houlsby , Basil Mustafa , Joan Puigcerver , Carlos Riquelme

Despite the popularity of transformers in practice, their architectures are empirically designed and neither mathematically justified nor interpretable. Moreover, as indicated by many empirical studies, some components of transformer…

Machine Learning · Computer Science 2025-06-05 Peng Wang , Yifu Lu , Yaodong Yu , Druv Pai , Qing Qu , Yi Ma