Skip to content
0:00 / 0:00

#glitchtokens#tokenization#gpt-3

Glitch Tokens - Computerphile

Computerphile

2.6M subscribers • 66 videos on Hallway

YouTube
  • Recommended by 2 people: 2 on Hacker News.
  • Presented by Rob Miles, AI safety researcher

Beginner. No background in the topic needed.

352K views3 years ago2 recommendations

AI and machine learningTransformers and LLMsAI safety and impact

Rob Miles explains how glitch tokens arise in large language models due to discrepancies between tokenizer training data and model training data.

Language Models' Achilles heel: Rob Miles talks about "glitch" tokens, those mysterious words which, which result in gibberish when entered into some large language models. More from Rob Miles: bit.ly/Rob_Miles_YouTube The AI safety/alignment post: alignmentforum.org/posts/aPeJE8bSo6rAFoLqg/solidgoldmagikarp… facebook.com/computerphile twitter.com/computer_phile This video was filmed and edited by Sean Riley. Computer Science at the University of Nottingham: bit.ly/nottscomputer Computerphile is a sister project to Brady Haran's Numberphile. More at bradyharan.com

Why it's here

2 people recommend this

What people say. Recommended as an exceptionally clear and entertaining explanation of LLM tokenization and the origin of glitch tokens.

non-on Hacker News • Recommends

On “OpenAI Tokenizer”

I found this tool recently when it was linked from this Computerphile video1 about "glitch tokens". tldw: Certain junk data was thrown out post-tokenization e.g. the /r/counting2 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 link to this video 2 link

weinzierlon Hacker News • Recommends

On “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. link to this video

chiion Hacker News • Mentions

On “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 : link to 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).

Der_Einzigeon Hacker News • Mentions

On “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 link to this video 3. BPE has a lot of terrible vocabulary choices independent of Glitch Tokens. Lots of massive punctuation, garbage sequences, etc.

chaoraceon Hacker News • Mentions

On “Google Translate “Get well [Swedish firstname]” translates to “fuck you””

This reminds me of the recent so-called "Glitch Token" phenomenon1. 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…

veidron Hacker News • Mentions

…en already outperform "random human being coworker or uncle" at recommending just about anything... which is like Ted Chiang said2, “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: link to this video 2: link…

dale_glasson Hacker News • Mentions

On “What Reddit Got Wrong”

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