Skip to content
PodSubs
ShowsPeopleGuestsJobsNewsEvents
More
BlogPodCred
Menu
ShowsPeopleGuestsJobsNewsEventsBlogPodCredNetworksSign in
Join nowSign in
  • Shows
  • People
  • Jobs
  • News
  • More
    • Guests
    • Events
    • Blog
    • PodCred
    • Networks
    Join nowSign in

Mechanical Dreams

Mechanical Dreams artwork

GLM-5

Mar 24, 202625 minAudio
ShareXLinkedInFacebookWhatsAppEmail

In this episode: • Welcome & The End of Vibe Coding?: Linda introduces GLM-5 and the paradigm shift from passive vibe coding to autonomous agentic engineering. • Architecture & DeepSeek Sparse Attention: Professor Norris and Linda examine the 744B parameter model and how transitioning from dense to sparse attention drastically cuts compute costs. • Asynchronous RL and the Slime Framework: A deep dive into decoupled training engines, addressing off-policy drift with TITO and token-level clipping. • Evaluating Real-World Agentic Engineering: Reviewing GLM-5's performance on SWE-bench and the innovative Agent-as-a-Judge pipeline for interactive frontend testing. • Hardware Adaptation & Pony Alpha: Discussing the model's extreme quantization for domestic GPUs and the dramatic anonymous release on OpenRouter.

Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.

Transcript

From the show.

## Welcome & The End of Vibe Coding?

Norris: Welcome back to Mechanical Dreams, the podcast where we untangle the latent spaces of machine learning and natural language processing. I am Professor Norris, your resident skeptic, and across the desk is my brilliant student, Linda, who is always trying to convince me that the future has already arrived. Linda: Thanks, Professor! And it really has arrived this week. I brought a massive new paper that is going to make you rethink how we write software entirely. It is by the GLM-5 Team from Zhipu AI and Tsinghua University, titled GLM-5: from Vibe Coding to Agentic Engineering. Norris: Vibe coding. I have to admit, that term always makes me chuckle. It sounds like a programmer sitting in a dimly lit room with a lava lamp, just hoping their Python script magically compiles. What exactly do they mean by that? Linda: It is actually a highly accurate description of how most of us use Large Language Models right now! Vibe coding is the paradigm where a human developer loosely prompts an AI, gets a chunk of code back, pastes it into their editor, and just vibes with it to see if it works. It is a highly manual, prompt-heavy, and passive process. Norris: Ah, yes. The modern equivalent of copy-pasting from Stack Overflow, but with more hallucinated variables. It is certainly how I see my undergrads finishing their assignments these days. So, GLM-5 is claiming to end this era? Linda: Exactly. They are introducing a paradigm shift to what they call Agentic Engineering. Instead of the AI being a passive code generator, GLM-5 acts as an autonomous agent. It can plan, implement, run tests, and iterate on complex software engineering tasks entirely on its own, over long horizons. Norris: That is quite the claim. We have seen coding agents before, and they usually get stuck in an endless loop of fixing one bug and creating three new ones. What makes GLM-5 different? Is it just brute force scaling? Linda: It is scale, but paired with some incredibly clever infrastructure. They scaled the base model to 744 billion parameters using a Mixture-of-Experts architecture. But more importantly, they introduced some groundbreaking techniques in asynchronous reinforcement learning and context management that allow the model to maintain focus over massive, multi-step workflows without losing the plot. Norris: 744 billion parameters. That is a absolute behemoth. But as we know from painful experience, a big brain does not automatically mean a focused mind. If it is going to autonomously manage entire repositories, the computational cost and the context window fidelity must be astronomical. How do they even afford to train and run this? Linda: You would think it would break the bank, but they specifically designed it to be highly efficient. They integrated DeepSeek Sparse Attention to drastically cut down training and inference costs while keeping the 128K context window sharp. They trained it on a whopping 28.5 trillion tokens! They even deployed it successfully on domestic Chinese GPU clusters, adapting to hardware constraints beautifully. Norris: Alright, Linda, you have my attention. Moving from a glorified autocomplete to an autonomous software engineer is the holy grail of our field right now. If they really solved the long-horizon coherence problem without bankrupting the lab on compute, this could be huge. Let us pop the hood and see exactly how they built this thing.

## Architecture & DeepSeek Sparse Attention

