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

Qwen3.8-Next

Sep 27, 202622 minAudio
ShareXLinkedInFacebookWhatsAppEmail

In this episode: • Welcome and the 1/9th FLOP Miracle: Linda introduces Qwen3.8-Next and its massive efficiency gains, hooking Dr. Norris. • Token Mixing with GDN and Sparse Attention: Discussing the Gated DeltaNet hybrid architecture and how Qwen Sparse Attention scales to long contexts. • The Gated Residual (GR): Norris is skeptical about widening the residual stream, but Linda explains the gating mechanism and how it boosts stability. • N-gram Embeddings & The Muon Optimizer: Exploring off-accelerator capacity scaling and why Muon needs special engineering like the Canzona framework. • Hyperparameters & Conclusion: The removal of batch-size warmup, the importance of joint optimization, and final takeaways.

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

Transcript

From the show.

## Welcome and the 1/9th FLOP Miracle

Norris: Welcome back to Mechanical Dreams, the podcast where we sift through the noise to find the signal in machine learning and natural language processing. I am your host, Professor Norris. Linda: And I am Linda! Grab your coffee, everyone, because today we are diving into a paper that completely rethinks how we scale language models and might just change how we budget for compute. Norris: Usually when you say that, Linda, it means I am about to learn that everything I was taught in the last decade is now obsolete. What paper are we looking at today? Linda: We are looking at a masterclass in model efficiency from the Qwen Team, titled On the Design of Qwen3.8-Next Architecture: Evaluation, Efficiency, and Training Stability. Norris: Qwen3.8-Next. I remember the good old days when model versions were integers. What is next? Qwen Pi? But jokes aside, the Qwen team has been shipping some incredibly strong open weights lately. What makes this particular architecture so special? Linda: The numbers on this one are absolutely staggering, Professor. They built a sparse mixture-of-experts model with 125 billion total parameters, but it only activates 6 billion parameters per token. And the kicker is that it matches the performance of their previous 397-billion parameter flagship model. Norris: Impressive, but sparse models matching dense performance is not exactly breaking news in the era of MoEs. I assume there is a catch with the training compute? Usually, you have to train these sparse models for way longer to make up for the activated parameter deficit. Linda: That is the miracle here! To hit that same performance, they used roughly one third of the activated parameters, one third of the training tokens, and if you do the math, roughly one ninth of the training FLOPs compared to the predecessor! Norris: Wait. One ninth? You are telling me they got an eighty-nine percent discount on their compute budget? I have been doing this a long time, Linda, and I know that you do not just shave off eighty-nine percent of your compute by tweaking a learning rate schedule or pruning a few attention heads. Linda: Exactly! And they proved the quality is there. They evaluated it on fourteen pre-training benchmarks spanning knowledge, STEM, reasoning, coding, and multilingual ability. The new base model actually leads the massive predecessor on eight of them and trails by at most 2.6 points on the remaining six. Norris: So it is not just a specialized model padded to look good on a single metric. It is a genuine, general-purpose base model. But getting there on a ninth of the FLOPs implies that either their previous flagship was horribly inefficient, or they found some fundamental structural breakthroughs. Linda: Definitely the latter. The authors point out that an architectural change touches three things at once: what the model can do on downstream tasks, what it costs to train and serve, and whether the training run remains optimal and stable at scale. They treated loss, benchmarks, efficiency, and stability as one giant joint design problem. Norris: That is a massive optimization surface. Usually, if you optimize for training throughput, you destabilize the training. If you optimize strictly for loss, your inference latency shoots through the roof. Ah, stability. The silent killer of large runs. You can have the most theoretically efficient architecture in the world, but if the loss spikes every two thousand steps and you have to constantly rewind checkpoints, your effective FLOPs go down the drain. Linda: Right, and one of the most interesting takeaways from this paper is that loss and downstream accuracy do not always move together. They highlight several places where optimizing just for the pre-training loss would have led to worse downstream performance. They had to constantly check real benchmarks alongside the loss curve. Norris: Now that is the kind of engineering pragmatism I love. Too many papers worship the loss curve as if it is the absolute ground truth of intelligence. So, how did they navigate all of these trade-offs to get this one ninth FLOP miracle? Linda: By being incredibly surgical. They introduced four major architectural changes, each targeting a specific bottleneck. They revamped the token mixing, widened the residual stream, added off-accelerator capacity through N-gram embeddings, and completely overhauled the optimization process with the Muon optimizer. Norris: Okay, I will admit, you have me completely hooked. You cannot just drop one ninth the FLOPs and walk away. Let us unpack these four changes. What is the first piece of the puzzle? Linda: The first major component is how they handle token mixing. They moved away from standard global attention everywhere and designed a hybrid using something called Gated DeltaNet.

