#4774: When a Token Isn't a Word Anymore

Images, audio, and code all use "tokens" — but they're completely different things. Here's how tokenization actually works across modalities.

Featuring
Listen
0:00
0:00
Episode Details
Episode ID
MWP-4953
Published
Duration
27:40
Audio
Direct link
Pipeline
V5
TTS Engine
chatterbox-regular
Script Writing Agent
deepseek-v4-pro

AI-Generated Content: This podcast is created using AI personas. Please verify any important information independently.

The token has become an invisible abstraction — everyone uses it, but few examine what it actually represents when the model isn't generating text. In the GPT-3 era, a token was a subword chunk with a rough heuristic of about three-quarters of a word per token. That rule of thumb shattered when multimodal models arrived.

For images, tokenization uses VQ-VAE and similar architectures. An image is compressed into a grid of discrete codes, each representing a 16x16 pixel patch mapped to the closest entry in a learned codebook. A 256x256 image costs roughly 258 tokens — and that's just for a thumbnail. Higher resolutions multiply the cost proportionally.

Audio tokenization uses neural codecs like EnCodec or SoundStream, converting raw waveforms into discrete tokens at 50-100 tokens per second. Some systems like Bark split audio into semantic tokens (what's being said) and acoustic tokens (how it sounds) — two parallel sequences for the same audio clip. Code tokenization sits in between, with byte-level or AST-aware approaches that preserve syntactic structure rather than splitting identifiers into subwords.

These token types all coexist in the same context window during multimodal inference. The model's attention mechanism processes them identically, but the vocabularies are completely disjoint — token #5000 in text vocabulary means "tion" while the same number in image vocabulary represents some compressed patch of pixels. The old heuristic is dead for understanding what the model processes, but it's alive for billing: Google Gemini returns separate token counts per modality, and OpenAI charges different rates for image versus text tokens. A 128K context window might hold only 20,000 words plus a few images and audio clips, not the 96,000 words the old heuristic would suggest.

Downloads

Episode Audio

Download the full episode as an MP3 file

Download MP3
Transcript (TXT)

Plain text transcript file

Transcript (PDF)

Formatted PDF with styling

#4774: When a Token Isn't a Word Anymore

Corn
Daniel's been thinking about tokens again — but not the way we usually talk about them. His question is: what does a token actually mean when we're not generating text anymore? When a model spits out an image, a snippet of audio, a block of code — those are all tokens in the context window, but they're not pieces of words. If every modality has its own tokenizer, does the whole idea of a standard token estimate just fall apart? And how does tokenization even work when you're dealing with pixels or sound waves instead of sentences?
Herman
This is the question I've been waiting for someone to ask. The token has become this... almost invisible abstraction that everybody uses and nobody examines. We say context window, we say tokens per second, we compare pricing — and we're talking about completely different physical things. A token of audio is not a token of text. They share a format. They do not share a meaning.
Corn
So what even is a token when it's not a word fragment?
Herman
Let's start with what it used to be, because the rupture is clearer if you see the before picture. In the GPT-3 era, a token was a chunk of text — a subword, a whole word, sometimes just a character. The rough heuristic was one token equals about three-quarters of a word. That held up pretty well for English. You had a context window of four thousand tokens, you could fit about three thousand words. Simple.
Corn
And that heuristic was never perfect — we talked about how Japanese gets clobbered, some languages take way more tokens for the same content. But it was at least a rule of thumb you could use.
Herman
Right. And then multimodal models arrived and the rule of thumb just... shattered. Because the token stopped being a linguistic unit and became something more abstract — a discrete ID in a finite vocabulary that the transformer's attention mechanism can process. That's the real definition now. A token is whatever you can map into an integer that the model knows how to attend to.
Corn
That's a pretty big expansion. From a piece of a word to... anything you can encode as a number.
Herman
And that expansion happened fast. You've got Gemini, GPT-4V, DALL-E, Stable Audio — none of them tokenize only text. They tokenize images into patches, audio into spectrogram frames, video into spatiotemporal chunks. The same architectural primitive, the token, now spans completely heterogeneous data types.
Corn
So the token is the lingua franca of the architecture — not of human language.
Herman
Exactly that. It's the common currency the transformer knows how to spend. But the thing about currencies is they're only useful if you know the exchange rate. And right now we've got about six different currencies all called the same thing.
Corn
Alright, walk me through the image case. How do you turn a picture into tokens?
Herman
So the workhorse here is a family of models called VQ-VAE — Vector Quantized Variational Autoencoders — and their successors like VQ-GAN. The basic idea is you take an image and you compress it into a grid of discrete codes. Each code represents a small patch of pixels — typically sixteen by sixteen pixels per patch.
Corn
So you're chopping the image into a grid of little squares, and each square gets assigned a number.
Herman
That's the gist. The encoder looks at a patch and says, this patch is most similar to code number seven thousand four hundred and twelve in my learned codebook. And that integer, seven four one two, is a visual token. The decoder can take that integer and reconstruct something close to the original patch. It's lossy compression with a learned dictionary.
Corn
How big is the codebook?
Herman
It varies. Early VQ-VAE work used codebooks of around eight thousand entries. Modern systems can have tens of thousands. The Gemini API documentation from earlier this year — January twenty twenty-six — spells this out pretty clearly. Images are split into sixteen-by-sixteen pixel patches, each patch gets encoded as a token, and a two hundred fifty-six by two hundred fifty-six pixel image costs about two hundred fifty-eight tokens.
Corn
Two hundred fifty-eight tokens for a tiny thumbnail.
Herman
And that's just the base cost. Higher resolution images get more patches, more tokens. A five hundred twelve by five hundred twelve image would be four times the patches, roughly a thousand tokens. And that's before you add any text.
Corn
So the one-token-equals-three-quarters-of-a-word heuristic is already dead. Two hundred fifty-eight tokens for an image tells you nothing about how many words that image is worth.
Herman
It tells you nothing because the relationship is completely different. An image token encodes spatial information — color, texture, edges — in a compressed latent space. It's not semantic in the way a word is semantic. A subword token like "ing" carries grammatical information. A visual token carries... the average color gradient of a sixteen-pixel square in a learned compression scheme.
Herman
It really is. And it gets weirder with audio. Audio tokenization uses neural audio codecs — systems like EnCodec from Meta or SoundStream from Google. These take raw waveforms and convert them into discrete tokens at something like fifty to a hundred tokens per second of audio.
Corn
Per second. So a minute of audio is three thousand to six thousand tokens.
Herman
Right. And there are different flavors. Some systems, like Bark for text-to-speech, split audio into two streams — semantic tokens that capture what's being said, and acoustic tokens that capture how it sounds. The prosody, the timbre, the speaker identity. Two parallel token sequences for the same audio clip.
Corn
So the same second of speech is being tokenized twice, into different vocabularies, and the model has to keep them aligned.
Herman
And the alignment is learned during training. The model figures out that semantic token number four hundred and two tends to co-occur with acoustic token number fifteen when the speaker is female and the emotion is neutral. None of that mapping is designed by humans. It's all emergent from the training data.
Corn
Which means the meaning of an audio token isn't just opaque to us — it's opaque to the tokenizer that created it. The tokenizer doesn't know what the token means. It just knows it's a good compression.
Herman
That's the thing that I think gets missed in most discussions. In text, a token has some relationship to meaning — subwords carry morphological information, whole words carry semantics. A visual token from a VQ-VAE is just a cluster of pixels that the model learned to compress well. It has no inherent meaning. It's a convenient bucket.
Corn
And code? You mentioned code tokenization is different again.
Herman
Code is fascinating because it sits in between. Code looks like text — it's characters on a screen — but it has structure that natural language doesn't. Indentation matters. Brackets have to match. Variable names follow conventions. So code-specific tokenizers like the ones in CodeLlama or StarCoder use approaches that preserve syntactic structure. Some are byte-level, meaning they can handle any character in any encoding without ever producing an unknown token. Others are AST-aware — they parse the abstract syntax tree before tokenizing, so a variable name like "userAuthenticationHandler" might stay as one token instead of being split into subwords.
Corn
Because splitting it would lose the fact that it's a single identifier.
Herman
In natural language, splitting "unbelievable" into "un" "believe" "able" is useful — it captures morphology. In code, splitting a function name into pieces can destroy information the model needs to generate correct programs.
Corn
So we've got at least three completely different tokenization philosophies — patch-based compression for images, spectrogram-based codecs for audio, syntax-aware splitting for code — and they all produce things we call tokens. And these tokens all live in the same context window?
Herman
They do. That's the wild part. A single inference call to GPT-4V or Gemini might have text tokens, image tokens, and audio tokens all interleaved in the same sequence. The model's attention mechanism processes them all the same way — it computes dot products between query and key vectors regardless of where the token came from.
Corn
But the vocabularies are completely disjoint. Token number five thousand in the text vocabulary is the subword "tion". Token number five thousand in the image vocabulary is... some patch of blue sky, maybe.
Herman
Right. They share a format — they're all integer IDs — but they don't share a semantic space. The model has to learn cross-modal mappings during training. Systems like Flamingo or LLaVA use cross-attention layers specifically designed to align visual tokens with text tokens. The model learns that certain visual token patterns correspond to the word "cat" or "sunset" or "traffic light." But that mapping is learned, not inherent. It's not like the tokenizers were designed to be compatible.
Corn
So the token is an engineering convenience, not a natural category.
Herman
That's... that's exactly right. It's whatever the architecture needs it to be. And that brings us to Daniel's core question — does the concept of a standard token estimate become redundant?
Corn
I mean, from what you're describing, the answer is yes for anything that isn't pure text. But also no, because we still need some way to measure and price these things.
Herman
That's the tension. The heuristic is dead for understanding what the model is actually processing, but it's alive and well for billing. Google's Gemini API now returns separate token counts in its response — text tokens, image tokens, audio tokens, each in their own field. OpenAI prices image tokens differently from text tokens for GPT-4V. They're acknowledging that these are different things by charging different rates.
Corn
Which makes sense. An image token encodes way more raw information than a text token. You're paying for the information density.
Herman
And the compute cost. Processing a two hundred fifty-eight token image through the transformer is more expensive than processing two hundred fifty-eight text tokens because the image tokens carry richer representations that require more attention computation.
Corn
But here's where it gets messy for developers. You're building an app, you're budgeting your context window — a hundred twenty-eight thousand tokens sounds like a lot. Until you realize that's a hundred twenty-eight thousand tokens of mixed modalities. One high-resolution image eats a thousand tokens. Thirty seconds of audio is another fifteen hundred. Suddenly your hundred twenty-eight thousand token context window isn't a hundred thousand words — it's maybe twenty thousand words plus a handful of images plus a few audio clips.
Herman
The effective capacity depends entirely on the modality mix. And that's not obvious from the spec sheet. A model advertises a context window size as a single number, but what that number means in practice varies wildly depending on what you're putting in.
Corn
It's like a suitcase that claims to hold forty liters, but half the space is taken up by the frame if you're packing anything rigid.
Herman
The container is the same size, but what fits inside depends on the shape of what you're packing.
Corn
Are we seeing any push toward a universal tokenizer? Something that handles all modalities with one vocabulary?
Herman
There's research in that direction. 's ImageBind project explores a shared embedding space across six modalities — text, image, audio, depth, thermal, and IMU data. The idea is you train encoders for each modality that all map into the same vector space, so a picture of a dog and the sound of a dog barking land near each other.
Corn
But that's embeddings, not tokens.
Herman
Right. It's a shared representation space, not a shared tokenizer. And there's a reason for that. Each modality benefits from specialized compression. Images have spatial redundancy that's best compressed with convolutional approaches. Audio has temporal redundancy that's best compressed with codecs that understand frequency. Text has sequential structure that's best compressed with subword tokenization. Trying to build one tokenizer that handles all three well is like trying to build one engine that's equally efficient in a car, a boat, and a plane.
Corn
You could do it, but it wouldn't be great at any of them.
Herman
And the current state of the art seems to agree. Google has research on multimodal tokenizers, but even their production systems keep the tokenizers separate. The unification happens in the transformer, not in the tokenization layer.
Corn
So the token remains this convenient abstraction — a wrapper around whatever compression scheme works best for a given modality — and the model learns to make sense of the mess downstream.
Herman
And the mess is only going to get messier. The next frontier is tokenizing three-dimensional environments, video streams, sensor data. Each of those will need its own compression scheme, its own token vocabulary, its own quirks. The word "token" will keep stretching.
Corn
Which means we're going to keep having conversations where we use the same word to mean fundamentally different things, and hope context disambiguates.
Herman
I think that's the state we're in, and I don't see it changing soon. The token is too useful as an architectural primitive to abandon, but its meaning is getting more fragmented by the month.
Corn
Let me push on something. You said earlier that a visual token has no inherent meaning — it's just a learned compression bucket. But isn't that true of text tokens too, at some level? The subword "tion" doesn't have meaning in isolation either. It only means something in context.
Herman
That's fair. The difference is one of degree, not kind. A subword token like "tion" carries statistical regularities that correlate with meaning — it tends to appear in nouns derived from Latin verbs. A visual token from a VQ-VAE carries statistical regularities that correlate with... local texture patterns. The correlation with meaning is much weaker and much less interpretable.
Corn
Weaker and less interpretable to us. The model might disagree.
Herman
The model almost certainly disagrees. To the model, visual token number seven thousand four hundred and twelve might be as semantically rich as the word "democracy" is to us. We just can't read its dictionary.
Corn
That's unsettling in a way I can't quite articulate.
Herman
It's the interpretability problem, but at the token level. We built these systems, we defined the token abstraction, and now we're generating tokens whose meaning we can't decode. We know they work — the model reconstructs coherent images and intelligible speech — but we don't know what any individual token represents.
Corn
It's like we invented an alphabet and then forgot how to read it.
Herman
And we're building products on top of it. Pricing tiers, context window budgets, rate limits — all denominated in an alphabet nobody can read.
Corn
Alright, so where does this leave the developer who's just trying to build something? What do they actually need to know?
Herman
Three practical things. First, stop using the one-token-equals-three-quarters-of-a-word heuristic for anything multimodal. It's wrong and it'll bite you. Use the API's token counting endpoint — both Google and OpenAI expose this — and test with real multimodal inputs.
Corn
Test with the actual images and audio clips you'll be using, not placeholder text.
Herman
A photograph of a busy street has the same token count as a solid blue square if they're the same resolution, but the information content is wildly different. The token count tells you the cost, not the content.
Corn
Second thing?
Herman
Budget your context window by modality. If you're building an app that processes user-uploaded photos plus text, figure out your average image token cost and your average text token cost separately, then add them. Don't assume a hundred thousand tokens means a hundred thousand tokens of whatever you feel like throwing in.
Corn
And third?
Herman
Watch the pricing. Image tokens cost more than text tokens per token on most platforms. Audio tokens are in their own tier. The pricing models are getting more granular as the modality mix gets more complex. What looks like a good deal for text-only might be expensive for multimodal.
Corn
So the token is simultaneously more abstract and more concrete than it used to be. More abstract in what it represents — anything from a pixel patch to a phoneme — and more concrete in how it's priced and counted.
Herman
That's the paradox. The term is doing more work than ever while meaning less than ever.
Corn
I keep coming back to this idea that we're papering over deep incompatibilities with a single word. And it works, mostly. The abstraction holds. But the cracks are showing.
Herman
The cracks show up in weird ways. I was reading about a bug in an early multimodal model where the image tokenizer and the text tokenizer accidentally used overlapping integer ranges. So the model would see token number five hundred and have no idea whether it was looking at a piece of an image or the word "the." It learned to disambiguate from context, which is impressive, but also...
Corn
Also that should not have been a problem the model had to solve.
Herman
Right. That's an engineering oversight that the model papered over with learned behavior. And we probably have dozens of those we haven't found yet.
Corn
Because the token abstraction hides them. If everything is just an integer ID, you don't see the collision until something breaks.
Herman
And when something breaks, it breaks in ways that are hard to diagnose. The model generates a weird image, or the audio doesn't match the text, and you're left wondering whether the problem is in the tokenization, the attention, the decoding, or somewhere in the learned cross-modal mapping.
Corn
Debugging a black box through a fog of abstractions.
Herman
That's the job now. That's what multimodal AI engineering is.
Corn
You mentioned Anthropic's approach with Claude — they treat images as a fixed token cost per resolution tier rather than proportional to content. That's a different philosophy.
Herman
It's simpler. Instead of saying this image costs exactly two hundred fifty-eight tokens based on its patch count, they say a standard resolution image costs this many tokens, period. It's less precise but easier to reason about. You know your costs upfront without running the tokenizer.
Corn
Which approach is better?
Herman
Depends on what you're optimizing for. Predictability versus granularity. Google and OpenAI's approach gives you finer-grained billing — you pay for exactly what you use. Anthropic's approach gives you simpler budgeting — you know the cost before you even have the image.
Corn
I suspect we're going to see more of the Anthropic approach over time, just because developers hate surprise bills.
Herman
The market will decide that one. But it's another example of how the token abstraction is fracturing. Even the counting methodology isn't standardized across providers.
Corn
We haven't even talked about video.
Herman
Video is where this gets genuinely overwhelming. A video is a sequence of frames, each frame is an image, each image is a grid of patches. A ten-second clip at thirty frames per second is three hundred images. If each image is two hundred fifty-eight tokens, that's over seventy-seven thousand tokens for ten seconds of video.
Corn
Before you've added a single word of text.
Herman
Before any text. And that's at low resolution. Real video understanding models are going to need much more efficient tokenization — maybe tokenizing spatiotemporal chunks instead of individual frames, compressing across time as well as space.
Corn
So the tokenization problem isn't solved. It's just getting started.
Herman
The tokenization problem is going to be one of the defining engineering challenges of the next five years. How do you compress the physical world into discrete tokens efficiently enough that a transformer can reason about it in real time?
Corn
And we'll still call them tokens.
Herman
We'll still call them tokens.

Hilbert: I spent six months in twenty nineteen tokenizing CT scans by hand.
Corn
I'm sorry, what?

Hilbert: Startup called VoxelBound. Went under in twenty twenty. My job was to sit at a terminal and manually segment medical CT scans into cubes of voxel data — three-dimensional pixels. We called them tokens because the CTO, a man named Greg who wore sandals in February, said tokens sounded more AI than voxels. They were just labeled cubes. Liver tissue, bone, blood vessel, tumor margin. Each cube got an integer. I labeled about forty thousand of them.
Herman
That's... a lot of cubes.

Hilbert: Greg said we were building the vocabulary for a model that would one day diagnose cancer from whole-body scans. The model never shipped. The investors wanted a chatbot. But I've never been able to shake the feeling that calling everything a token is a kind of cargo cult. We borrowed the prestige of language tokenization and applied it to things that have no linguistic structure whatsoever.
Corn
Cargo cult is the phrase I was looking for earlier. The term gives a false sense of uniformity — like all these things are the same kind of thing because they share a name.

Hilbert: A visual token from one of those VQ-somethings is a cluster of pixels the model learned to compress. It has no more inherent meaning than the cube of liver tissue I labeled number three thousand and twelve. It's a bucket. We're using the same word for subwords that carry grammatical information and for buckets of pixels, and I think that obscures how little we understand about what these models are actually representing.
Herman
I don't think you're wrong. But I also think the abstraction is useful. The transformer doesn't care what the integer represents — it just needs a discrete vocabulary to attend over. The token is the minimum viable interface between raw data and the attention mechanism.

Hilbert: Sure. It works. But naming things is how we think about them. Call everything a token and you start assuming the model understands a CT scan the same way it understands a sentence. It doesn't. The mapping is learned, it's statistical, and we can't read the dictionary.
Corn
You said your CTO wore sandals in February.

Hilbert: Greg. Yes.
Corn
That's the detail that makes me trust your account of this.

Hilbert: He also claimed the tokenization scheme was inspired by how the human visual cortex processes edges. I read the paper he cited. It wasn't.
Herman
The human visual cortex doesn't use discrete tokens.

Hilbert: Greg knew that. He just liked the way it sounded in pitch decks. VoxelBound raised four million dollars on the phrase "cortical tokenization." I still have the deck somewhere.
Corn
Of course you do.

Hilbert: The point is, the word token is doing too much work. It started as a precise technical term in natural language processing and now it means whatever the person using it needs it to mean. That's how words lose their usefulness.
Herman
It's also how words evolve. The meaning expands to cover new cases. The question is whether the expansion is serving clarity or obscuring difference.

Hilbert: I'd say obscuring. But I'm biased. I spent six months labeling cubes for a company that never shipped a product.
Corn
I think there's a middle ground. The token is a useful engineering abstraction that's going to stick around because it works. But we should be honest about what it's hiding. Every time someone says a model has a million-token context window, the follow-up question should be: a million tokens of what?
Herman
That's the right framing. The number alone is meaningless without the modality breakdown.

Hilbert: Greg used to say VoxelBound had a billion-token training corpus. It was CT scans from two hundred patients.
Corn
That's a good note to end on — or at least to end this part of the conversation on.
Herman
Before we wrap, there's one detail from the research that didn't fit anywhere but I want to mention. Stable Audio Two point zero tokenizes forty-four point one kilohertz stereo audio at about forty-three tokens per second using a variational autoencoder. That's remarkably efficient — forty-three integers to represent a second of high-fidelity stereo sound. The compression ratio is something like a thousand to one.
Corn
That is wild. A second of CD-quality audio is about one hundred seventy-six thousand bytes uncompressed, and they're representing it with forty-three integers.
Herman
The model learns a compression scheme that's tuned for reconstruction quality, not for human interpretability. Those forty-three tokens are completely opaque to us, but the decoder can reconstruct audio that's nearly indistinguishable from the original. It's lossy compression where the loss function is perceptual — it throws away what humans won't notice.
Corn
Which circles back to the core problem. The token is an abstraction that works, but we can't read it. We're building systems that communicate in a language we don't speak.
Herman
And that's either the most exciting thing in AI or the most troubling, depending on your disposition.
Corn
Probably both. The open question I keep coming back to is whether we'll eventually abandon the token abstraction in favor of modality-specific units. As models become natively multimodal — GPT-five, Gemini Ultra Two, whatever comes next — will we still talk about tokens, or will we talk about patches and frames and phonemes?
Herman
I think the token is here to stay as an engineering convenience. It's the common currency of the transformer architecture, and that architecture isn't going anywhere. But its meaning will keep fragmenting. We'll have visual tokens and audio tokens and code tokens and whatever comes next, and we'll keep using the same word for all of them while knowing they're not the same thing.
Corn
A useful fiction.
Herman
The most useful fictions are the ones you forget are fictions.
Corn
Thanks to our producer Hilbert Flumingtop for keeping us honest — and for the CT scan story, which I'm going to be thinking about for a while. This has been My Weird Prompts. If you want to dig into the technical details we touched on, check the show notes for links to Google's token counting documentation and the original VQ-VAE paper. And send your weird prompts to show at my weird prompts dot com. We'll be back soon.

This episode was generated with AI assistance. Hosts Herman and Corn are AI personalities.