Chiosa
Machine Learning

One Transformer serves five compute budgets with shared weights

Accordion: Elastic-Depth Inference via Fixed-Prefix Layer Looping · arXiv:2610.32492

3 min
Updated

In plain words

Accordion is a Transformer method that lets one language model use five amounts of computation. It reuses the same weights and repeats selected layers for the larger budgets, while the smallest budget runs without repeats.

The authors compared its paths on the same 37 tasks, covering knowledge, common sense, reasoning, mathematics, and code. The average score across five task categories was higher at the largest budget than on the unlooped path, though this result describes that tested model and task set.

The research

A language model may need to spend different amounts of computation on different requests. Training and maintaining a separate model for each amount is costly, while jointly training paths of different depths can weaken the shallow path. Can one model offer several compute budgets and keep the shallow option useful?

Accordion is a shared-weight Transformer method that repeats selected layers, letting one model serve five inference budgets.

The authors compare Accordion-Base at five inference budgets while holding model weights, tasks, examples, and evaluation configurations fixed.

Across 37 tasks in five categories, its equal-category average rises from 47.05 on the unlooped path to 50.06 on the deepest path, with 36 task scores higher.

A smaller, equal-token study also finds the shared model’s validation loss within 0.0030 nats of separate specialists at three tested budgets. Together, these results support shared weights as a way to offer several tested compute levels while retaining quality on the measured tasks.

The 37-task result is a descriptive aggregate. Paired uncertainty estimates were reported for a separate 18-task core suite, so they do not quantify uncertainty for the full 37-task result.

What the evidence shows

  • One model, five budgets

    Accordion is a Transformer method that uses one set of weights to serve five inference budgets. The smallest budget follows the ordinary path; larger budgets repeat a prefix of selected middle layers.

    This addresses a tradeoff raised by jointly training paths of different depths: a model might gain a deeper option yet lose quality on its shallow path. The authors’ question is whether fixed, shared paths can preserve both options without a separate model for every budget.

  • Choosing which layers repeat

    To choose which layers to repeat, the authors compared eight strategies in a 1.61-billion-parameter design study. Each configuration was trained once on 80 billion tokens, with the same expected training depth, and evaluated on the same held-out web text.

    Fixed-prefix selection in layers 7–18 had the lowest observed validation loss at each repeated-layer budget and the lowest mean across the five budgets. Each strategy was evaluated with its specified training and inference paths.

  • Checking shared and shallow paths

    A separate comparison tested one shared model against specialists, each trained for a single budget. With 80 billion training tokens per model and the same inference graph at each compared budget, the shared model’s validation loss was within 0.0030 nats of the specialist at budgets 0, 6, and 12.

    An equal-token control also found lower mean validation loss with uniform budget sampling than with a control that reserved replicas for the unlooped path; that difference was specific to the replica-reservation comparison.

  • More computation, higher scores

    On Accordion-Base, the authors changed the inference path while keeping weights, tasks, examples, and evaluation configurations fixed. The 37 tasks assess knowledge and question answering, common sense, reasoning, mathematics, and code.

    Their score averages tasks within each category and weights the five category averages equally. The score rose from 47.05 at the unlooped budget to 50.06 at the largest budget, with higher scores on 36 of 37 tasks.

  • Combining three domain models

    The method also carried five inference budgets into post-training. The authors combined updates from instruction-following, mathematics, and code models, then trained one student on its own responses using token-level signals from the domain-matched model at the same budget.

    Across five budgets, the student exceeded each corresponding domain model on its equal-task domain average, and all three paired 95% intervals were above zero. The result is scoped to those domain averages and evaluations.

Deep

Next paperTwo fully trained loops can match large models with fewer parameters