## Token Mixing with GDN and Sparse Attention

Linda: Right. So, standard full self-attention is amazing for direct, content-based retrieval, but it has that infamous quadratic compute cost and linear key-value cache growth. Norris: The classic bottleneck. Over the years we have tried everything from sliding windows to linear attention to fix it, but you usually lose that sharp, exact token recall. Linda: Exactly! That is the tension the Qwen team is trying to resolve. Their solution is a layer-wise hybrid. They interleave three layers of Gated DeltaNet, or GDN, with one layer of full global attention. Norris: GDN. That is a recurrent architecture, is it not? Compressing the past into a fixed-size state matrix. Linda: Yes! But unlike purely additive linear attention, GDN uses a gated delta rule. It has a data-dependent decay gate and a write gate. This means it acts more like a targeted erase-and-write memory. Norris: Ah, I see. It estimates the value already associated with a key, and only writes the residual error. So repeated information does not just accumulate and blow up the state matrix. Linda: Spot on. Plus, they add a short depthwise causal convolution before the recurrence to give it a strong local inductive bias. But as you pointed out, any finite-state memory struggles to perfectly reproduce exact token-level retrieval. Norris: Hence the one full-attention layer every block of four. The GDN handles the heavy lifting of local context and sequence compression at linear cost, while the full attention steps in periodically to act as a precise retrieval mechanism. Very elegant. Linda: It really is. And here is a fun fact: they experimented with removing positional encoding, like RoPE, from those full-attention layers. During pre-training, there was almost no difference. Norris: Let me guess, the joint evaluation caught a problem later in the pipeline? Linda: Yes! Without positional encoding, the model exhibited a substantially higher rate of endless generation after post-training. It basically forgot how to terminate. So they kept RoPE in the full-attention layers. Norris: That right there is exactly why you cannot just stare blindly at a pre-training loss curve! But hang on, Linda. If they are scaling this to hundreds of thousands of tokens, won't that one full attention layer still become a massive bottleneck? Linda: It would. Which is why during continued pre-training, they swap out those full-attention layers for QSA, which stands for Qwen Sparse Attention. Norris: Ah, sparse attention. I have always found that tricky in practice. Finding the most relevant tokens to attend to usually requires an indexer, and computing those importance scores still takes quadratic time. Linda: Not this one! QSA uses a compressed lightweight indexer. Instead of scoring every single token, it partitions the keys into non-overlapping micro-blocks of four tokens. It averages them, and the indexer only scores these blocks. Norris: Oh, so if you compress the sequence by a factor of four, the indexing cost drops to O of n-squared divided by four. That is a massive reduction in overhead for long inputs. Linda: Massive! And they train this indexer using a two-stage process. First, they do dense distillation, basically teaching the lightweight indexer to mimic the full-attention token distribution. Then they move to sparse training, where the backbone adapts to the new sparse patterns. Norris: And does it preserve the model's intelligence? Often sparse attention degrades performance on complex reasoning tasks. Linda: It preserves it beautifully. The paper shows QSA matches or even beats the full attention baseline on most short-context benchmarks, but completely dominates on long-context retrieval, like the RULER benchmark at 1 million tokens. At a one million context length, QSA is 7.6 times faster in prefill and 4.9 times faster in decode. Norris: Seven point six times faster! You fix the quadratic bottleneck with a block-wise indexer, and suddenly a one million token context window is actually tractable in production. Linda: Exactly! They even reuse the sparse indices across speculative decoding steps to make the multi-token prediction module incredibly efficient. Norris: I am starting to see how they achieved that one ninth FLOP miracle. They just ruthlessly optimized every step of the token mixing. But earlier you teased something about widening the residual stream. I am very protective of my residual connections, Linda. Tell me they did not ruin them.

## The Gated Residual (GR)

