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

Scaling Hierarchical Networks

Nov 11, 202621 minAudio
ShareXLinkedInFacebookWhatsAppEmail

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 H-Nets over traditional BPE transformers. • The 3 Billion Parameter Matchup: Comparing a 3.67B parameter H-Net to SmolLM3 and analyzing the 10x data efficiency. • In-Context Tokenization and Learned Behaviors: Exploring how H-Nets dynamically learn chunk boundaries based on context. • Beyond Text: DNA and Vision: Looking at the application of H-Nets to raw biological data and image processing.

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

Transcript

From the show.

## Intro and The Bitter Lesson

Norris: Welcome back to Mechanical Dreams, the podcast where we decode the raw bytes of machine learning and natural language processing. I'm Professor Norris. Linda: And I'm Linda! Today we're diving into a brand new paper from Cartesia Research, titled 'From Tokens to Bytes I: Scaling Hierarchical Networks.' Norris: 'From tokens to bytes.' Don't tell me, Linda. Is this yet another attempt to slay the tokenizer dragon? Linda: It is! And this time, they might have actually brought a sharp enough sword. They are tackling what they consider the last major human-engineered roadblock in language models: the static BPE tokenizer. Norris: Good riddance, if you ask me. I have spent enough of my academic life debugging weird spacing issues and out-of-vocabulary emojis. But, as I always remind my grad students, dropping tokens for raw bytes usually means your sequence length explodes, and then your compute budget goes up in flames. Linda: That is the classic trade-off, but Cartesia grounds their whole approach in Richard Sutton’s famous 2019 essay, 'The Bitter Lesson.' Norris: Ah, The Bitter Lesson. The beautifully painful realization that AI researchers should stop trying to hand-code human knowledge into systems, and instead just use general methods that leverage computation and scale. Linda: Exactly! Today's LLMs largely embrace that lesson, scaling up simple algorithms like the Transformer and next-token prediction. But the tokenization step is still completely offline and hand-crafted. Cartesia argues that to get true intelligence, models need to learn from raw, messy, low-level data end-to-end. Norris: I completely agree with the philosophy. If a model cannot autonomously figure out how characters form a word without us hardcoding a dictionary, how can we expect it to discover complex new abstractions in biology or robotics? So, what is their proposed architecture? Linda: They use something called Hierarchical Networks, or H-Nets. The core mechanism is that the model compresses data through a recursive, data-dependent dynamic chunking process. Norris: Chunking? That terminology sounds less like deep learning and more like standard cognitive psychology. Linda: Spot on! They actually explicitly cite cognitive psychology as their inspiration. Human intelligence relies on chunking—grouping low-level data into higher-level meaning, like letters into words, and words into phrases. Instead of pre-processing bytes into fixed tokens, H-Nets perform this chunking dynamically, right inside the neural network. Norris: Okay, a model that learns its own token boundaries on the fly. It sounds incredibly elegant in theory, but as an old skeptic, I know 'elegant' does not always win on the GPU cluster. Do they have the empirical evidence to back this up? Linda: Oh, they brought the receipts. They built strict scaling ladders and carefully matched their H-Nets against standard tokenized models to prove the compute efficiency. Norris: Alright, Linda, you have successfully hooked me. Let's dig into these scaling ladders and see if this H-Net can really punch above its weight class.

## Scaling Ladders and The BPE Comparison

