English
Related papers

Related papers: Transformer tricks: Precomputing the first layer

200 papers

Model editing techniques modify a minor proportion of knowledge in Large Language Models (LLMs) at a relatively low cost, which have demonstrated notable success. Existing methods assume Transformer Layer (TL) hidden states are values of…

Computation and Language · Computer Science 2024-03-12 Xiaopeng Li , Shasha Li , Shezheng Song , Jing Yang , Jun Ma , Jie Yu

Large Language Models (LLMs) have achieved remarkable performance across a wide variety of natural language tasks; however, their large size makes their inference slow and computationally expensive. Focusing on this problem, we propose to…

Computation and Language · Computer Science 2023-11-08 Neeraj Varshney , Agneet Chatterjee , Mihir Parmar , Chitta Baral

Since hardware resources are limited, the objective of training deep learning models is typically to maximize accuracy subject to the time and memory constraints of training and inference. We study the impact of model size in this setting,…

Computation and Language · Computer Science 2020-06-24 Zhuohan Li , Eric Wallace , Sheng Shen , Kevin Lin , Kurt Keutzer , Dan Klein , Joseph E. Gonzalez

Sparse models, including sparse Mixture-of-Experts (MoE) models, have emerged as an effective approach for scaling Transformer models. However, they often suffer from computational inefficiency since a significant number of parameters are…

Machine Learning · Computer Science 2024-05-27 Yuanhang Yang , Shiyi Qi , Wenchao Gu , Chaozheng Wang , Cuiyun Gao , Zenglin Xu

The transformer architecture has prevailed in various deep learning settings due to its exceptional capabilities to select and compose structural information. Motivated by these capabilities, Sanford et al. proposed the sparse token…

Machine Learning · Statistics 2024-06-12 Zixuan Wang , Stanley Wei , Daniel Hsu , Jason D. Lee

Recently, diffusion transformers have gained wide attention with its excellent performance in text-to-image and text-to-vidoe models, emphasizing the need for transformers as backbone for diffusion models. Transformer-based models have…

Computer Vision and Pattern Recognition · Computer Science 2024-04-16 Nithin Gopalakrishnan Nair , Jeya Maria Jose Valanarasu , Vishal M. Patel

Large Language Models (LLMs) typically come with a fixed architecture, despite growing evidence that not all layers contribute equally to every downstream task. We introduce TALE (Task-Aware Layer Elimination), an inference-time method that…

Machine Learning · Computer Science 2026-05-12 Omar Naim , Krish Sharma , Niyar R Barman , Nicholas Asher

Transformer architectures dominate modern NLP but often demand heavy computational resources and intricate hyperparameter tuning. To mitigate these challenges, we propose a novel framework, BoostTransformer, that augments transformers with…

Machine Learning · Computer Science 2025-11-04 Biyi Fang , Truong Vo , Jean Utke , Diego Klabjan

We introduce a constrained optimization framework for training transformers that behave like optimization descent algorithms. Specifically, we enforce layerwise descent constraints on the objective function and replace standard empirical…

Machine Learning · Computer Science 2026-01-27 Javier Porras-Valenzuela , Samar Hadou , Alejandro Ribeiro

Recent works have indicated redundancy across transformer blocks, prompting the research of depth compression to prune less crucial blocks. However, current ways of entire-block pruning suffer from risks of discarding meaningful cues…

Computer Vision and Pattern Recognition · Computer Science 2026-02-10 Ruihan Xu , Qingpei Guo , Yao Zhu , Xiangyang Ji , Ming Yang , Shiliang Zhang

To solve ever more complex problems, Deep Neural Networks are scaled to billions of parameters, leading to huge computational costs. An effective approach to reduce computational requirements and increase efficiency is to prune unnecessary…

Large language models (LLMs) demonstrate strong performance as text embedding models when finetuned with supervised contrastive training. However, their large size balloons inference time and memory requirements. In this paper, we show that…

Computation and Language · Computer Science 2024-10-21 Thennal D K , Tim Fischer , Chris Biemann

Transformer-based large language models have remarkable potential to accelerate design optimization for applications such as drug development and materials discovery. Self-supervised pretraining of transformer models requires large-scale…

Machine Learning · Computer Science 2023-10-27 Pei Zhang , Logan Kearney , Debsindhu Bhowmik , Zachary Fox , Amit K. Naskar , John Gounley

In the low-data regime, it is difficult to train good supervised models from scratch. Instead practitioners turn to pre-trained models, leveraging transfer learning. Ensembling is an empirically and theoretically appealing way to construct…

Machine Learning · Computer Science 2020-10-20 Basil Mustafa , Carlos Riquelme , Joan Puigcerver , André Susano Pinto , Daniel Keysers , Neil Houlsby

Transformers have been successfully applied to sequential, auto-regressive tasks despite being feedforward networks. Unlike recurrent neural networks, Transformers use attention to capture temporal relations while processing input tokens in…

Machine Learning · Computer Science 2021-01-26 Angela Fan , Thibaut Lavril , Edouard Grave , Armand Joulin , Sainbayar Sukhbaatar

Autoregressive decoding with generative Large Language Models (LLMs) on accelerators (GPUs/TPUs) is often memory-bound where most of the time is spent on transferring model parameters from high bandwidth memory (HBM) to cache. On the other…

Machine Learning · Computer Science 2024-02-15 Yashas Samaga B L , Varun Yerram , Chong You , Srinadh Bhojanapalli , Sanjiv Kumar , Prateek Jain , Praneeth Netrapalli

Transfer of pre-trained representations can improve sample efficiency and reduce computational requirements for new tasks. However, representations used for transfer are usually generic, and are not tailored to a particular distribution of…

How to reduce compute and memory requirements of neural networks (NNs) without sacrificing performance? Many recent works use sparse Mixtures of Experts (MoEs) to build resource-efficient large language models (LMs). Here we introduce…

Machine Learning · Computer Science 2023-11-22 Róbert Csordás , Kazuki Irie , Jürgen Schmidhuber

While scaling Transformer-based large language models (LLMs) has demonstrated promising performance across various tasks, it also introduces redundant architectures, posing efficiency challenges for real-world deployment. Despite some…

Machine Learning · Computer Science 2024-10-18 Shwai He , Guoheng Sun , Zheyu Shen , Ang Li

With the increasing demands for privacy protection, many privacy-preserving machine learning systems were proposed in recent years. However, most of them cannot be put into production due to their slow training and inference speed caused by…

Cryptography and Security · Computer Science 2020-08-19 Fei Zheng