LessWrong (30+ Karma)

“The Dark Arts of Tokenization or: How I learned to start worrying and love LLMs’ undecoded outputs” by Lovre


Listen Later

Audio note: this article contains 225 uses of latex notation, so the narration may be difficult to follow. There's a link to the original text in the episode description.

Introduction

There are _208_ ways to output the text ▁LessWrong[1] with the Llama 3 tokenizer, but even if you were to work with Llama 3 for thousands of hours, you would be unlikely to see any but one. An example that generalizes quite widely: if you prompt Llama 3.2 3B Base with the text You're interested in rationality and AI? You should visit, there is a _approx 22.7003%_ chance that it outputs the text ▁LessWrong, of which

  •  _approx 22.7001%_ is that it outputs exactly the tokens ▁Less and Wrong,
  • _approx 0.00024%_ that it outputs exactly the tokens ▁Less, W, and rong,
  • and _approx 0.000017%_ chance that it outputs any of the other _206_ tokenizations which result in the text ▁LessWrong.
All _208_[2] possible tokenizations of  LessWrong, the [...]

---

Outline:

(00:26) Introduction

(05:38) A motivating example

(07:23) Background information on tokenizers

(08:40) Related works

(12:05) Basic computations with Llama 3 tokenizer

(14:31) Constructing a distribution over all tokenizations of a string

(15:05) To which extent do alternative tokenizations break Llama?

(15:31) ARC-Easy

(20:28) A little bit of introspection

(22:55) Learning multiple functions redux, finally

(25:44) Function maximizer

(29:42) An example

(30:48) Results

(31:23) What I talk about when I talk about both axes

(32:59) Encoding and decoding bits

(35:56) Decoding

(36:44) Encoding

(38:54) Could the usage of alternative tokenizations arise naturally?

(41:38) Has it already happened?

(43:27) Appendix: The psychological effects of tokenization

The original text contained 18 footnotes which were omitted from this narration.

---

First published:

October 17th, 2025

Source:

https://www.lesswrong.com/posts/g9DmSzHxJXBD9poJR/the-dark-arts-of-tokenization-or-how-i-learned-to-start

---

Narrated by TYPE III AUDIO.

---

Images from the article:

Apple Podcasts and Spotify do not show images in the episode description. Try Pocket Casts, or another podcast app.

...more
View all episodesView all episodes
Download on the App Store

LessWrong (30+ Karma)By LessWrong


More shows like LessWrong (30+ Karma)

View all
Making Sense with Sam Harris by Sam Harris

Making Sense with Sam Harris

26,320 Listeners

Conversations with Tyler by Mercatus Center at George Mason University

Conversations with Tyler

2,451 Listeners

The Peter Attia Drive by Peter Attia, MD

The Peter Attia Drive

8,549 Listeners

Sean Carroll's Mindscape: Science, Society, Philosophy, Culture, Arts, and Ideas by Sean Carroll | Wondery

Sean Carroll's Mindscape: Science, Society, Philosophy, Culture, Arts, and Ideas

4,178 Listeners

ManifoldOne by Steve Hsu

ManifoldOne

93 Listeners

Your Undivided Attention by The Center for Humane Technology, Tristan Harris, Daniel Barcay and Aza Raskin

Your Undivided Attention

1,601 Listeners

All-In with Chamath, Jason, Sacks & Friedberg by All-In Podcast, LLC

All-In with Chamath, Jason, Sacks & Friedberg

9,922 Listeners

Machine Learning Street Talk (MLST) by Machine Learning Street Talk (MLST)

Machine Learning Street Talk (MLST)

95 Listeners

Dwarkesh Podcast by Dwarkesh Patel

Dwarkesh Podcast

512 Listeners

Hard Fork by The New York Times

Hard Fork

5,507 Listeners

The Ezra Klein Show by New York Times Opinion

The Ezra Klein Show

15,930 Listeners

Moonshots with Peter Diamandis by PHD Ventures

Moonshots with Peter Diamandis

547 Listeners

No Priors: Artificial Intelligence | Technology | Startups by Conviction

No Priors: Artificial Intelligence | Technology | Startups

130 Listeners

Latent Space: The AI Engineer Podcast by swyx + Alessio

Latent Space: The AI Engineer Podcast

93 Listeners

BG2Pod with Brad Gerstner and Bill Gurley by BG2Pod

BG2Pod with Brad Gerstner and Bill Gurley

467 Listeners