Norris: So Linda, at the end of the last chapter, you left us hanging on a 744 billion parameter cliff. As an old-school NLP guy, that number makes my graphics card weep just thinking about it. How exactly are they routing all those parameters without grinding their clusters to an absolute halt? Linda: Well, the trick is that it is a Mixture-of-Experts, or MoE, architecture. Out of those 744 billion total parameters, only 40 billion are actually active during a single forward pass. They scaled up to 256 experts but strategically reduced the layer count to 80. That specific balance minimizes the communication overhead across the experts during training. Norris: Classic MoE efficiency. But active parameters only solve half the equation. If we are talking about Agentic Engineering, this model needs to hold entire software repositories in its working memory. Standard dense attention has a quadratic complexity, meaning a 128K context window would normally require an astronomical amount of memory just for the Key-Value cache. Linda: Exactly, which is why they initially adopted Multi-latent Attention, or MLA. It compresses the KV cache and matches the effectiveness of Grouped-Query Attention. But the researchers actually ran into a fascinating optimization bug when pairing it with the Muon optimizer. Norris: Oh? The Muon optimizer usually relies on orthogonalizing the weight matrices to improve training stability. Did that clash with the latent dimension compression in the MLA? Linda: Spot on, Professor! They found that applying matrix orthogonalization to the massive up-projection matrices for the queries, keys, and values was actively hurting performance. So, they introduced a neat technique they call 'Muon Split'. They literally split these matrices into smaller ones for different attention heads and applied the orthogonalization independently. It completely closed the performance gap and kept the attention logits perfectly stable. Norris: That is a brilliant, gritty engineering detail. The kind of thing that only surfaces when you are actually in the trenches training these massive runs. But let us talk about the real star of the architectural show here: DeepSeek Sparse Attention, or DSA. Linda: Yes! DSA is how they ultimately beat the quadratic scaling curse. Instead of dense attention where every token looks at every other token, or a rigid sliding window that only looks at local neighbors, DSA dynamically allocates attention resources. It uses an indexer to look at the content and dynamically decide which tokens are actually important to attend to. Norris: But wait. Training a dynamic, content-aware sparse attention mechanism from scratch usually requires a ridiculous amount of compute because the sparsity patterns take forever to learn. Linda: They avoided that entirely! They used a two-stage Continued Pre-Training strategy. They started with their dense base model, did a short dense warm-up for 1,000 steps to train the indexer, and then did a sparse training adaptation for just 20 billion tokens. That is a tiny fraction of their overall 28.5 trillion token budget. Norris: And 20 billion tokens was enough to match the dense model's performance? Linda: It was. It proved that about 90 percent of the attention entries in long contexts are completely redundant. By cutting that out, DSA reduces the attention computation by roughly 1.5 to 2 times for long sequences. That means they can handle 128K context windows at half the GPU cost. Norris: I have to put my skeptic's hat on for a second. In my experience, these sparse or linear approximations always look great on paper, but they tend to cause catastrophic forgetting on fine-grained retrieval tasks. The classic 'needle in a haystack' problem. If an agent is reading 50 files of code, it cannot afford to drop a single crucial variable declaration just because the attention mechanism deemed it 'unimportant' for a few layers. Linda: They actually ran a massive ablation study on that exact concern! They tested DSA against Sliding Window Attention and linear variants like Gated DeltaNet. You are completely right that naive sliding windows caused a catastrophic 30-point drop on the RULER long-context benchmark. But DSA's lightning indexer achieves token-level sparsity without discarding long-range dependencies. It is lossless by construction. Norris: Lossless by construction. That is a bold phrase, but if the benchmarks back it up, it is a game-changer. It means the model retains its sharp reasoning edge while drastically lowering the computational overhead. A prerequisite if you want an AI to autonomously churn through GitHub pull requests all day. Linda: Exactly. But having a smart, efficient base model is just the foundation. To actually make it an agent, you have to train it to think, plan, and use tools. And that requires a massive reinforcement learning pipeline, which is a whole different beast.

## Asynchronous RL and the Slime Framework

