{"slug": "glm-5-4-toward-generalized-coding-with-our-first-loop-transformer", "title": "GLM-5.4: Toward Generalized Coding with Our First Loop Transformer", "summary": "Z.ai released GLM-5.4, its first Loop Transformer, in which a group of weight-shared layers runs for multiple iterations to refine hidden states, giving a deeper network without increasing the parameter count. Simon Willison tested GLM-5.4 through the Z.ai API, which required signing up for the Coding Plan subscription because the model is not yet available through the regular API, and built an llm-glm plugin after finding Tommy Hughes' llm-zai did not yet support the new model. GLM-5.4 is not yet available as open weights, and Willison noted its pelican benchmark output is closer to OpenAI and Anthropic models than the distinctive GLM 5.1 and 5.2 generations.", "body_md": "[GLM-5.4: Toward Generalized Coding with Our First Loop Transformer](https://z.ai/blog/glm-5.4)\n\nIn a standard Transformer, each layer runs once per forward pass. In a Loop Transformer, a group of weight-shared layers runs for multiple iterations, refining the hidden states from the previous pass. This gives us a deeper network without increasing the parameter count.\n\nThis is the second mention of looped transformers I've seen in the past week - the first was [Inkling 2 Mini](https://thinkingmachines.ai/news/inkling-2-mini/) from Thinking Machines Lab on November 20th, who said:\n\nInkling 2 Mini is a looped transformer, running the middle layers of the model three times for every token. This allows the model to apply more reasoning and reach the right answer with fewer tokens, especially on tasks such as agentic coding that depend on reasoning quality.\n\nGLM 5.4 is not (yet?) available as open weights. I tried it out using the Z.ai API, for which I had to sign up for their [Coding Plan subscription](https://docs.z.ai/devpack/overview) because 5.4 cannot currently be accessed through the regular API.\n\nIt turns out both coding plan and regular API share the same OpenAI-compatible Responses API (at `https://api.z.ai/api/v1`), and the API key for the coding plan worked with that and gave me access to the new model.\n\nI built a [llm-glm plugin](https://github.com/simonw/llm-glm), then realized that [llm-zai](https://github.com/irthomasthomas/llm-zai) by Tommy Hughes already exists! I've shipped mine purely because `llm-zai` doesn't yet support the new model, but I'll likely retire mine once that plugin catches up.\n\nHere are [pelicans for GLM-5.4](https://tools.simonwillison.net/markdown-svg-renderer?url=https%3A%2F%2Fgist.github.com%2Fsimonw%2Fae838c5a6837ca0a602c180c07ac0887) on low, high, and max. This is the max one:\n\nI realized I never ran pelicans for GLM-5.3, so [here those are](https://tools.simonwillison.net/markdown-svg-renderer?url=https%3A%2F%2Fgist.github.com%2Fsimonw%2F8826d1366dcc98783c7cbc593f6a6e77) for the same effort levels. They look similar in quality to 5.4.\n\nIt's interesting how [GLM 5.1](https://simonwillison.net/2026/Apr/7/glm-51/) and [GLM 5.2](https://simonwillison.net/2026/Jun/17/glm-52/#excellent-pelican-disappointing-opossum) produced radically different pelicans from other models. The pelicans for 5.3 and 5.4 are much more comparable to those I get from OpenAI or Anthropic models - the previous generations had their own distinctive look.\n\nI made a [comparison grid](https://static.simonwillison.net/static/2026/glm-pelican-comparison.html) showing the four generations of GLM pelicans all in one place. The style transition between 5.2 and 5.3 is pretty stark.\n\nTags: [ai](https://simonwillison.net/tags/ai), [generative-ai](https://simonwillison.net/tags/generative-ai), [llms](https://simonwillison.net/tags/llms), [llm](https://simonwillison.net/tags/llm), [pelican-riding-a-bicycle](https://simonwillison.net/tags/pelican-riding-a-bicycle), [llm-release](https://simonwillison.net/tags/llm-release), [ai-in-china](https://simonwillison.net/tags/ai-in-china), [glm](https://simonwillison.net/tags/glm)", "url": "https://wpnews.pro/news/glm-5-4-toward-generalized-coding-with-our-first-loop-transformer", "canonical_source": "https://simonwillison.net/2026/Nov/23/glm-54/", "published_at": "2026-11-23 23:40:49+00:00", "updated_at": "2026-11-24 00:14:07.926212+00:00", "lang": "en", "topics": ["large-language-models", "generative-ai", "ai-research", "ai-products", "developer-tools"], "entities": ["Z.ai", "GLM-5.4", "Simon Willison", "Thinking Machines Lab", "Inkling 2 Mini", "Tommy Hughes", "llm-zai", "llm-glm"], "also_reported_by": [], "takeaway": "GLM-5.4's Loop Transformer runs a group of weight-shared layers for multiple iterations per forward pass, adding depth without adding parameters, and is reachable through the OpenAI-compatible Responses API at https://api.z.ai/api/v1 using a Coding Plan key.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/glm-5-4-toward-generalized-coding-with-our-first-loop-transformer", "markdown": "https://wpnews.pro/news/glm-5-4-toward-generalized-coding-with-our-first-loop-transformer.md", "text": "https://wpnews.pro/news/glm-5-4-toward-generalized-coding-with-our-first-loop-transformer.txt", "jsonld": "https://wpnews.pro/news/glm-5-4-toward-generalized-coding-with-our-first-loop-transformer.jsonld"}}