AI Infra Interviews logo

Looped Transformer Training: Fewer Weights, More Computation

Understand looped Transformers, shared weights and recurrent depth. Compare training memory, gradient truncation and the budgets behind Huginn, DeepLoop and Loopie.

BY OWEN HARTLEY · AIINFRAINTERVIEWS EDITORIAL · UPDATED NOVEMBER 22, 2026 · 4 MIN READ

PRACTICE THIS:Study recurrent depth (Premium) ·Solve the training memory question (Premium) ·Derive training FLOPs (free) ·Explore the Training at Scale course

A looped Transformer reuses learned layers to perform additional computation on its hidden states. It can store fewer weights than an equally deep untied network, while still executing many of the same kinds of operations. For training, that creates three separate questions: how many unique parameters are stored, how many layer visits run forward, and how many visits contribute through backward.

That separation is the useful engineering idea. A smaller checkpoint alone cannot establish lower training cost, lower peak memory or faster answers. To assess a recurrent-depth model, follow its execution and compare quality under an explicit resource budget.

Follow the state, not just the layer count

Imagine blocks A and B. Each contains attention and a feed-forward network. In an ordinary stack, the next block owns a different set of weights. With recurrence, a model can revisit A after B has changed the token representations.

Two recurrence schedules illustrate the distinction:

The same stored blocks can define different computations

Stack-loop

  1. Round 1: A → B

    A transforms the input; B transforms A's result.

  2. Round 2: A → B

    A now receives B's changed state, then B runs again.

Execution order: A, B, A, B.

Layer-loop

  1. Repeat A: A → A

    The second A receives the first A's result.

  2. Repeat B: B → B

    Only after both A visits does the state enter B.

Execution order: A, A, B, B.

Both schedules store two blocks and execute four visits. Reordering the operations changes the function and the placement of communication.

The parameter values remain fixed during a normal forward/backward pass. The optimizer changes them afterward. Calling the model repeatedly with new prompts is a different process; recurrence here is inside the model's computation.

Nor does it mean that the model has written an explanatory chain of thought. Intermediate hidden states are numerical representations. A model can use recurrent computation and still generate reasoning tokens, but the two mechanisms have different accounting.

Start with a small cost calculation

Take an illustrative shared core containing one billion dense matrix parameters, applied four times per token. Count one multiply and one add as two floating-point operations. Its projection-only forward estimate is:

forward work = 2 × 1 billion parameters × 4 visits
             = 8 billion FLOPs per token
full forward + backward ≈ 6 × 1 billion × 4
                        = 24 billion FLOPs per token

The same core visited once has a six-billion-FLOP full-training estimate. Four visits do not get the extra three for free. The model also needs attention score/value work, embeddings, output processing and any recomputation; the calculation deliberately isolates the repeated dense projections.

Start with the free Training FLOPs: 6ND explanation to understand where the six comes from. In a recurrent model, substituting unique stored parameters into 6ND without counting repeated uses underestimates this component of work.

Memory needs its own calculation. Shared parameters can share their optimizer state, but repeated visits produce different intermediate tensors. Full backward may need many of them. The free Model Memory Footprint reference gives the allocation categories to inventory before drawing conclusions from checkpoint size.

What the research changes

These papers explore different choices within recurrence. They should not be read as interchangeable recipes or as universal performance guarantees. The versions below were checked on November 22, 2026.

WorkQuestion it investigates
Universal Transformers, v3Shared depth transitions, including adaptive per-position halting. The preprint appeared in 2018; the conference publication was ICLR 2019.
MoEUT, v2How expert-based capacity, grouping and normalization can improve a shared-layer architecture.
Relaxed Recursive Transformers, v3How depth-specific low-rank adapters relax strict sharing, including conversion from pretrained models.
Huginn, v2Training recurrent depth with sampled iteration counts and truncated backward.
Mixture-of-Recursions, v3Token-level depth routing and architecture-specific KV-cache choices.
DeepLoop, v2How repeated parameter visits alter residual scaling and training stability.
Loopie, v3Layer-loop execution and a recipe evaluated under matched realized training cost.

Huginn's prelude prepares an input representation, its core iterates, and its coda produces output predictions. Its training design keeps only a tail of iterations on the backward path. This makes the forward-depth choice distinct from the gradient-depth choice; it does not eliminate the earlier forward work. The Premium recurrent-depth concept follows that boundary through an original numerical example.

DeepLoop studies a specific post-normalized architecture and a first-order bound involving alignment between repeated visits. Its stronger scaling rule addresses a conservative aligned regime, with experiments at GPT-2 small and medium scale. That supports investigating visit-aware stability; it does not justify applying one exponent to every recurrent architecture. See the derivation and scope.

Read “compute matched” carefully

Loopie's latest revision makes an important distinction in §2.4. It selects configurations with similar measured optimizer-step time on fixed hardware, holding sequence length, tokens per update, training data and other recipe choices comparable. Microbatch size may change, with accumulation adjusted to preserve the effective token batch. The paper explicitly says theoretical FLOPs are not equal.

That is a useful operational comparison. It answers a different question from “which architecture gives better quality at exactly equal theoretical FLOPs?” The paper connects adjacent layer reuse to execution locality, and reports its tested recipe's results. It does not establish that arbitrary layer sharing makes any existing model cheaper.

When reading any efficiency result, write down the comparison:

  • Equal stored parameters tests quality at a storage budget while allowing different work.
  • Equal theoretical FLOPs controls a stated arithmetic estimate while allowing different hardware efficiency.
  • Equal hardware and training duration controls a practical resource allocation while allowing different arithmetic and token throughput.
  • Equal served quality tests whether a cheaper configuration actually meets the product requirement.

A paper may report several of these. Keep their denominators separate.

An experiment worth running

Start with a small deterministic full-gradient reference. Verify shared parameter identity, then check any checkpointed implementation against its gradients. If you intentionally truncate, test the intended cut and evaluate the resulting learning behavior. Forward-output equality is insufficient.

Record unique parameter bytes, peak allocated and reserved memory, depth distribution, effective tokens per update and complete update time. Evaluate quality at the intended training budget, followed by serving latency and state memory at each supported inference depth. Include the smallest and largest depths you plan to expose. There is no general guarantee that the longest unroll is best.

The Premium training-memory question supplies a worked allocation budget and a runnable gradient trace. The Training at Scale course provides the surrounding memory, parallelism and run-planning sequence; its catalog identifies the access level for each lesson.

PRACTICE THIS

Turn it into offers. Work the real questions and concepts this maps to:

FAQ

A looped Transformer reuses learned blocks across multiple depth steps. Each visit reads shared weights but processes an updated hidden state. Unique parameter count and executed computation therefore need separate accounting.

Discussion (4)

Brandon SullivanEditor

A training-time comparison also needs the hardware count. Two runs finishing in a day can have very different GPU-hour bills.

Owen HartleyEditor

And count the failed trials when deciding whether a new recipe is affordable to reproduce. A successful final run answers a narrower cost question.

Morgan FosterEditor

Report both a fixed-depth evaluation and the result of any adaptive stopping policy. If the stopping threshold was tuned on the evaluation set, the headline is already spending information from the test.

Ruiqi ZhouEditor

Equal weights at initialization are easy to confuse with shared parameters. Inspect object identity before interpreting a memory comparison.