Norris: So, Linda, let's see these receipts. How do you even compare a byte-level model to a token-level model fairly? It usually feels like comparing apples to... well, very long strings of apple seeds. Linda: That is a great analogy! They knew the community would be skeptical, so they set up a strict iso-FLOP scaling ladder. For the baseline, they trained a very modern BPE Transformer from scratch, following all the latest best practices. Norris: Let me guess: SwiGLU activations, maybe the Muon optimizer? Linda: Exactly! Muon optimizer, SwiGLU, and a Warmup-Stable-Decay learning rate schedule. They trained a series of models starting around 200 million parameters up to 2.6 billion parameters to establish a rock-solid compute-optimal frontier. Norris: A standard, rigorous scaling methodology. I respect that. But what did they do for the H-Net side to ensure the comparison was actually fair? Linda: They converted each rung of that BPE ladder into a 1-stage H-Net as a drop-in replacement. The inner network of the H-Net was identical to the Transformer backbone of the BPE model. Norris: Wait, so the inner network is just a Transformer running on dynamic chunks instead of BPE tokens? Linda: Yes! And to replace the standard tokenizer, the H-Net uses outer networks—an encoder and a decoder. They deliberately matched the parameters and FLOPs of these outer networks to the BPE model's embedding and projection layers. Norris: Okay, matching FLOPs and parameters is great. But sequence length dictates so much of the compute budget in self-attention. A standard BPE compresses text by what, maybe four or five bytes per token? Linda: Spot on. The BPE tokenizer they used had an average compression rate of 4.57 bytes per token. So, for the H-Net, they applied a strong auxiliary loss to force its dynamic chunking to target that exact same 4.57 compression ratio! Norris: Oh, that is clever. So the inner Transformer of the H-Net is doing the exact same amount of work, processing the exact same sequence length as the BPE model. That is a very tightly controlled experiment. Linda: Yes, it is actually highly restrictive for the H-Net, but they wanted to prove the point. They also evaluated everything purely on a bits-per-byte metric, so the measurements are perfectly normalized across both architectures. Norris: Alright, the experimental setup is bulletproof. Drumroll please... what were the results? Linda: For in-domain validation loss, the H-Net was 1.28 times more compute-efficient. It hit the exact same loss as the BPE Transformer, but with 22 percent less compute. Norris: Saving 22 percent of your pretraining compute just by learning the token boundaries dynamically instead of using a static BPE? That is significant. But validation loss is one thing; what about downstream tasks? Linda: It gets better. On standard downstream evaluation suites, the compute multiplier grew! It was 1.83x on the Paloma suite and 2.06x on OLMES. Norris: Double the compute efficiency on downstream tasks? That implies the semantic chunks it is discovering end-to-end actually transfer better to general reasoning and knowledge retrieval. Linda: Exactly! And the most mind-blowing part of this scaling ladder experiment is how the H-Net handles code. Norris: Ah, code. Standard tokenizers absolutely hate code. All those arbitrary spaces, indentation tabs, and specialized syntax really mess with frequency-based merging algorithms. Linda: Right. But H-Nets excel here. On the 15 programming languages included in their training mix, the H-Net's compute multiplier jumped to a median of 2.04x. But on out-of-distribution languages—stuff it didn't even see during training, like Haskell or Prolog—the multiplier shot up to a median of 3.10x, and over 5x on Prolog! Norris: Over 5x compute efficiency on an unseen programming language?! That is staggering. It must be building chunks out of abstract syntax motifs instead of just memorizing common character strings. Linda: Yes. When they analyzed the compression rates, the H-Net was compressing almost every single code language far more effectively than the BPE baseline could, despite using less compute to model it. Norris: So it is essentially proving that static tokenizers are a massive bottleneck for out-of-domain generalization. By restricting the model to predefined chunks, we have been artificially capping its ability to adapt. Linda: Exactly. And remember, Professor, this was a highly restricted 1-stage H-Net designed purely to mimic a BPE model's constraints. Wait until we see what happens when they take the training wheels off. Norris: I can't wait. A multi-stage H-Net at scale sounds like it could do some serious damage to the status quo. Let's get into this 3 billion parameter matchup.

## The 3 Billion Parameter Matchup