Norris: So, before the break, you mentioned they widened the residual stream. As you know, Linda, I am very protective of my residual connections. The original design is elegant because it offers an unobstructed path for gradient flow. Why mess with it? Linda: Because in incredibly deep networks, standard pre-normalization actually attenuates the signal. Every block reads from the exact same stream, which means a feature written by an early layer has to fiercely compete with everything written by later layers. Norris: That is fair. Over the years, we have seen attempts to fix this, like Highway Networks or dense inter-layer connectivity. But you said the Qwen team widened the stream from one branch to four parallel branches. How exactly do they manage the read and write operations without creating a massive computational bottleneck? Linda: They introduced the Gated Residual, or GR. For the read operation, it takes all four branches, normalizes them independently using a Group RMSNorm, and applies an elementwise sigmoid gate. Then it averages those gated branches to form the input to the block. Norris: An elementwise sigmoid gate... okay, that explains the stability you teased earlier. Earlier you mentioned this model survived a 4x learning rate without loss spikes. The gate must be acting as a dynamic rescaling mechanism. Linda: Exactly! The paper explicitly notes that at high learning rates, networks usually stabilize by growing massive activation outliers. They become fragile. But with the GR, the multiplicative gate supplies that necessary rescaling directly. It keeps the activations bound and tames the gradient norms, which means they do not need explicit activation clipping like SwiGLU-clip. Norris: I love when a structural change elegantly solves an optimization problem. But wait, if you have four branches, you usually need a branch-mixing operator so the streams can talk to each other. Those matrix multiplications add up fast. Linda: That is the best part! They completely dropped the branch-mixing operator. They found that as long as the read and write operations are expressive enough, mixing the branches between blocks adds almost nothing to performance, but removing it saves a ton of memory traffic. Norris: No mixing? So a branch is only ever written to by a block, and read from by a block, but they never cross-pollinate directly. That makes the information flow incredibly easy to analyze. Did they track what the model actually uses those four branches for? Linda: They did! Because the branches do not mix, they could trace exact token paths. They found that the network naturally specializes the branches. Three of the branches stay local, mostly carrying short-range connections. Norris: And the fourth branch? Linda: The fourth branch becomes a dedicated long-range highway. It mostly preserves early outputs from the Gated DeltaNet layers and delivers them directly to the softmax attention layers deep in the network. Norris: Oh, that is brilliant! In our last chapter, we talked about how they use one global attention layer every four blocks to handle exact retrieval. This fourth branch acts like a dedicated fiber-optic cable, bypassing the recurrent compression and feeding raw early context right into those attention hubs. Linda: Precisely. And to make this even more hardware friendly, they store the residual state in FP8 precision. Because the gates tightly bound the magnitude of what is written, the values perfectly match the narrow dynamic range of FP8, halving the memory bandwidth required. Norris: FP8 residual streams, no mixing overhead, and targeted long-range routing. It really is a joint optimization of hardware efficiency and model expressivity. Did they try to push it even further? Linda: They did try to sparsify the writes. They attempted a setup where each block only writes to the two branches with the highest gate values, hoping to save even more memory. Norris: Let me guess. The pre-training loss looked fine, so they almost shipped it, but then the downstream benchmarks caught a regression? Linda: You are reading their minds, Professor! The pre-training loss and early benchmarks were almost unaffected, but generation quality degraded clearly after post-training. They note this as a critical case where pre-training metrics alone would have led to a disastrous decision. Norris: Another win for rigorous, multi-stage evaluation. Alright, so the backbone is a lean, mean, stable machine. But how do we scale the model's actual knowledge capacity without ruining our beautiful 1/9th FLOP budget? I believe you mentioned something about fetching memory from the CPU?

## N-gram Embeddings & The Muon Optimizer