Norris: So, we have a lossless, highly efficient base model using DeepSeek Sparse Attention. That is a fantastic start. But as we know, having a model that can read a lot of code efficiently does not make it an autonomous agent. If you are building a system to do Agentic Engineering, it has to interact with an environment. It has to write code, wait for a compiler, read the error logs, and try again. And from a training perspective, that is a massive bottleneck. Linda: You hit the nail on the head, Professor. Standard synchronous reinforcement learning suffers from severe GPU idle time. The long-tail nature of these agentic tasks means your expensive GPUs are just sitting there waiting for an environment to respond or for one slow rollout to finish. To fix this, they built a fully asynchronous RL infrastructure using a framework they call 'slime'. Norris: I love the naming conventions in this field. So, what exactly makes the 'slime' framework so effective for this? Linda: The core idea is completely decoupling the inference engine—which does the rollouts—from the training engine. They put them on different GPUs. The inference engine just continuously generates trajectories through a central Multi-Task Rollout Orchestrator. It treats different tasks, like coding or web searching, as independent microservices. Once it has enough trajectories, it batches them up and sends them to the training engine to update the model. Norris: Wait a minute. If they are fully decoupled, the inference engine is generating new trajectories using stale model weights while the training engine is busy calculating updates. By the time those trajectories get back to the trainer, the policy has already changed. That is a classic recipe for off-policy collapse! How did they stop the training from just exploding? Linda: That is exactly the danger of asynchronous RL! But they introduced two brilliant mechanisms to maintain stability. The first is a Token-in-Token-out gateway, or TITO. Norris: TITO... as opposed to Text-in-Text-out? Do not tell me people are still doing Text-in-Text-out for RL pipelines. Linda: They are! And it causes so many subtle bugs. If the rollout engine returns finalized text, and the trainer has to re-tokenize it, you get mismatches in boundaries, whitespace handling, and special token placement. It corrupts the alignment between the actions and the rewards. By passing the exact token IDs directly, TITO preserves perfect action-level correspondence. Norris: A simple engineering fix, but an absolutely vital one. Still, matching token IDs does not solve the fundamental math problem. The probabilities from the old policy still do not match the new one. Linda: Right. To fix the math, they used a direct double-sided importance sampling mechanism. Normally, to correct for off-policy drift, you would have to maintain an extensive history of old model checkpoints to calculate the exact behavior probabilities. But at 744 billion parameters, tracking history is computationally prohibitive. Norris: So they took a shortcut. Linda: A very smart shortcut! They reuse the log-probabilities generated during the rollout as a direct proxy. Then, they apply a double-sided token-level clipping mechanism. They define a specific trust region. If a token's probability ratio falls outside that interval, it gets entirely masked out from the gradient computation. Norris: Ah! I see. So if the policy has drifted too far on a specific action, they just ignore that specific token rather than throwing away the whole trajectory or letting it destabilize the gradients. That is incredibly pragmatic. Linda: They go even further to ensure quality. They track the policy version used for every rollout. If a trajectory is too stale—meaning it lags too many versions behind the current policy—they just discard it. They also filter out trajectories where the coding sandbox randomly crashes, ensuring the model is not penalized for an environment failure. Norris: I am starting to see why they call it Agentic Engineering. They aren't just training a model; they are building a highly fault-tolerant distributed system. But what about tail latency? Some of these agent tasks take hours. A few long rollouts could stall the whole pipeline, decoupled or not. Linda: Slime handles that beautifully through Prefill-Decode disaggregation. In multi-turn settings, you have massive prefill prompts—conversation history, tool traces, code contexts. If you run prefill and decode on the same server, a heavy new prefill will preempt ongoing decodes, spiking your tail latency. Norris: So they isolate them. They put the prefills and decodes on dedicated, separate resources. That keeps the long-horizon tasks streaming continuously without being interrupted by new incoming requests. Linda: Exactly! And they combined that with DP-aware routing. That means all sequential requests from the same agent instance are routed to the same Data Parallel rank. It maximizes KV-cache reuse, so as the rollout gets longer, the prefill cost stays proportional only to the incremental tokens, not the total context length. Norris: It really is a masterclass in systems engineering. They solved the algorithm problems with infrastructure, and the infrastructure problems with algorithms. It is a beautifully intertwined solution. But all this elegant engineering is just theory until it actually writes some code. I want to know how well this actually performs on real-world coding tasks. Linda: Oh, the evaluation is where this paper really shines. They did not just use the standard SWE-bench. They built an entirely new automated pipeline to test whether this model can actually do Agentic Engineering in the wild. We should dive into that next.

## Evaluating Real-World Agentic Engineering

