Skip to content

Private AI12 min read

Looped Transformers Explained: Inkling 2 Mini, GLM 5.4 and Business AI

Looped transformer explained in plain words: how Inkling 2 Mini and GLM 5.4 reuse layers, what it saves, what it costs and why it matters for business AI.

Illustration: four stacked model layers, the middle two glowing, with a loop arrow sending work back through them.
On this page10 sections
  1. Looped transformer explained: what is it?
  2. How does a looped transformer work?
  3. How does Inkling 2 Mini's architecture work?
  4. How does the GLM 5.4 loop work?
  5. Looped vs standard models: what changes?
  6. Why do looped models matter for business?
  7. A short history of looped transformers
  8. Common myths about looped models
  9. Checklist: trying a looped model this week
  10. Questions people ask

Here is the looped transformer explained in one line: an AI model that reuses its own layers to think deeper. Two of the biggest AI model launches of November 2026 share that idea. Thinking Machines Lab released Inkling 2 Mini on November 20, and Z.ai released GLM 5.4 three days later. Both are looped transformers: models that send their work back through the same layers more than once before they answer.

That is why people are now searching "GLM 5.4 loop" and "Inkling 2 Mini architecture". This guide explains the idea in plain words, shows exactly how each model loops, and covers what it means if you want to run AI on your own hardware.

If you have read our Inkling 2 Mini vs Qwen 3.8 vs Gemma 4 comparison or our GLM 5.4 vs Claude Opus 5.5 guide, this is the piece that explains why both models behave the way they do.

Looped transformer explained: what is it?

A transformer is the design behind almost every modern AI language model. It is a stack of layers: steps that each take the model's current understanding of the text and refine it a little. A standard model with 48 layers stores 48 different sets of numbers (its parameters, or weights) and runs each layer once for every word it writes.

A looped transformer stores fewer layers and runs some of them more than once. Z.ai puts it this way: a group of weight-shared layers "runs for multiple iterations, refining the hidden states from the previous pass." The result is a deeper network without more parameters.

Think of it like reading a hard paragraph twice. You don't need a second brain to do it; you use the same brain again, and you understand more the second time. Researchers also call this recurrent depth or looped depth sharing.

The counting is simple. Sebastian Raschka's architecture gallery gives the rule: layer passes = layers before the loop + (layers in the loop × number of loops) + layers after the loop.

How does a looped transformer work?

Here is what happens for each word the model writes:

  1. The input goes through the first layers once. These turn the text into the model's internal form.
  2. It enters the loop. A group of middle layers refines that internal form.
  3. It goes round again. The same middle layers run again on their own output. Each pass can improve the result, and gates decide how much each pass is allowed to change.
  4. It leaves the loop. After a fixed number of passes, the work moves on.
  5. The last layers run once and pick the next word.
How a looped transformer reuses its layersA standard transformer stores every layer it runs: a 48-layer model keeps 48 layers in memory and runs each once per word. A looped transformer such as Inkling 2 Mini stores only 24 layers in four blocks of six. The first block runs once, the two middle blocks run three times in a row, and the last block runs once, so the model still makes 48 layer passes per word while keeping half the layers in memory. GLM 5.4 uses the same idea, running a group of 28 layers twice.Standard modelLooped modelWord in12 layers12 layers12 layers12 layersNext word48 stored, 48 runWord inBlock 16 layers, onceBlocks 2 and 312 shared layers3×Block 46 layers, onceNext word24 stored, 48 run
Same depth of thinking per word, half the stored layers. The saving is in memory, not in compute.

Two details make this work in practice. First, gates: Inkling 2 Mini uses a learned gate that "initially blocks the entire message" from the previous pass, so training starts like a normal model and the loop opens up gradually. Second, memory for context (the KV cache, which stores what the model has already read): a naive loop would need a separate copy for every pass, so both labs found ways to avoid that, as covered below.

How does Inkling 2 Mini's architecture work?

Inkling 2 Mini is the clearest example because Thinking Machines published the full layout on its blog and model card.

  • 24 stored layers in four blocks of six. The first and last blocks run once. The two middle blocks, layers 7 to 18, run three times. That is 6 + (12 × 3) + 6 = 48 layer passes per word.
  • 26.4 billion parameters in total, 3.4 billion active per word. It is a mixture-of-experts model (each word is routed to 8 of 128 small expert networks). Each extra loop adds about 1 billion more parameter uses, so it does the work of about 5.4 billion active parameters per word.
  • About 20 GB on disk, trained and shipped in 4-bit and 8-bit number formats. The model card targets Macs with 32 GB or more of memory, or one NVIDIA DGX Spark.
  • Why the middle? Looping the middle 12 layers beat looping the last 12 on 27 of 28 evaluations, according to Thinking Machines.
  • Why loop at all? The company says the non-looping version cost 7.5% less compute to train, but the looping version was over 50% more compute-efficient: a non-looping model would need over 1.5 times the training compute to reach the same quality.

The independent results back up the efficiency story. Artificial Analysis scored Inkling 2 Mini 20 on its Intelligence Index, level with Qwen3.8 27B, with about 5 times fewer active parameters. It finished the test tasks for $0.59 in 9 minutes, against $3.53 and 38.2 minutes for Qwen.

