HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

Glitch Tokens - Computerphile

Computerphile2 HN recommenders · recommended in 2 months, 2023-2023
YouTube
353K views · 3 years ago · explainer · dated

Rob Miles explains "glitch" tokens, odd strings in large language model vocabularies that make the model produce gibberish. He covers how they likely arise from tokenizer training data, such as Reddit usernames, that never appeared in the model's own training.

HN points to it as the accessible explanation of why glitch tokens exist whenever tokenizers or odd GPT behavior come up.

LLMs & generative AIComputer vision, speech & NLP#glitchtokens#tokenizers#gpt#aisafety#bpe

7 comments from Hacker News

@dale_glass2023 · in “What Reddit Got Wrong”

It is well known, yes. This was discussed a way back during the whole glitch tokens deal: ▶ this video A bunch of those, like " SolidGoldMagikarp" are Reddit users.

CitesView on HN
@veidr2023 · in “”

That is indeed the funniest (and slightly horrifying) thing. Even if you understand "glitch tokens"[1] (which is BTW the best way I've seen to explain to nontechnicals (hi, Dad!!) and also some subset of technicals (hi various friends of mine!! +_+...) that LLM applied statistics models aren't anything like sentient AGI)... ...regardless, ChatGPT and its ilk nevertheless do often already outperform "random human being coworker or uncle" at recommending just about anything... which is like Ted Chiang said[2], “That’s more a statement about how much bullshit we are required to generate and deal with in our daily lives.” Although he was not referring to inputs from your (dumbass) coworkers/uncles, it still holds true. [1]: ▶ this video [2]: link

CitesView on HN
@weinzierl2023 · in “Understanding GPT Tokenizers”

Computerphile has an interesting video about Glitch Tokens, but as it goes with Computerphile videos it's also a good introduction to the topic. ▶ this video

RecommendsView on HN
@chaorace2023 · in “Google Translate “Get well [Swedish firstname]” translates to “fuck you””