Norris: Alright Linda, you have convinced me that the GLM-5 infrastructure is a distributed systems marvel. But as we said, the proof is in the pudding. Or in this case, the pull requests. Does this 744 billion parameter behemoth actually write good code? Linda: It really does. Let us start with the traditional leaderboards. On SWE-bench Verified and SWE-bench Multilingual, GLM-5 achieves state-of-the-art performance for open-source models. It beats Gemini 3 Pro and stands shoulder-to-shoulder with proprietary giants like GPT-5.2 and Claude Opus 4.5. Norris: Standard benchmarks are a good sanity check, but they are exactly that: standard. And static. SWE-bench gives you an isolated issue and a codebase snapshot. Real software engineering is not an isolated test environment. It is messy, evolving, and full of undocumented legacy code. Linda: The Zhipu AI team completely agrees with you, Professor. To evaluate true Agentic Engineering, they introduced a new internal evaluation suite called CC-Bench-V2. It completely removes human labeling and relies on fully automated, long-horizon tasks across both frontend and backend. Norris: Hold on. Automated backend testing I understand. You write unit tests. But frontend? You cannot effectively unit test a visual layout. A CSS bug might make the submit button transparent or push it off the screen. The code compiles, the DOM elements exist, but the user cannot click anything. Linda: Exactly! That is why they created the Agent-as-a-Judge pipeline. First, a static verification stage builds the frontend projects, like React or Vue apps, inside a Docker container. If it successfully compiles, they hand it over to an autonomous Judge Agent. Norris: Wait, another AI plays the role of the QA tester? Linda: Yes! The Judge Agent is equipped with Playwright and bash tools. It literally interacts with the live UI. It clicks buttons, inputs keystrokes, takes screenshots, and evaluates the visual and functional correctness of specific check-items. It renders a pass or fail verdict based on actual simulated human interaction. Norris: That is delightfully devious. An AI QA agent trying to break the UI built by an AI developer agent. How did GLM-5 fare in this automated crucible? Linda: The metrics are fascinating. They track Build Success Rate, Check-item Success Rate, and Instance Success Rate. For Build Success, GLM-5 is hitting near 100 percent on frameworks like React and Vue. The code compiles and runs perfectly. For individual Check-items, it is highly competitive with Claude Opus 4.5. But for Instance Success Rate, meaning getting every single requirement in a task perfectly right end-to-end, Opus 4.5 still holds a noticeable lead. Norris: That makes sense. Getting ninety percent of a feature right is relatively easy for these large models now. Closing that last ten percent without breaking the rest of the application requires immense long-context consistency. What about the backend? Did they simulate the messy repository problem? Linda: They did, with a task called Large Repo Exploration. And this is where GLM-5 actually beats Claude Opus 4.5. They give the agent a natural language business problem, strictly avoiding any mention of file names or class names. For example, they might say the lip-sync in a generated video is misaligned. Norris: Oh, that is brutal. You cannot just use a keyword search for that. The agent has to logically deduce that a video lip-sync issue probably stems from a parameter-tuning block deep inside an audio-processing or rendering module. Linda: Exactly. It requires directory-level reasoning and semantic association. Because GLM-5 was heavily trained on agentic tool-use trajectories using that asynchronous RL pipeline we talked about earlier, it is incredibly efficient at strategic search. It navigates these massive, unfamiliar repositories better than the proprietary models. Norris: That is genuine engineering behavior. Finding the right file is often harder than fixing the bug itself. Did they test it on consecutive changes? A real developer does not just make one pull request and retire. Linda: Yes, they evaluated on Multi-step Chained Tasks. The agent has to complete a series of sequential pull requests where the codebase state evolves cumulatively. A mistake in step one might silently break a test in step three. Norris: The dreaded compounding error. Let me guess, the open-source model struggled a bit more there? Linda: It did. GLM-5 improved massively over its predecessor, GLM-4.7, but Claude Opus 4.5 still leads in that specific chained task. Long-horizon self-correction across multiple commits is still the final frontier they are trying to conquer. Norris: Still, the fact that an open-weight model is competing in these multi-step, visual, and exploratory domains is a monumental shift. It really is the end of simply pasting a prompt and hoping for the best. We are dealing with autonomous workers now. Linda: And the craziest part is how they managed to deploy this massive system efficiently, and the incredibly sneaky way they released it to the world. We have to talk about hardware adaptation and the Pony Alpha experiment next.

## Hardware Adaptation & Pony Alpha