Thinking Machines also trained a research version with a variable number of loops, from one to five. Thinking time without written reasoning rose from 16 seconds at one pass to 37 seconds at three, then flattened out. The written reasoning got shorter as loops were added: 1,661 tokens at five passes against 3,703 at one.

If you want to run it yourself, our guide to Inkling 2 Mini hardware requirements covers memory, Ollama, GGUF files and business setups.

How does the GLM 5.4 loop work?

Z.ai calls GLM 5.4 its "first Loop Transformer." According to the Z.ai announcement on November 23, 2026:

  • It loops 28 layers of the GLM-5 base model for two iterations, at the 750-billion-parameter scale. Z.ai did not publish the exact total or the active parameter count.
  • It was built from an existing model. Z.ai continued training its already-trained base instead of starting from scratch, and says looped models trained from scratch "still lag behind" for the same compute.
  • Gates per word and per pass. The first pass writes cautious updates and the second pass writes full ones.
  • A cheaper memory trick. The second loop reuses the first pass's attention memory and adds only a short sliding window, so "an extra loop only costs one sliding window of KV cache rather than a full context cache."
  • The claim: "intelligence levels comparable to 2T-3T parameter models." Z.ai says it tested the method at 1B, 4B, 30B and 750B sizes.

Z.ai's 30B test, which compared the same model with and without the loop on about 10% more training compute, showed clear gains (figures as reported by MarkTechPost):

Benchmark (30B test model)Without loopWith loop
AIME25, math19.1730.42
GPQA-Diamond, science47.5856.26
AA-LCR, long documents40.3347.67
MMLU-Pro, knowledge71.6575.05
IFBench, following instructions50.2053.47

Output also got 10% to 14% shorter on most tests.

What is still missing: as of November 25, 2026, GLM 5.4 is available in Z.ai's Coding Plan, ZCode and Z.ai Chat only. The API is listed as coming soon, open weights are promised "after completing necessary safety hardening" with no date, and there are no published full benchmark scores for the 750B model. Some analysts say the loop covers layers 27 to 54 of a 78-layer stack, but Z.ai has not confirmed the position. For what this means for regulated data, see our GLM 5.4 vs Opus 5.5 guide.

Looped vs standard models: what changes?

The short version: you save memory and pay in compute.

Standard transformerLooped transformer
Stored layersOne per passFewer; some reused
Memory for weightsGrows with depthSmaller for the same depth
Computing work per wordOne pass per layerHigher than the stored size suggests
Speed on the same hardwareFaster per wordSlower per word, but may need fewer words
Knowledge of factsTracks total parametersSame: loops don't add facts
Reasoning for its sizeBaselineBetter, in the 2025–2026 studies
Runtime supportMatureNew; needs recent software
layer passes per word from 24 stored layers in Inkling 2 Mini (Thinking Machines, Nov 2026)
48
parameter-class intelligence Z.ai claims for the 750B-scale GLM 5.4 (Z.ai, Nov 2026)
2T–3T
per test task for Inkling 2 Mini vs $3.53 for Qwen3.8 27B (Artificial Analysis, Nov 2026)
$0.59

Three trade-offs matter most:

  • Knowledge does not grow. Thinking Machines says looping "doesn't enable its weights to store more facts—knowledge is mostly a function of total parameter count." ByteDance's Ouro paper found the same: looped models win through "superior knowledge manipulation," not more knowledge.
  • Context memory can grow. If each pass keeps its own memory of the conversation, long documents get expensive. GLM 5.4 uses a sliding window for the second pass, and NVIDIA's Dory model caches only the last loop.
  • Reasoning you can't see. A loop lets a model "reason longer without writing its reasoning down," which makes it harder to monitor. Thinking Machines tested this and found "no meaningful reduction in the monitorability" at Inkling 2 Mini's scale, but it is a fair question for future, larger models.

Why do looped models matter for business?

For a business, looping is mainly about what hardware you need to run a capable model privately.

  • Smaller hardware for the same capability. A model that fits in about 20 GB but reasons like a much larger one can run on a single workstation, a Mac or one DGX Spark inside your office. That keeps prompts and documents off someone else's servers, which is the core of private AI for business.
  • Lower cost per task, not per token. Looped models can use more output tokens yet still finish the job sooner. Measure cost per finished task, as Artificial Analysis does.
  • Pair them with your documents. Because loops don't add facts, use a looped model with search or retrieval over your own files for anything fact-heavy, and check its answers.
  • Expect new-software friction. llama.cpp needed a new code change (pull request 32694, merged November 20, 2026) to run Inkling 2 Mini, and downstream tools took time to ship it. A bug that produced garbage output when part of the model ran on the CPU was also reported. Pin your software versions and test before rollout.
  • Set limits. Z.ai lists "marathon thinking" loops as a known GLM 5.4 limitation, and early Inkling 2 Mini testers reported runaway reasoning. Cap thinking tokens and tool calls, and log everything. Our guide to running AI agents on your own hardware lists the controls.

