Your Transformer Is Secretly Elastic
Walter Simoncini, Dheeraj Varghese, Gertjan J. Burghouts, Cees G. M. Snoek
University of Amsterdam · TNO
Published October 14, 2026 · on the feed October 15, 2026 · ▲ 5 · arXiv 2610.20588
The abstract
Scaling up transformers has produced models with broad capabilities, deployed across heterogeneous hardware and fluctuating workloads. Yet, model families offer only a few fixed sizes (e.g., S, B, L), forcing users to commit to a model based on hardware and latency constraints. This rigidity is often suboptimal under varying query loads. We introduce a retraining-free method that elastifies pre-trained transformers into a single model that adapts on-the-fly across a continuum of computational budgets. Our key contribution is a differentiable relaxation of the functional unit-ranking problem: unlike prior work, which optimizes a single importance weight per MLP block or attention head, we rank every individual MLP neuron and attention head jointly, on a common scale, by minimizing the model's loss under soft pruning across many sparsity targets, all at once. Across 27 vision and text transformer encoders ranging from 22M to 8B parameters, our method yields smooth degradation up to 60% sparsity and outperforms one-shot baselines under deep pruning. For example, pruning DINOv3 ViT-H+/16 to 50% sparsity removes 427M parameters while reducing ImageNet-1k linear-probing accuracy by only 0.8%, without the need for weight correction or retraining. At 60% sparsity, a pruned AugReg ViT-B/16 model achieves up to 1.80times higher throughput and 1.26times lower single-query latency on an A100 GPU. Elastic models are produced in minutes, with construction time scaling sub-linearly with parameter count.
The Brief
2:41A short podcast summary of the paper. Written and voiced by AI.
Transcript
Your Transformer Is Secretly Elastic. By Walter Simoncini and three others, from the University of Amsterdam and TNO. Published on the fourteenth of October. Its code repository is worked out: about one hundred and forty source files, with a readme and a licence.
Scaled-up transformers now run across heterogeneous hardware and under fluctuating workloads. Yet a model family usually comes in only a few fixed sizes, small, base, large, and users must commit to one based on their hardware and latency constraints. When query loads vary, that rigid choice is often suboptimal. A size chosen for the busy hour is wasteful in the quiet one, and the reverse.
The authors introduce a method that needs no retraining. It elastifies a pre-trained transformer into a single model that adapts on the fly across a continuum of computational budgets. The key contribution is a differentiable relaxation of the problem of ranking functional units. Prior work optimizes one importance weight per MLP block or per attention head. Here, every individual MLP neuron and every attention head is ranked jointly, on a common scale.
The ranking is found by minimizing the model's loss under soft pruning. That is where the differentiable relaxation lives: a ranking is a discrete object, and pruning softly lets it be optimized through the loss. And the loss is minimized across many sparsity targets, all at once, rather than for one target at a time, so a single ranking is fitted to the whole range of budgets together. Because every unit sits on the same scale, a single ranking can be cut at whatever budget is needed.
The method was applied to twenty-seven transformer encoders, for vision and for text, ranging from twenty-two million to eight billion parameters. It degrades smoothly up to sixty percent sparsity, and under deep pruning it outperforms one-shot baselines. One example: pruning DINOv3 ViT-H plus, patch sixteen, to fifty percent sparsity removes four hundred and twenty-seven million parameters, and ImageNet-1k linear-probing accuracy falls by only zero point eight percent, with no weight correction and no retraining.
Speed gains follow. At sixty percent sparsity, a pruned AugReg ViT-B sixteen model reaches up to one point eight times higher throughput on an A100 GPU. On that same GPU, its single-query latency is one point two six times lower. Building an elastic model takes minutes, and construction time grows sub-linearly with parameter count.
The title's claim is that the elasticity was already there. Without changing any weights, a fixed-size transformer becomes a model whose size can be dialled at serving time, because its neurons and heads have been put in a single order of importance, and stopping earlier in that order simply costs accuracy gradually rather than all at once.
More with an account
Listen to every day’s papers
Daily playlists, deep dives, quests for the papers, and quizzes on their key terms.
Join free