Linda: Right where we left off! So to scale the model's capacity without inflating that 1/9th FLOP budget, they turned to N-gram embeddings. They added 51 billion parameters of embedding tables, and they keep them completely off the accelerator, in the host CPU memory. Norris: Host memory? Usually, querying the CPU over the PCIe bus during a forward pass is a death sentence for latency. How do they avoid stalling the GPUs? Linda: By being incredibly strategic about placement! They only placed a single N-gram embedding layer, and they put it exactly at Layer 2. Because N-gram lookups are deterministic based on the token context, the CPU can start fetching the embeddings asynchronously while the GPU is busy computing Layer 1. Norris: Ah, overlapping communication and computation. A classic systems trick, but beautifully applied. By the time Layer 2 needs the data, it is already sitting there waiting. So they get 51 billion parameters of capacity for essentially zero extra per-token FLOPs. Linda: Exactly! They even experimented with scaling the N-gram vocabulary size up to 200 times the base size. But here is the fascinating part: the pre-training loss goes down monotonically as the vocabulary grows, but downstream benchmark performance actually saturates. Norris: Another victory for their joint optimization approach! If they had just stared at the loss curve, they would have wasted terabytes of RAM on bloated embedding tables. Now, let us pivot to the training itself. You teased earlier that they used the Muon optimizer. Muon uses Newton-Schulz iterations to orthogonalize the momentum matrix. It is mathematically elegant but a nightmare to engineer at scale. Linda: A nightmare is putting it mildly! The first major hurdle was fused parameters. In standard frameworks like Megatron, projections for Queries, Keys, and Values are concatenated into one giant matrix for efficiency. If you run Newton-Schulz on that fused matrix, what do you think happens? Norris: Well, you would be mixing singular directions across completely unrelated linear operators! You are essentially orthogonalizing the Query weights against the Value weights. That makes zero mathematical sense. Linda: Exactly! It actually hurts performance. So they had to build custom logic to split the fused gradients, run the Newton-Schulz iteration on each sub-matrix independently, and then gather them back together before applying the update. Norris: That solves the math problem, but it introduces a massive distributed systems problem. Newton-Schulz requires a holistic update over the full parameter matrix. If your weights are sharded across hundreds of GPUs using Tensor and Data Parallelism, the unequal matrix sizes are going to leave severe stragglers waiting around. Linda: Which is why they developed Canzona! It is an asynchronous framework that completely decouples the logical optimizer assignment from the physical parameter layout. It reassigns whole parameters to equalize the FLOPs across data-parallel ranks. Norris: So Canzona temporarily reconstructs the matrix via an All-to-All communication, runs the optimizer step as if it were on a single device, and then scatters it back? That is brilliant. Linda: Yes! And because splitting the matrices creates a ton of tiny sub-matrices, the optimizer step became bounded by kernel launch overhead. To fix that, they captured the entire step in a CUDA graph. Norris: They really left no stone unturned. They fixed the architecture to be stable, and they engineered a custom distributed systems framework just to unleash this optimizer. I can only imagine what this level of stability did to their learning rate schedule. Linda: You are not going to believe it, Professor. All of this groundwork completely broke the traditional scaling laws for hyperparameters. And that brings us to the final piece of the puzzle.

## Hyperparameters & Conclusion

Norris: So, Linda, you left us on a cliffhanger. You said all this incredible engineering around the Muon optimizer and the Gated Residuals completely broke the traditional scaling laws? Linda: It really did! Because the new architecture and optimizer combination trains so much more stably than their previous generation, the old hyperparameter recipes were actually holding the model back. They refitted their scaling laws and found an entirely new optimal point. Norris: Let me guess. The extra stability allowed them to push the learning rate much higher, and the Canzona distributed setup pushed them toward massive batch sizes? Linda: Spot on. The scaling laws predicted substantially larger batch sizes and learning rates, with a slower learning rate decay over time. But the most shocking revelation was their decision to completely eliminate batch-size warmup. Norris: No batch-size warmup? That is practically an industry standard for large runs. If you start with a massive batch size on step one, you usually risk early divergence. Why scrap it? Linda: They found that with the Muon optimizer, decreasing the batch size below the predicted optimum actually incurs a performance penalty. During a warmup phase, the smaller batch size introduces higher gradient noise under the same learning rate, which hurts the early loss trajectory. Norris: Ah, that makes perfect sense. And since this is a sparse mixture-of-experts model, a small batch size means you are not routing enough tokens to each expert. You need a large batch right out of the gate to ensure every expert gets a diverse signal for early specialization. Linda: Exactly! When they tested it, the warmup runs required almost nineteen percent more optimizer steps just to consume the same token budget. That is a massive waste of wall-clock time, and it still resulted in a slightly worse final loss. So, they dropped the warmup entirely. Norris: That is the beauty of treating loss, efficiency, and stability as one coupled system. If they only looked at standard practices, they might have kept warmup out of habit. But tracking wall-clock time and optimizer step counts forced them to be pragmatic. Linda: And that is exactly how they conclude the paper. They emphasize that architecture, efficiency, and optimization cannot be designed in silos. Every time they tried a seemingly harmless shortcut, like sparse writes, or dropping positional encoding, or keeping batch-size warmup, their joint evaluation caught the flaw before it scaled. Norris: It is a phenomenal piece of work. The final result truly speaks for itself: a 125-billion parameter base model, activating only 6 billion parameters per token, matching the performance of a 397-billion parameter flagship, all for one ninth of the training FLOPs. Linda: It is a masterclass in full-stack model design. It proves that to push the frontier, we do not just need bigger GPU clusters; we need smarter, tightly integrated engineering from the underlying math all the way down to the hardware memory traffic. Norris: I could not have said it better myself. Thank you for bringing this paper in today, Linda. And thank you to all our listeners for joining us on this deep dive into the Qwen3.8-Next architecture. Linda: Thanks for tuning in, everyone! Keep optimizing, and see you next time! Norris: Until next week, this has been Mechanical Dreams.

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