A short history of looped transformers

Looping is not new. Production-scale looped models are.

YearModel or paperWhat it showed
2018Universal Transformers (Dehghani et al., Google)Weight-shared layers that repeat, with a per-word stop signal
2023Looped Transformers as Programmable Computers (Giannou et al.)A looped 13-layer transformer can act like a simple computer
Feb 2025Recurrent depth, "Huginn" (Geiping et al.)A 3.5B model gained up to the compute of a 50B model by looping
Jul 2025Mixture-of-Recursions (Bae et al.)A router decides how many loops each word gets
Oct 2025Ouro looped language models (Zhu et al., ByteDance)1.4B and 2.6B models matched models up to 12B
2026Nanbeige4.2-3B, NVIDIA Dory1.0-4B, SenseNova-Loop-9BSmall open looped models; Dory's coding score rose with more loops
Oct 2026Towards Looped Models Done Right (Huang et al.)Matched compute with 75% fewer stored parameters
Nov 2026Inkling 2 Mini and GLM 5.4Looping reaches widely used open and commercial models

NVIDIA's Dory shows the "more loops, better answers" effect plainly: its card reports 50.3% on SWE-bench Verified at one loop, 59.5% at two and 61.8% at four.

What about the closed models? In September 2026 The Information reported, citing an unnamed source, that OpenAI's GPT-6 Astra uses a looped design. OpenAI has not confirmed it. Claims that Anthropic's models loop are speculation with no published evidence.

Common myths about looped models

  • "Inkling 2 Mini is the first looped model." It isn't. Ouro, Huginn, Nanbeige, Dory and SenseNova-Loop came first. It is the first widely adopted one at this level of capability.
  • "A smaller file means a faster model." Not here. Fewer stored layers means less memory, but each word still makes every pass.
  • "Looping makes a model know more." It makes the model think harder with what it knows. Facts still depend on total size.
  • "More loops are always better." Gains flattened after three passes in Thinking Machines' research model, and both labs warn about runaway thinking.
  • "Any runtime will load it." Looped models need runtime support for the loop. Older llama.cpp builds could not load Inkling 2 Mini.

Checklist: trying a looped model this week

  • Decide the one job you want to test, and collect 20 to 50 real examples with known answers.
  • Check your hardware against the model's memory needs; leave room for long documents.
  • Install a runtime version that names looped-model support, and pin it.
  • Turn on caps for thinking tokens and tool calls, plus full logging.
  • Connect it to your own documents for anything factual.
  • Compare cost and time per finished task against your current model, not price per token.

The one thing to remember: a looped transformer trades memory for computing work, which is often the right trade for a business that wants capable AI on its own hardware. To see how the two newest small models compare in practice, read Inkling 2 Mini vs Qwen 3.8 Flash Next. If you want help testing a looped model on your own work, privately, tell us your goal or see how we work.

Sources

Questions people ask

What is a looped transformer?

A looped transformer is an AI language model that runs some of its layers more than once for each word it writes, reusing the same weights every time. Z.ai describes it as weight-shared layers that run for several iterations, refining the previous pass, which gives a deeper network without adding parameters. Inkling 2 Mini and GLM 5.4, both released in November 2026, use this design.

Is GLM 5.4 a looped transformer?

Yes. Z.ai says GLM 5.4 loops 28 layers of its GLM-5 base model for two iterations, at the 750-billion-parameter scale, and calls it the company's first loop transformer. It was built by continued training of the existing model, not from scratch. Z.ai claims intelligence comparable to 2 to 3 trillion parameter models, but had published no full benchmark scores for the 750B model as of November 25, 2026.

How many layers does Inkling 2 Mini loop?

Inkling 2 Mini stores 24 layers in four blocks of six. The first and last blocks run once and the two middle blocks, layers 7 to 18, run three times. That gives 48 layer passes per word from 24 stored layers. Thinking Machines found that looping the middle layers beat looping the last layers on 27 of 28 of its tests.

Do looped models need less memory?

Yes for the model weights, no for the work. Memory follows the number of stored parameters, so a looped model fits on smaller hardware than a standard model of the same depth. Compute follows the number of layer passes, so each word costs more work than the stored size suggests. Inkling 2 Mini's model card says exactly this: compute per token is higher than its active parameters imply.

Are looped transformers smarter than normal models?

They reason better for their size, but they do not know more. Thinking Machines says looping does not let the weights store more facts, because knowledge is mostly a function of total parameter count. ByteDance's Ouro paper reached the same conclusion: the gain comes from better use of knowledge, not more of it. Pair a looped model with search or your own documents for fact-heavy work.

Is GPT-6 Astra a looped transformer?

It has been reported, not confirmed. In September 2026 The Information cited an unnamed source saying GPT-6 Astra uses a recurrent-depth, or looped, design. OpenAI has not confirmed it. Claims that Anthropic's models are looped are speculation with no evidence behind them. The only large looped models with published designs as of November 2026 are Inkling 2 Mini and GLM 5.4.

Keep reading

All posts

Want this working in your business?

Tell us what you want to get done. We will tell you if AI can help.