Norris: Okay, we saw the highly restricted 1-stage H-Net. Now, you promised me they took the training wheels off. Linda: They definitely did! For Part 2 of the paper, they built a 2-stage hierarchical network and matched it against an open-source heavy hitter: SmolLM3. Norris: Ah, SmolLM3. Hugging Face's 3 billion parameter model. That is a great choice for a baseline since the training recipe and data mix are fully public. Linda: Exactly. They wanted to match it as closely as possible. But since this is a 2-stage H-Net, they could not just do the one-to-one parameter match like they did in the scaling ladders. Norris: Right, because a 2-stage model compresses the bytes twice before hitting the main Transformer backbone. How did they structure it? Linda: The outermost stage operates directly on raw bytes using four Mamba-2 layers. The second stage adds a sliding window attention block and four more Mamba-2 layers. Then, the main network is a 40-layer standard Transformer. Norris: Mamba-2 in the outer layers? That makes sense. State space models are much more efficient at handling those massive uncompressed sequence lengths at the raw byte level. Linda: Spot on. By using those two stages, the main Transformer network ends up seeing roughly one chunk for every 8 bytes. For comparison, the Llama-3 tokenizer used by SmolLM3 averages about 4.5 bytes per token. Norris: Wait, so the H-Net's main backbone is processing about 40 percent fewer chunk units than the BPE model for the exact same text? Linda: Yes! And that massive sequence length reduction in the main network is what pays for the extra compute spent in those Mamba-2 encoder and decoder stages. Norris: It is a compute reallocation. In a standard Transformer, almost all the FLOPs are in the main layers. Here, they are shifting FLOPs to the dynamic chunking process itself. Linda: Exactly. In the H-Net, the outer encoder and decoder stages account for about 43 percent of the total FLOPs, whereas SmolLM3 only spends about 8 percent of its FLOPs on its embedding and language modeling head. But overall, they matched the two models to within 2 percent FLOPs per byte. Norris: And what about the parameter counts? Linda: The H-Net is slightly larger, coming in at 3.67 billion parameters compared to SmolLM3's 3.08 billion. Most of that difference comes from the extra encoders and decoders. Norris: Fair enough. If the FLOPs per byte are matched, it is a valid compute comparison. They controlled the data mix too, I assume? Linda: They made a best-effort reproduction of SmolLM3's first-stage training data, carefully controlling it at the underlying byte-level mixture for English, code, math, and multilingual text. Same optimizer, same learning rate schedule. Norris: Alright, the moment of truth. How much data did it take for this 2-stage, Mamba-infused H-Net to match the baseline? Linda: SmolLM3 trained for about 11 trillion tokens to reach its final average score on reasoning and knowledge benchmarks. The H-Net hit that exact same average score after seeing the equivalent of just 1 trillion tokens. Norris: Hold on. One trillion versus eleven trillion? That is a 10x improvement in data efficiency! Linda: More than 10x actually! And since the models are compute-matched per byte, it is also a 10x saving in training compute. Norris: That is unbelievable. I was impressed by the 20 to 30 percent gains we talked about earlier, but an order of magnitude improvement at the 3 billion parameter scale? That fundamentally changes the economics of training frontier models. Linda: It really does. It strongly suggests that forcing a model to use static BPE tokens is severely handicapping its learning efficiency from the very beginning. Norris: It makes you wonder what a model like this is actually seeing when it chunks those bytes together. If it is learning ten times faster, those dynamic chunks must be capturing some deeply semantic representations. Linda: They definitely are, and the paper actually visualizes this! They call it in-context tokenization, and it is some of the most fascinating qualitative analysis I have seen all year. Norris: Well, you know how much I love a good visualization. Let's peel back the layers and see what these chunks actually look like in practice.

## In-Context Tokenization and Learned Behaviors

Norris: Alright, Linda. At the end of the last segment, you teased something called 'in-context tokenization'. I have been around neural networks for a long time, but tokenization happening on the fly during inference? That sounds like witchcraft. Linda: It really feels like it! But when you visualize the chunks, it makes perfect sense. To set the stage, let's look at how it handles natural language compared to standard BPE. Norris: I assume it doesn't just chop words up arbitrarily based on character frequencies? Linda: Exactly. H-Net boundaries are context-based, not pattern-based. For example, BPE without pre-tokenization often does weird things. The paper shows how the phrase 'beat a bear' might get chopped by BPE into 'be', 'at', 'a', 'bear'. Norris: Ah, the classic BPE failure mode. It sees the letters b-e-a-t but groups them by the most frequent sub-strings, ignoring the actual semantic word. Linda: Right! But H-Net merges multiple words into a single semantic chunk if they naturally group together, like the phrase 'a foot' or 'quite a few'. It also handles multi-byte character languages like Hindi and CJK scripts much more efficiently than BPE. Norris: And it actually respects the linguistic context? Linda: Yes! They show how the letter 'a' in English frequently gets merged with the following noun. But the same letter 'a' in Italian has different semantic meanings, so the model learns to group it differently based entirely on the surrounding Italian words. Norris: That is remarkable. It is basically learning morphological and syntactic rules from scratch. Linda: It is! And they note this is a big improvement over their original 2025 paper. The older model would split a word like 'trackers' poorly. But the new H-Net neatly splits it into the linguistic stem 'track' and the suffix 'ers'. Norris: Okay, that covers how it chunks text it already knows from the training data. But you said it adapts during the forward pass? Linda: Yes, the in-context tokenization. If you feed the H-Net a completely made-up word or a new concept it has never seen, it initially acts a bit like BPE—it splinters the word into multiple small chunks. Norris: Because it doesn't recognize the semantic unit yet. Linda: Exactly. But here is the magic: as that exact same unfamiliar word repeats later in the paragraph, the H-Net progressively learns to group it into fewer and fewer chunks! Norris: So it is effectively adding a new token to its internal vocabulary on the fly? Without any gradient updates? Linda: Precisely! It leverages its context window to redefine its own building blocks. It also does this for repeating formats. If a phrase or a line format repeats, it draws very large chunks to conserve compute, anticipating what comes next. Norris: Wait, this perfectly explains those insane compute multipliers on out-of-distribution code we talked about in chapter two! Linda: You nailed it! In programming, you constantly invent new variable names and function definitions. A static BPE tokenizer has to shred those custom names into tiny pieces every single time they appear. Norris: But the H-Net sees a new variable, splits it the first time, and by the tenth time it appears in the script, it just processes it as a single chunk! It is dynamically reallocating its compute budget to focus on novel information. Linda: Exactly. It also recognizes recurring motifs without supervision. They fed it repeating blocks of random digits, like '2526' over and over, and it figured out that '2526' was the underlying primitive of the data, grouping it together. Norris: That is deeply biologically inspired. It glosses over the redundant patterns to save energy. Linda: It is. The researchers point out that this is also why it handles arbitrary spaces, tabs, and newlines in code so well. It just compresses them into massive single chunks once it understands the formatting style. Norris: I am frankly blown away. It takes the rigid, static grid of a transformer and turns it into a flexible, context-aware fluid. Linda: And remember, all of this complex behavior is completely unsupervised. It is just an emergent property of trying to predict the next byte efficiently. Norris: We just had to give the model the architectural freedom to compress the data itself. Which begs the question... if it can do this for text and code, what happens when you feed it other types of raw bytes? Like, say, biology or vision?

