翻篇收录说明
翻篇网页快照

Loop Architecture Explained: Why Looped Transformers Are Suddenly Everywhere | Tech Stackups

https://techstackups.com/articles/loop-architecture-explained/

最近抓取:2026-12-03 06:46:44(北京时间)

最近内容变化:2026-12-03 06:46:44(北京时间)

这是最近一次有效抓取的文本快照,不含网页脚本、图片和动态交互内容。实际网页可能已更新。

访问原网页

页面简介

Z.ai's GLM-5.4 and Thinking Machines' Inkling 2 Mini landed three days apart with the same architectural bet: run a block of transformer layers more than once per token. Here is how loop architecture works, who is shipping it, and why it matters.

正文摘录

Within three days in November 2026, two very different AI labs shipped major models built around the same architectural bet. On November 20, Thinking Machines Lab released Inkling 2 Mini, a 26.4B open-weights multimodal model sized to run locally on a 32GB Mac. On November 23, Z.ai launched GLM-5.4, a 750B flagship coding model. Both use a loop architecture — often called a looped transformer, LoopLM, or recurrent-depth transformer. Instead of running a token once through a tall stack of unique layers, the model runs a shared block of layers multiple times before producing its next token. After eight years as an academic curiosity, looping just crossed over into production at both ends of the hardware spectrum. What loop architecture actually is​ A standard decoder-only transformer is a fixed assembly line. Every token enters at layer 1, passes once through layers 2, 3, and so on up to layer L, and exits as a next-token prediction. Every layer has its own unique weights. If you want the network to perform more sequential steps of computation per token, you stack more layers — which means more parameters, more VRAM, and more bytes moved from memory on every generated token. A looped transformer breaks the 1:1 link between physical parameters and computational depth. Most recent implementations split the model into three stages: Entry layers (prelude): Run once to turn token embeddings into initial hidden representations. A looped core block: A middle stack of layers whose weights are reused T times in a row. The hidden state coming out of the block gets fed back into the bottom of the same block for another pass. Exit layers (coda): Run once to project the refined hidden state back into vocabulary logits. Standard Transformer (e.g., 78 layers) Looped Transformer (e.g., GLM-5.4) Input token Input token │ │ [ Layers 1..78 ] (run 1×) [ Early layers ] (run 1×) │ │ Next token ┌─►[ 28-layer core ]──┐ │ (run 2×) │ Physical layers: 78 └─────────────────────┘ Effective depth: 78 │ [ Final layers ] (run 1×) │ Next token Physical layers: 78 Effective depth: 106 Inkling 2 Mini takes the same idea even further at small scale: it has 24 physical decoder layers, runs layers 0–5 once, loops layers 6–17 three times with shared weights, and runs layers 18–23 once. On disk, it is a 24-layer model. Computationally, every token gets 48 layers of sequential processing (6 + 3 × 12 + 6). Why loop architecture is interesting​ Reusing weights sounds like a simple compression trick, like sharing parameters to save disk space. That is only a fraction of why labs are suddenly adopting it. Four deeper pressures are driving the shift. 1. Separating memory storage from reasoning depth​ Parameters in a transformer do two very different jobs: they store world knowledge (syntax, facts, APIs) and they execute step-by-step computation (tracking state, composing constraints, following logic). In a standard model, scaling one forces you to scale the other. Controlled experiments from ByteDance Seed's Ouro paper showed that looping does not magically cram more memorized facts into a small model. Instead, it dramatically improves knowledge manipulation — combining facts the model already knows across multiple reasoning hops. That maps directly onto real developer workloads. When a coding model introduces a subtle bug across four files, it rarely forgot how async/await works. It ran out of serial computation depth to trace the state transitions before committing to a token. 2. Thinking in latent space instead of burning text tokens​ Over the past two years, the dominant way to get better reasoning has been explicit Chain-of-Thought (CoT): train models with RL to write thousands of "thinking" tokens before answering. CoT works because it turns the context window into external scratchpad memory. It is also a clunky bottleneck. Every intermediate thought has to be compressed down to a discrete English token, appended to the KV cache, and re-read by attention on the next step. Many geometric, spatial, algorithmic, and code-structure problems do not serialize cleanly into prose. Looped transformers let the model iterate inside continuous, high-dimensional hidden vectors before emitting a single token. That does not replace CoT — GLM-5.4 and Ouro-Thinking still pair looping with explicit reasoning — but it reduces how much babbling the model needs to do. In Z.ai's 30B scaling tests for GLM-5.4, adding the loop cut average output lengths by 10% to 14% on GPQA-Diamond and MMLU-Pro while raising accuracy. 3. Working around the memory-bandwidth wall​ During single-user or small-batch decoding, LLMs are overwhelmingly memory-bandwidth bound, not compute bound. Your GPU or Apple Silicon chip spends most of its time streaming gigabytes of model weights from memory into compute units, doing a quick matrix multiply, and throwing them away. When you loop a block of layers, you keep the same weights resident and do more useful arithmetic per gigabyte of parameter storage. You get the reasoning depth of a much taller model without paying its VRAM footprint. That is how Thinking Machines fit a 48-effective-layer multimodal coding model into a ~20 GB checkpoint that runs comfortably on a 32GB laptop, and how Z.ai kept GLM-5.4 at 750B parameters while targeting the reasoning ceiling of 2T–3T parameter models. 4. A third axis for test-time compute​ Until recently, scaling a model meant turning one of two dials: more parameters (bigger dense or MoE models) or more output tokens (longer reasoning chains). Loop depth adds a third dial: more serial computation per token. In research architectures like Huginn, Mixture-of-Recursions, and Ouro, that dial does not even have to be fixed. Easy tokens like punctuation or boilerplate syntax can exit after one pass, while hard tokens — a tricky branch condition, a math pivot, a tool call — loop deeper before committing. How Z.ai made it work at 750B scale in GLM-5.4​ A naive loop (for _ in range(2): x = layers(x)) breaks down fast at frontier scale. Activation norms drift and explode when hidden states are overwritten across passes, training from scratch wastes compute, and naive caching doubles your KV memory bill. Z.ai's GLM-5.4 technical post is notable because it documents the exact engineering compromises required to ship a Loop Transformer at 750 billion parameters. First, Z.ai did not train GLM-5.4's loop from scratch. Across validation runs at 1B, 4B, 30B, and 750B scales, they found that looped models trained from scratch trailed standard unshared models under the same pretraining compute budget. Instead, they took an already-pretrained GLM-5 base model, looped 28 middle layers twice (pushing effective depth from 78 to 106 layers), and adapted it via continued training. On their 30B testbed, this added roughly 10% training compute while delivering noticeable gains in math, scientific reasoning, and long-context tasks. Second, to keep the 750B model stable and affordable to serve, Z.ai introduced three structural mechanisms: Gated progressive updates: Independent per-token gates regulate how much each loop iteration writes back into the residual stream, preventing activation norms from blowing up across passes and keeping representations inside the scale downstream layers expect. Sparse attention index reuse: Instead of recomputing global sparse attention patterns from scratch on the second pass, the second loop reuses the sparse attention indices and global KV cache selected during the first pass. A local sliding-window cache: Alongside that reused global cache, the second pass maintains a lightweight local sliding window for fresh representations. The model attends to both first-pass global context and refined local states without doubling the full 1M-token KV cache. Combined with native vision support and a 1M-token context window, Z.ai positioned GLM-5.4 for "generalized coding" beyond standard web apps — covering 3D shaders, game engines, CAD modeling, and video logic. It launched first inside Z.ai's GLM Coding Plan (ZCode and Z.ai Chat), with API access and open weights slated to follow safety evaluations. Everything else recent using loop architecture​ GLM-5.4 is the largest public Loop Transformer so far, but it did not appear out of nowhere. Over the past 18 months, looped architectures progressed from university proof-of-concepts to compact open-weight releases to frontier-scale models. Model / PaperOrganizationDatePhysical → Effective DepthScaleKey ContributionUniversal TransformersGoogle BrainJul 2018Shared block, dynamic haltingResearch scaleOriginal blueprint combining weight-shared attention with adaptive haltingHuginn-3.5B (huginn-0125)UMD / LLNLFeb 2025Prelude + looped core + Coda (variable, e.g., 32+ steps)3.5BRandom-depth pretraining; showed latent test-time scaling without CoT dataMixture-of-Recursions (MoR)Google DeepMind, KAIST, MilaJul 2025Shared block, token-level routing135M–1.7BPer-token dynamic loop depth and selective KV caching for active tokens onlyOuroByteDance Seed & collaboratorsOct 2025Shared stack, up to 4 recurrent steps1.4B, 2.6BPretrained on 7.7T tokens with entropy-regularized exit; matched dense models up to 12BNanbeige4.2-3BNanbeige LLM LabJul 202622 layers × 2 → 44 layers3BTrained from scratch on 28T tokens; strong agentic/tool-use scores vs. 9B–12B modelsLoopCD / Apple LoopCDAcademic & Apple researchersSep–Oct 2026Inference-time decoding over existing LoopLMsVariousContrasts earlier and final loop passes (training-free) to boost accuracy or halve loopsInkling 2 MiniThinking Machines LabNov 202624 layers (middle 12 × 3) → 48 layers26.4B total (3.4B base / 5.4B eff. active MoE)Apache 2.0 multimodal local model (~20 GB NVFP4/MXFP8); 48.2% DeepSWE v1.1GLM-5.4Z.ai (Zhipu AI)Nov 202678 layers (28 × 2) → 106 layers~750BFirst frontier-scale Loop Transformer via continued training + gated updates & cache reuse A few of these deserve closer attention because they highlight very different bets on