This reminds me of the recent so-called "Glitch Token" phenomenon[1]. When GPT-3 was presented with reserved tokens it never encountered during training, it reacted in extremely unpredictable ways -- often with a simple "fuck you". For those unfamiliar with LLM architecture: "tokens" are the smallest unit of lexical information available to the model. Common words often have their own token (e.g.: Every word in the phrase "The quick brown fox jumped over the lazy dog" has a dedicated token), but this is a coincidence of compression and not how the model understands language (e.g.: GPT-3 understands "defenestration" even though it's composed of 4 apparently unrelated tokens: "def", "en", "est", "ration"). The actual mechanism of understanding is in learned associations between tokens. In other words: the model understands the meaning of "def","en","est","ration" because it learns through training that this cluster of tokens has something to do with the literary concept of violently removing a human via window. When a model encounters unexpected arrangements of tokens ("en","ration","est","def"), it behaves much like a human might: it infers the meaning through context or otherwise voices confusion (e.g.: "I'm sorry, what's 'enrationestdef'?"). This is distinctly different from what the model does when it encounters a completely alien form of stimulation like the aforementioned "Glitch Tokens". At the risk of anthropomorphizing, try imagining if you were having a conversation w

CitesView on HN
@Der_Einzige2023 · in “Semantic Tokenizer for Enhanced Natural Language Processing”

Yup. There are so many reasons why BPE is an issue: 1. It really hurts the ability to generate creative writing/poetry (e.g. impossible for even ChatGPT-4 to fully understand syllable counts, leading to incorrect haikus and even poor rhyming), see link and link 2. It means that silly stuff like "Glitch Tokens" are a huge issue. i.e. whole tokens dedicated to weird usernames caused by people counting on a counting subreddit so much that their names got their own token. See ▶ this video 3. BPE has a lot of terrible vocabulary choices independent of Glitch Tokens. Lots of massive punctuation, garbage sequences, etc.

CitesView on HN
@non-2023 · in “OpenAI Tokenizer”

I found this tool recently when it was linked from this Computerphile video[1] about "glitch tokens". tldw: Certain junk data was thrown out post-tokenization e.g. the /r/counting[2] community data and debug logs from Rocket League some tokens specific to those contexts stuck around, however, and are now like "a color you've never seen before" as far as GPT-X models are concerned giving the model one of these "glitch" tokens causes it to kind of freak out and return gibberish or some completely random response because it has not encountered them during training, because they were removed when the data was cleaned. [1] ▶ this video [2] link

RecommendsView on HN
@chii2023 · in “Show HN: Alpaca.cpp – Run an Instruction-Tuned Chat-Style LLM on a MacBook”

The reason, i suspect, that this method won't work, is because the training dataset has knowledge embedded in it, regardless of whether you think it only contains in-context logic. The evidence is that there are these "glitched" tokens : ▶ this video if you watched to the end of that video, it explores a very plausible reason why such glitched tokens exist - it is because the training dataset has a bunch of "nonsense" (a large dump of the subreddit that just counts a number, as well as various other "data"). So my hypothesis is that if you attempted the in-context logic training dataset, it would produce large number of glitched tokens (different ones, but equally as "illogical" to the user).

CitesView on HN
Let's build the GPT Tokenizer2:13:35

Let's build the GPT Tokenizer

Andrej Karpathy
1.3M views • 2 years ago
ChatGPT with Rob Miles - Computerphile36:02

ChatGPT with Rob Miles - Computerphile

Computerphile
517K views • 3 years ago
AI Language Models & Transformers - Computerphile20:39

AI Language Models & Transformers - Computerphile

Computerphile
354K views • 7 years ago
Ch(e)at GPT? - Computerphile13:52

Ch(e)at GPT? - Computerphile

Computerphile
617K views • 3 years ago
GPT3: An Even Bigger Language Model - Computerphile25:57

GPT3: An Even Bigger Language Model - Computerphile

Computerphile
446K views • 6 years ago
GPT-4chan: This is the worst AI ever19:20

GPT-4chan: This is the worst AI ever

Yannic Kilcher
1M views • 4 years ago
Deadly Truth of General AI? - Computerphile8:30

Deadly Truth of General AI? - Computerphile

Computerphile
941K views • 11 years ago
A Hackers' Guide to Language Models1:31:13

A Hackers' Guide to Language Models

Jeremy Howard
580K views • 3 years ago
The spelled-out intro to language modeling: building makemore1:57:45

The spelled-out intro to language modeling: building makemore

Andrej Karpathy
1.3M views • 4 years ago
Let's build GPT: from scratch, in code, spelled out.1:56:20

Let's build GPT: from scratch, in code, spelled out.

Andrej Karpathy
8.2M views • 3 years ago
The Inside Story of ChatGPT’s Astonishing Potential | Greg Brockman | TED30:10

The Inside Story of ChatGPT’s Astonishing Potential | Greg Brockman | TED

TED
1.9M views • 3 years ago
State of GPT | BRK216HFS42:40

State of GPT | BRK216HFS

Microsoft Developer
785K views • 3 years ago
Sparks of AGI: early experiments with GPT-448:32

Sparks of AGI: early experiments with GPT-4

Sebastien Bubeck
1.8M views • 3 years ago
StrictlyVC in conversation with Sam Altman, part two (OpenAI)38:59

StrictlyVC in conversation with Sam Altman, part two (OpenAI)

Connie Loizos
254K views • 3 years ago
I tried using AI. It scared me.15:49

I tried using AI. It scared me.

Tom Scott
8.5M views • 3 years ago
Transformers, the tech behind LLMs | Deep Learning Chapter 527:14

Transformers, the tech behind LLMs | Deep Learning Chapter 5

3Blue1Brown
11.6M views • 2 years ago
Deep Dive into LLMs like ChatGPT3:31:24

Deep Dive into LLMs like ChatGPT

Andrej Karpathy
10.2M views • 1 year ago
I made an GPT-powered Linux shell that guesses your bash command (and hallucinates crazy stuff)4:41

I made an GPT-powered Linux shell that guesses your bash command (and hallucinates crazy stuff)

River's Educational Channel
39K views • 5 years ago
Invited Talk - Guy Steele1:07:22

Invited Talk - Guy Steele

ClojureTV
39K views • 9 years ago
GradIEEEnt half decent: The hidden power of imprecise lines55:02

GradIEEEnt half decent: The hidden power of imprecise lines

suckerpinch
391K views • 3 years ago