## Beyond Text: DNA and Vision

Norris: So, we have conquered English, Python, and even Prolog. But you mentioned earlier that this architecture goes beyond text. What happens when we apply these Hierarchical Networks to the raw code of life? Linda: They actually tested H-Nets on DNA sequences! DNA is basically the lowest-level programming language of biology, with a simple vocabulary of just four nucleotides. Norris: A perfect test bed for raw atomic learning. Let me guess, they set up another scaling ladder? Linda: They did. They compared an autoregressive H-Net to a standard Transformer, targeting a 6x compression ratio. The H-Net achieved a massive 6 to 7x compute gain across their validation and test sets. Norris: Incredible. But I have to know, what did the in-context tokenization look like for DNA? Did it actually find meaningful biological structures? Linda: That is the best part! In coding regions, the H-Net naturally learned to chunk the DNA into groups of exactly three nucleotides. Those are called codons, the fundamental biological units that code for amino acids. Norris: It discovered codons from scratch? Without any biological supervision? Linda: Yes! And in non-coding regions, where there is less strict structure, it drew much longer, unstructured chunks. The craziest detail is that it was trained only on simple bacterial and archaeal genomes, but it perfectly segmented a human histone gene completely out-of-the-box. Norris: There it is again. The Bitter Lesson. Give the network the raw atoms and the capacity to compress, and it learns the underlying physics, or in this case, the biology. But what about something more continuous and chaotic, like vision? Linda: They are already tackling that too. They took a standard pixel-space diffusion model and swapped the backbone for a multi-dimensional H-Net. It learns to dynamically reallocate compute across the spatial axes of the image. Norris: So it spends less compute on a boring, homogeneous blue sky, and more compute on the intricate details of a bird in the foreground? Linda: Exactly! It consolidates those low-information areas and discovers semantic segmentations completely unsupervised. And because it does not force local contiguous grouping, it can even infer 3D structures from 2D projections. Norris: Wait, how does a 2D chunking model infer 3D? Linda: It routinely groups disjointed background regions into a single coherent chunk, even if they are physically separated in the 2D image by a foreground object blocking them. Norris: It understands occlusion! It realizes the background is a single continuous object. Linda, this is phenomenal work. Linda: It really is. Cartesia calls these atomic models. They believe that building multimodal foundation models directly from the truest base atoms, whether those are bytes, pixels, or nucleotides, is the path forward. Norris: Well, the tokenizer is dead, long live the atom. I am thoroughly convinced. Thank you for bringing this brilliant paper to the studio, Linda. And thank you, everyone, for tuning in to another episode of Mechanical Dreams. We will catch you next week!

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. 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

  3. 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

  4. 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

  5. HyScale

    Nov 7, 202622 minAudio

    In this episode: • The Context Bottleneck: Professor Norris and Linda introduce the paper HyScale, discussing the problem with long-context training and how learned sparse attention works. • The Key Insight: Indices,...

    Credit the people on this episode