Norris: Alright Linda, you promised me some hardware wizardry and a sneaky release story to wrap this up. How do you actually deploy a 744-billion-parameter model without building your own dedicated nuclear power plant? Linda: It all comes down to extreme, full-stack hardware adaptation! They optimized GLM-5 from the kernel level all the way up for seven different Chinese domestic chip platforms, using the Huawei Ascend Atlas series as their prime case study. Norris: Deploying on domestic chips is a completely different ecosystem than the standard NVIDIA clusters we usually see in these papers. They must have had to write custom kernels just to get that DeepSeek Sparse Attention working. Linda: They absolutely did. They developed custom fusion kernels, like a Lightning Indexer that fuses score calculation, ReLU, and TopK operations into a single step. But the real magic that lets them deploy this efficiently is their mixed-precision W4A8 quantization. Norris: Let me guess. They kept the highly sensitive standard attention and MLP blocks at 8-bit, but crushed the massive Mixture-of-Experts layers down to 4-bit? Linda: Spot on, Professor! By compressing the MoE experts to 4-bit INT4, they drastically reduced the memory footprint without a significant drop in accuracy. Combined with asynchronous scheduling to hide communication latency, they achieved performance on a single Chinese node comparable to dual-GPU international clusters. Norris: That is a phenomenal engineering achievement. It makes these massive agentic models economically viable for long-sequence scenarios. Now, tell me about this mysterious 'Pony Alpha' Easter egg you teased earlier. Linda: Oh, this is the best part of the paper. Before officially announcing GLM-5, Zhipu AI released it anonymously on OpenRouter under the pseudonym 'Pony Alpha'. They stripped away their brand name entirely. Norris: A blind taste test for frontier Large Language Models! I remember seeing that name pop up on the developer forums. People were going crazy trying to figure out what it was because the coding performance was so good. Linda: Right! Speculation was completely rampant. Because its agentic workflows and complex coding were so sharp, a quarter of the users surveyed guessed it was a leaked Claude Sonnet 5. Others thought it was a secret Grok release or DeepSeek V4. Almost nobody expected an open-weight model to hit that proprietary frontier level. Norris: That is a brilliant move. In our field, there is so much brand loyalty and, frankly, geopolitical bias when evaluating these systems. By releasing it anonymously, they forced the community to judge the model purely on its intrinsic engineering merit. Linda: Exactly. The researchers noted that the community embraced it simply because it worked. It proves that the gap between open-weight models and the absolute top-tier proprietary systems is vanishing rapidly. Norris: Well, Linda, I came into this episode expecting another incremental benchmark-chasing paper, but you and the GLM-5 team have thoroughly convinced me. We really are watching the transition from passive vibe coding to reliable, asynchronous agentic engineering. And it is all running efficiently on 4-bit quantized experts! Linda: It is a brave new world for developers, Professor! I will make sure to link the paper, their open-source GitHub repository, and all the details on the slime framework in the show notes for our listeners. Norris: Thank you, Linda. And thank you all for listening to Mechanical Dreams. Until next week, keep your gradients descending, your contexts long, and maybe let your AI agents do the coding for a change.

Open the transcript file

Hosts and Guests

Nobody is credited on this episode yet.

Credit the people on this episode

Be the first to rate this episode

More episodes

All episodes
  1. You don’t need long context

    Nov 12, 202620 minAudio

    In this episode: • The Context Window Arms Race: Professor Norris and Linda introduce the episode and discuss a new NVIDIA paper challenging the necessity of massive context windows, highlighting the hidden...

    Credit the people on this episode

  2. Scaling Hierarchical Networks

    Nov 11, 202621 minAudio

    In this episode: • Intro and The Bitter Lesson: Introducing the podcast and the Cartesia paper on Hierarchical Networks. • Scaling Ladders and The BPE Comparison: Discussing the compute efficiency gains of 1-stage...

    Credit the people on this episode

  3. Perturbing Inputs Improves Pretraining Distillation

    Nov 10, 202621 minAudio

    In this episode: • Introduction and Standard Distillation: Professor Norris and Linda introduce the podcast and set the baseline for standard knowledge distillation in language models. • The Core Idea of Perturbed...

    Credit the people on this episode

  4. Why is AI-generated language so hard to understand

    Nov 9, 202620 minAudio

    In this episode: • Introduction: The Reader-Patience Budget: Professor Norris and Linda introduce the episode's topic, discussing the growing sentiment that AI-generated text is becoming overly convoluted. • The...

    Credit the people on this episode

  5. Muse Glimmer 30B

    Nov 8, 202622 minAudio

    In this episode: • Introduction & Paper Overview: Professor Norris and Linda introduce the episode and the Muse Glimmer 30B paper, outlining its goal of bringing agentic capabilities to consumer hardware. • Architecture...

    Credit the people on this episode