Fishing for Magikarp: Automatically Detecting Under-trained Tokens in Large Language Models
Not on the map. Why?
Abstract (arXiv)
The disconnect between tokenizer creation and model training in language models allows for specific inputs, such as the infamous SolidGoldMagikarp token, to induce unwanted model behaviour. Although such `glitch tokens', tokens present in the tokenizer vocabulary but that are nearly or entirely absent during model training, have been observed across various models, a reliable method to identify and address them has been missing. We present a comprehensive analysis of Large Language Model tokenizers, specifically targeting this issue of detecting under-trained tokens. Through a combination of tokenizer analysis, model weight-based indicators, and prompting techniques, we develop novel and effective methods for automatically detecting these problematic tokens. Our findings demonstrate the prevalence of such tokens across a diverse set of models and provide insights into improving the efficiency and safety of language models.
Key facts. Cited by 45 papers in the map (data through 7 Oct 2026). Builds on 20 of its 39 references that are in the map. First posted on arXiv 8 May 2024.
Builds on
20 of 39 references.
References · 20
- 2023Qwen Technical Reportcited by 3,273
- 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
- 2019HuggingFace's Transformers: State-of-the-art Natural Language Processingcited by 2,201
- 2022GPT-NeoX-20B: An Open-Source Autoregressive Language Modelcited by 711
- 2024Yi: Open Foundation Models by 01.AIcited by 706
- 2018Subword Regularization: Improving Neural Network Translation Models with Multiple Subword Candidatescited by 632
- 2024OLMo: Accelerating the Science of Language Modelscited by 599
- 2021ByT5: Towards a token-free future with pre-trained byte-to-byte modelscited by 504
- 2024StarCoder 2 and The Stack v2: The Next Generationcited by 484
- 2024Jamba: A Hybrid Transformer-Mamba Language Modelcited by 390
- 2019BPE-Dropout: Simple and Effective Subword Regularizationcited by 189
- 2020Byte Pair Encoding is Suboptimal for Language Model Pretrainingcited by 189
8 more
- 2023MEGABYTE: Predicting Million-byte Sequences with Multiscale Transformerscited by 164
- 2021Between words and characters: A Brief History of Open-Vocabulary Modeling and Tokenization in NLPcited by 130
- 2024Coercing LLMs to do and reveal (almost) anythingcited by 88
- 2016Tying Word Vectors and Word Classifiers: A Loss Framework for Language Modelingcited by 87
- 2024Stable LM 2 1.6B Technical Reportcited by 86
- 2024SpaceByte: Towards Deleting Tokenization from Large Language Modelingcited by 31
- 2024RakutenAI-7B: Extending Large Language Models for Japanesecited by 13
- 2023A Systematic Analysis of Vocabulary and BPE Settings for Optimal Fine-tuning of NMT: A Case Study of In-domain Translationcited by 3
Built on by
Citing papers per year: 2024: 13; 2025: 15; 2026: 17.
45 papers.
Sort:
By area:
- 2025SuperBPE: Space Travel for Language Modelscited by 58
- 2024LLMmap: Fingerprinting For Large Language Modelscited by 56
- 2025Shared Global and Local Geometry of Language Model Embeddingscited by 34
- 2024Tokenization Matters! Degrading Large Language Models through Challenging Their Tokenizationcited by 32
- 2024Zero-Shot Tokenizer Transfercited by 30
- 2024Mind the Inconspicuous: Revealing the Hidden Weakness in Aligned LLMs' Refusal Boundariescited by 26
- 2025The Dual-Route Model of Inductioncited by 22
- 2025Dense SAE Latents Are Features, Not Bugscited by 17
- 2024Special Characters Attack: Toward Scalable Training Data Extraction From Large Language Modelscited by 16
- 2024Dual Process Learning: Controlling Use of In-Context vs. In-Weights Strategies with Weight Forgettingcited by 15
- 2024Data Mixture Inference: What do BPE Tokenizers Reveal about their Training Data?cited by 13
- 2025One Tokenizer To Rule Them All: Emergent Language Plasticity via Multilingual Tokenizerscited by 11
33 more
- 2024Problematic Tokens: Tokenizer Bias in Large Language Modelscited by 8
- 2025Bolmo: Byteifying the Next Generation of Language Modelscited by 8
- 2025Exploiting Vocabulary Frequency Imbalance in Language Model Pre-trainingcited by 7
- 2024Understanding Likelihood Over-optimisation in Direct Alignment Algorithmscited by 6
- 2026MinGram: A Minimalist Unigram Tokenizer with High Compression and Competitive Morphological Alignmentcited by 5
- 2024Tokenization for Molecular Foundation Modelscited by 4
- 2024GlitchMiner: Mining Glitch Tokens in Large Language Models via Gradient-based Discrete Optimizationcited by 3
- 2025Probing the topology of the space of tokens with structured promptscited by 3
- 2025From Macro to Micro: Probing Dataset Diversity in Language Model Fine-Tuningcited by 3
- 2025UTF-8 Plumbing: Byte-level Tokenizers Unavoidably Enable LLMs to Generate Ill-formed UTF-8cited by 3
- 2026Proxy Compression for Language Modelingcited by 3
- 2026LiteToken: Removing Intermediate Merge Residues From BPE Tokenizerscited by 3
- 2024Qtok: A Comprehensive Framework for Evaluating Multilingual Tokenizer Quality in Large Language Modelscited by 2
- 2025FPEdit: Robust LLM Fingerprinting through Localized Parameter Editingcited by 2
- 2026Shorthand for Thought: Compressing LLM Reasoning via Entropy-Guided Supertokenscited by 2
- 2026Decoupling the Benefits of Subword Tokenization for Language Model Training via Byte-level Simulationcited by 2
- 2025Alternatives To Next Token Prediction In Text Generation -- A Surveycited by 1
- 2025A Cartography of Open Collaboration in Open Source AI: Mapping Practices, Motivations, and Governance in 14 Open Large Language Model Projectscited by 1
- 2025Vocabulary embeddings organize linguistic structure early in language model trainingcited by 1
- 2026What Cosine Similarity of Label Representations Can and Cannot Tell uscited by 1
- 2026Disentangling MLP Neuron Weights in Vocabulary Spacecited by 1
- 2026MIXAR: Scaling Autoregressive Pixel-based Language Models to Multiple Languages and Scriptscited by 1
- 2026Scratchpad Patching: Decoupling Compute from Patch Size in Byte-Level Language Modelscited by 1
- 2026Writing-System-Level Tokenizer Adaptation for Byte-Level BPEcited by 1
- 2024Batching BPE Tokenization Mergescited by 0
- 2025`A la recherche du sens perdu: your favourite LLM might have more to say than you can understandcited by 0
- 2026Toten: A Knowledge-Based System For Structure-Preserving Representation Of Physical Quantities And Technical Notation In Brazilian Portuguesecited by 0
- 2026Where to cut, how deep: BPE and Unigram-LM on chemistry SMILEScited by 0
- 2026A Hub of Short Rows Inflates Intrinsic Dimension Estimation of Token Embeddingscited by 0
- 2026The Geometry of Ignorance: LLMs Know When to Temper Bayesian Priorscited by 0
- 2026Why Adaptive Optimizers Underestimate Rare Tokenscited by 0
- 2026Counting and Min-Cost Encoding for Tokenization in Large Language Modelscited by 0
- 2026HeadEdit: Calibrating Language Model Behavior Through the Frozen Unembedding Matrixcited by 0
- 2026HeadEdit: Calibrating Language Model Behavior Through the Frozen Unembedding Matrix1 Oct 2026
- 2026Counting and Min-Cost Encoding for Tokenization in Large Language Models1 Oct 2026
- 2026Why Adaptive Optimizers Underestimate Rare Tokens29 Sep 2026
- 2026The Geometry of Ignorance: LLMs Know When to Temper Bayesian Priors2 Sep 2026
- 2026A Hub of Short Rows Inflates Intrinsic Dimension Estimation of Token Embeddings30 Aug 2026
- 2026Writing-System-Level Tokenizer Adaptation for Byte-Level BPE1 Aug 2026
- 2026Where to cut, how deep: BPE and Unigram-LM on chemistry SMILES6 Jul 2026
- 2026MinGram: A Minimalist Unigram Tokenizer with High Compression and Competitive Morphological Alignment25 Jun 2026
- 2026Toten: A Knowledge-Based System For Structure-Preserving Representation Of Physical Quantities And Technical Notation In Brazilian Portuguese17 Jun 2026
- 2026Scratchpad Patching: Decoupling Compute from Patch Size in Byte-Level Language Models10 May 2026
- 2026Decoupling the Benefits of Subword Tokenization for Language Model Training via Byte-level Simulation29 Apr 2026
- 2026Shorthand for Thought: Compressing LLM Reasoning via Entropy-Guided Supertokens29 Apr 2026
33 more
- 2026MIXAR: Scaling Autoregressive Pixel-based Language Models to Multiple Languages and Scripts13 Apr 2026
- 2026Disentangling MLP Neuron Weights in Vocabulary Space7 Apr 2026
- 2026What Cosine Similarity of Label Representations Can and Cannot Tell us31 Mar 2026
- 2026LiteToken: Removing Intermediate Merge Residues From BPE Tokenizers4 Feb 2026
- 2026Proxy Compression for Language Modeling4 Feb 2026
- 2025Bolmo: Byteifying the Next Generation of Language Models17 Dec 2025
- 2025UTF-8 Plumbing: Byte-level Tokenizers Unavoidably Enable LLMs to Generate Ill-formed UTF-85 Nov 2025
- 2025Vocabulary embeddings organize linguistic structure early in language model training8 Oct 2025
- 2025A Cartography of Open Collaboration in Open Source AI: Mapping Practices, Motivations, and Governance in 14 Open Large Language Model Projects29 Sep 2025
- 2025Alternatives To Next Token Prediction In Text Generation -- A Survey29 Sep 2025
- 2025Exploiting Vocabulary Frequency Imbalance in Language Model Pre-training21 Aug 2025
- 2025FPEdit: Robust LLM Fingerprinting through Localized Parameter Editing4 Aug 2025
- 2025Dense SAE Latents Are Features, Not Bugs18 Jun 2025
- 2025One Tokenizer To Rule Them All: Emergent Language Plasticity via Multilingual Tokenizers12 Jun 2025
- 2025From Macro to Micro: Probing Dataset Diversity in Language Model Fine-Tuning30 May 2025
- 2025The Dual-Route Model of Induction3 Apr 2025
- 2025Shared Global and Local Geometry of Language Model Embeddings27 Mar 2025
- 2025Probing the topology of the space of tokens with structured prompts19 Mar 2025
- 2025SuperBPE: Space Travel for Language Models17 Mar 2025
- 2025`A la recherche du sens perdu: your favourite LLM might have more to say than you can understand28 Feb 2025
- 2024GlitchMiner: Mining Glitch Tokens in Large Language Models via Gradient-based Discrete Optimization19 Oct 2024
- 2024Qtok: A Comprehensive Framework for Evaluating Multilingual Tokenizer Quality in Large Language Models16 Oct 2024
- 2024Understanding Likelihood Over-optimisation in Direct Alignment Algorithms15 Oct 2024
- 2024Tokenization for Molecular Foundation Models19 Sep 2024
- 2024Batching BPE Tokenization Merges5 Aug 2024
- 2024Data Mixture Inference: What do BPE Tokenizers Reveal about their Training Data?23 Jul 2024
- 2024LLMmap: Fingerprinting For Large Language Models22 Jul 2024
- 2024Problematic Tokens: Tokenizer Bias in Large Language Models17 Jun 2024
- 2024Mind the Inconspicuous: Revealing the Hidden Weakness in Aligned LLMs' Refusal Boundaries31 May 2024
- 2024Dual Process Learning: Controlling Use of In-Context vs. In-Weights Strategies with Weight Forgetting28 May 2024
- 2024Tokenization Matters! Degrading Large Language Models through Challenging Their Tokenization27 May 2024
- 2024Zero-Shot Tokenizer Transfer13 May 2024
- 2024Special Characters Attack: Toward Scalable Training Data Extraction From Large Language Models9 May 2024
- 2025SuperBPE: Space Travel for Language Modelscited by 58
- 2024LLMmap: Fingerprinting For Large Language Modelscited by 56
- 2025Shared Global and Local Geometry of Language Model Embeddingscited by 34
- 2024Tokenization Matters! Degrading Large Language Models through Challenging Their Tokenizationcited by 32
- 2024Zero-Shot Tokenizer Transfercited by 30
- 2025The Dual-Route Model of Inductioncited by 22
- 2025Dense SAE Latents Are Features, Not Bugscited by 17
- 2024Special Characters Attack: Toward Scalable Training Data Extraction From Large Language Modelscited by 16
- 2024Dual Process Learning: Controlling Use of In-Context vs. In-Weights Strategies with Weight Forgettingcited by 15
- 2024Data Mixture Inference: What do BPE Tokenizers Reveal about their Training Data?cited by 13
- 2025One Tokenizer To Rule Them All: Emergent Language Plasticity via Multilingual Tokenizerscited by 11
- 2024Problematic Tokens: Tokenizer Bias in Large Language Modelscited by 8
12 most cited of 41 All 41 (JSON)
- 2026HeadEdit: Calibrating Language Model Behavior Through the Frozen Unembedding Matrix1 Oct 2026
- 2026Counting and Min-Cost Encoding for Tokenization in Large Language Models1 Oct 2026
- 2026Why Adaptive Optimizers Underestimate Rare Tokens29 Sep 2026
- 2026The Geometry of Ignorance: LLMs Know When to Temper Bayesian Priors2 Sep 2026
- 2026A Hub of Short Rows Inflates Intrinsic Dimension Estimation of Token Embeddings30 Aug 2026
- 2026Writing-System-Level Tokenizer Adaptation for Byte-Level BPE1 Aug 2026
- 2026Where to cut, how deep: BPE and Unigram-LM on chemistry SMILES6 Jul 2026
- 2026MinGram: A Minimalist Unigram Tokenizer with High Compression and Competitive Morphological Alignment25 Jun 2026
- 2026Toten: A Knowledge-Based System For Structure-Preserving Representation Of Physical Quantities And Technical Notation In Brazilian Portuguese17 Jun 2026
- 2026Decoupling the Benefits of Subword Tokenization for Language Model Training via Byte-level Simulation29 Apr 2026
- 2026MIXAR: Scaling Autoregressive Pixel-based Language Models to Multiple Languages and Scripts13 Apr 2026
- 2026Disentangling MLP Neuron Weights in Vocabulary Space7 Apr 2026
12 newest of 41 All 41 (JSON)