paper-with-me

Papers

Dynamic layer selection in decoder-only transformers

2024-10-26 · Theodore Glavas, Joud Chataoui, Florence Regol, Wassim Jabbour, Antonios Valkanas, Boris N. Oreshkin, Mark Coates

The vast size of Large Language Models (LLMs) has prompted a search to optimize inference. One effective approach is dynamic inference, which adapts the architecture to the sample-at-hand to reduce the overall computational cost. We empirically examine two common dynamic inference methods for natural language generation (NLG): layer skipping and early exiting. We find that a pre-trained decoder-only model is significantly more robust to layer removal via layer skipping, as opposed to early exit. We demonstrate the difficulty of using hidden state information to adapt computation on a per-token basis for layer skipping. Finally, we show that dynamic computation allocation on a per-sequence basis holds promise for significant efficiency gains by constructing an oracle controller. Remarkably, we find that there exists an allocation which achieves equal performance to the full model using only 23.3% of its layers on average.

📄 PDF Abstract BibTeX arXiv:2410.20022

Code (1)

networkslab/enlsp_neurips24 공식 구현 pytorch

Tasks

DecoderText Generation

Similar Papers 제목 키워드 기반

Theoretical limitations of multi-layer Transformer

2024-12-04 · Lijie Chen, Binghui Peng, Hongxun Wu

Transformers, especially the decoder-only variants, are the backbone of most modern large language models; yet we do not have much understanding of their expressive power except for the simple $1$-layer case. Due to the …

Decoder

Exploring vision transformer layer choosing for semantic segmentation

2023-05-02 · Fangjian Lin, Yizhe Ma, Shengwei Tian

Extensive work has demonstrated the effectiveness of Vision Transformers. The plain Vision Transformer tends to obtain multi-scale features by selecting fixed layers, or the last layer of features aiming to achieve highe…

Decoderfeature selectionSemantic Segmentation

Subjective Depth and Timescale Transformers: Learning Where and When to Compute

2025-11-26 · Frederico Wieser, Martin Benfeghoul, Haitham Bou Ammar, Jun Wang 외 arxiv

The rigid, uniform allocation of computation in standard Transformer (TF) architectures can limit their efficiency and scalability, particularly for large-scale models and long sequences. Addressing this, we introduce Su…

Balancing Cost and Benefit with Tied-Multi Transformers

2020-02-20 · WS 2020 7 · Raj Dabre, Raphael Rubino, Atsushi Fujita

We propose and evaluate a novel procedure for training multiple Transformers with tied parameters which compresses multiple models into one enabling the dynamic choice of the number of encoder and decoder layers during d…

DecoderKnowledge DistillationMachine TranslationModel Compression+1

DecoderLens: Layerwise Interpretation of Encoder-Decoder Transformers

2023-10-05 · Anna Langedijk, Hosein Mohebbi, Gabriele Sarti, Willem Zuidema 외

In recent years, many interpretability methods have been proposed to help interpret the internal states of Transformer-models, at different levels of precision and complexity. Here, to analyze encoder-decoder Transformer…

DecoderLogical ReasoningMachine TranslationQuestion Answering+2