English
Related papers

Related papers: Transformer tricks: Precomputing the first layer

200 papers

Training large transformer models from scratch for a target task requires lots of data and is computationally demanding. The usual practice of transfer learning overcomes this challenge by initializing the model with weights of a pretrained…

The remarkable capability of Transformers to do reasoning and few-shot learning, without any fine-tuning, is widely conjectured to stem from their ability to implicitly simulate a multi-step algorithms -- such as gradient descent -- with…

Machine Learning · Computer Science 2024-10-14 Khashayar Gatmiry , Nikunj Saunshi , Sashank J. Reddi , Stefanie Jegelka , Sanjiv Kumar

A method is presented for accelerating inference in transformer language models by exploiting the low effective rank of the token activation manifold at each layer. The method decomposes each activation vector into a subspace component and…

Machine Learning · Computer Science 2026-05-06 Stephen J. Thomas

Transformers, the standard implementation for large language models (LLMs), typically consist of tens to hundreds of discrete layers. While more layers can lead to better performance, this approach has been challenged as far from efficient,…

Machine Learning · Computer Science 2025-05-21 Yen-Chen Wu , Feng-Ting Liao , Meng-Hsi Chen , Pei-Chen Ho , Farhang Nabiei , Da-shan Shiu

With the success of language pretraining, it is highly desirable to develop more efficient architectures of good scalability that can exploit the abundant unlabeled data at a lower cost. To improve the efficiency, we examine the…

Machine Learning · Computer Science 2020-06-08 Zihang Dai , Guokun Lai , Yiming Yang , Quoc V. Le

Large language models (LLMs) achieve state-of-the-art accuracy on complex reasoning tasks by generating multiple chain-of-thought (CoT) traces, but using a fixed token budget per query leads to over-computation on easy inputs and…

Artificial Intelligence · Computer Science 2026-02-03 Katrina Brown , Aneesh Muppidi , Rana Shahout

Understanding how information propagates through Transformer models is a key challenge for interpretability. In this work, we study the effects of minimal token perturbations on the embedding space. In our experiments, we analyze the…

Machine Learning · Computer Science 2025-06-24 Eddie Conti , Alejandro Astruc , Alvaro Parafita , Axel Brando

Diffusion Transformers have recently demonstrated unprecedented generative capabilities for various tasks. The encouraging results, however, come with the cost of slow inference, since each denoising step requires inference on a transformer…

Machine Learning · Computer Science 2024-11-19 Xinyin Ma , Gongfan Fang , Michael Bi Mi , Xinchao Wang

This thesis provides methods and analysis of models which make progress on this goal. The techniques outlined are task agnostic, and should provide benefit when used with nearly any transformer LM. We introduce two new finetuning methods…

Computation and Language · Computer Science 2024-08-30 Davis Yoshida

Though the transformer architectures have shown dominance in many natural language understanding tasks, there are still unsolved issues for the training of transformer models, especially the need for a principled way of warm-up which has…

Computation and Language · Computer Science 2021-06-01 Wei Zhu , Xiaoling Wang , Xipeng Qiu , Yuan Ni , Guotong Xie

Several recent Transformer architectures expose later layers to representations computed in the earliest layers, motivated by the observation that low-level features can become harder to recover as the residual stream is repeatedly…

Machine Learning · Computer Science 2026-05-07 Skye Gunasekaran , Téa Wright , Rui-Jie Zhu , Jason Eshraghian

In order to reduce the computational complexity of large language models, great efforts have been made to to improve the efficiency of transformer models such as linear attention and flash-attention. However, the model size and…

Computation and Language · Computer Science 2026-02-04 Ning Ding , Yehui Tang , Haochen Qin , Zhenli Zhou , Chao Xu , Lin Li , Kai Han , Heng Liao , Yunhe Wang

It is increasingly important to enable privacy-preserving inference for cloud services based on Transformers. Post-quantum cryptographic techniques, e.g., fully homomorphic encryption (FHE), and multi-party computation (MPC), are popular…

Cryptography and Security · Computer Science 2023-03-27 Mengxin Zheng , Qian Lou , Lei Jiang

The Transformer model has achieved state-of-the-art performance in many sequence modeling tasks. However, how to leverage model capacity with large or variable depths is still an open challenge. We present a probabilistic framework to…

Computation and Language · Computer Science 2020-10-19 Xian Li , Asa Cooper Stickland , Yuqing Tang , Xiang Kong

Understanding the inner workings of machine learning models like Transformers is vital for their safe and ethical use. This paper provides a comprehensive analysis of a one-layer Transformer model trained to perform n-digit integer…

Machine Learning · Computer Science 2024-04-25 Philip Quirke , Fazl Barez

The transformer has revolutionized modern AI across language, vision, and beyond. It consists of $L$ layers, each running $H$ attention heads in parallel and feeding the combined output to the subsequent layer. In attention, the input…

Computational Complexity · Computer Science 2026-03-13 Barna Saha , Yinzhan Xu , Christopher Ye , Hantao Yu

Conditional computation is a popular strategy to make Transformers more efficient. Existing methods often target individual modules (e.g., mixture-of-experts layers) or skip layers independently of one another. However, interpretability…

Machine Learning · Computer Science 2025-06-27 Tim Lawson , Laurence Aitchison

The large attention-based encoder-decoder network (Transformer) has become prevailing recently due to its effectiveness. But the high computation complexity of its decoder raises the inefficiency issue. By examining the mathematic…

Computation and Language · Computer Science 2023-05-12 Yanyang Li , Ye Lin , Tong Xiao , Jingbo Zhu

A simple design recipe for deep Transformers is to compose identical building blocks. But standard transformer blocks are far from simple, interweaving attention and MLP sub-blocks with skip connections & normalisation layers in precise…

Machine Learning · Computer Science 2024-06-03 Bobby He , Thomas Hofmann

Masked diffusion models (MDMs) have emerged as a promising alternative to autoregressive models for language modeling, yet the effective design of transformer architectures for MDMs remains underexplored. In this paper, we show that…

Machine Learning · Computer Science 2026-05-26 Sanghyun Lee , Chunsan Hong , Seungryong Kim , Jonghyun Lee , Jongho Park , Dongmin Park