Token Alignment via Character Matching for Subword Completion
Not on the map. Why?
Abstract (arXiv)
Generative models, widely utilized in various applications, can often struggle with prompts corresponding to partial tokens. This struggle stems from tokenization, where partial tokens fall out of distribution during inference, leading to incorrect or nonsensical outputs. This paper examines a technique to alleviate the tokenization artifact on text completion in generative models, maintaining performance even in regular non-subword cases. The method, termed token alignment, involves backtracking to the last complete tokens and ensuring the model's generation aligns with the prompt. This approach showcases marked improvement across many partial token scenarios, including nuanced cases like space-prefix and partial indentation, with only a minor time increase. The technique and analysis detailed in this paper contribute to the continuous advancement of generative models in handling partial inputs, bearing relevance for applications like code completion and text autocompletion.
Key facts. Cited by 9 papers in the map (data through 7 Oct 2026). Builds on 29 of its 35 references that are in the map. First posted on arXiv 13 Mar 2024.
Builds on
29 of 35 references.
References · 29
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,115
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2016Pointer Sentinel Mixture Modelscited by 2,992
- 2019The Curious Case of Neural Text Degenerationcited by 2,881
- 2018SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processingcited by 1,973
- 2022BLOOM: A 176B-Parameter Open-Access Multilingual Language Modelcited by 1,968
- 2022Fast Inference from Transformers via Speculative Decodingcited by 1,615
- 2018Know What You Don't Know: Unanswerable Questions for SQuADcited by 1,538
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
17 more
- 2023Accelerating Large Language Model Decoding with Speculative Samplingcited by 975
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2019Adversarial NLI: A New Benchmark for Natural Language Understandingcited by 798
- 2023StarCoder: may the source be with you!cited by 790
- 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 663
- 2018Subword Regularization: Improving Neural Network Translation Models with Multiple Subword Candidatescited by 632
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2021Dynabench: Rethinking Benchmarking in NLPcited by 447
- 2022Efficient Training of Language Models to Fill in the Middlecited by 248
- 2021Adversarial GLUE: A Multi-Task Benchmark for Robustness Evaluation of Language Modelscited by 227
- 2019SPoC: Search-based Pseudocode to Codecited by 176
- 2022Multi-lingual Evaluation of Code Generation Modelscited by 158
- 2022ReCode: Robustness Evaluation of Code Generation Modelscited by 100
- 2021NL-Augmenter: A Framework for Task-Sensitive Natural Language Augmentationcited by 72
- 2022Natural Attack for Pre-trained Models of Codecited by 72
- 2022CodeAttack: Code-Based Adversarial Attacks for Pre-trained Programming Language Modelscited by 48
- 2019Subword Language Model for Query Auto-Completioncited by 4
Built on by
Citing papers per year: 2024: 4; 2025: 4; 2026: 1.
9 papers.
- 2024The Foundations of Tokenization: Statistical and Computational Concernscited by 20
- 2025Broken Tokens? Your Language Model can Secretly Handle Non-Canonical Tokenizationscited by 16
- 2024Exact Byte-Level Probabilities from Tokenized Language Models for FIM-Tasks and Model Ensemblescited by 15
- 2025Sampling from Your Language Model One Byte at a Timecited by 7
- 2025TokSuite: Measuring the Impact of Tokenizer Choice on Language Model Behaviorcited by 4
- 2024Approximately Aligned Decodingcited by 3
- 2026Proxy Compression for Language Modelingcited by 3
- 2024Retrieval-augmented code completion for local projects using large language modelscited by 1
- 2025Tokenization Multiplicity Leads to Arbitrary Price Variation in LLM-as-a-servicecited by 0
- 2026Proxy Compression for Language Modeling4 Feb 2026
- 2025TokSuite: Measuring the Impact of Tokenizer Choice on Language Model Behavior23 Dec 2025
- 2025Broken Tokens? Your Language Model can Secretly Handle Non-Canonical Tokenizations23 Jun 2025
- 2025Sampling from Your Language Model One Byte at a Time17 Jun 2025
- 2025Tokenization Multiplicity Leads to Arbitrary Price Variation in LLM-as-a-service6 Jun 2025
- 2024Exact Byte-Level Probabilities from Tokenized Language Models for FIM-Tasks and Model Ensembles11 Oct 2024
- 2024Approximately Aligned Decoding1 Oct 2024
- 2024Retrieval-augmented code completion for local projects using large language models9 Aug 2024
- 2024The Foundations of Tokenization: Statistical and Computational Concerns16 Jul 2024