Lune

ACL Findings2024

Token Alignment via Character Matching for Subword Completion

Ben Athiwaratkun, Shiqi Wang, Mingyue Shang, Yuchen Tian, Zijian Wang, Sujan Kumar Gonugondla, Sanjay Krishna Gouda, Robert Kwiatkowski, Ramesh Nallapati, Parminder Bhatia, Bing Xiang

Abstract

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

7 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Proxy Compression for Language Modeling cites Sampling from Your Language Model One Byte at a Time
  • Proxy Compression for Language Modeling cites Broken Tokens? Your Language Model can Secretly Handle Non-Canonical Tokenizations
  • Proxy Compression for Language Modeling cites The Curious Case of Neural Text Degeneration
  • Sampling from Your Language Model One Byte at a Time cites Language Models are Few-Shot Learners
  • Sampling from Your Language Model One Byte at a Time cites The Curious Case of Neural Text Degeneration
  • Broken Tokens? Your Language Model can Secretly Handle Non-Canonical Tokenizations cites Sampling from Your Language Model One Byte at a Time
  • Approximately Aligned Decoding cites Fast Inference from Transformers via Speculative Decoding
  • Language Models are Few-Shot Learners cites Adversarial NLI: A New Benchmark for Natural Language Understanding
  • Language Models are Few-Shot Learners cites The Curious Case of Neural Text Degeneration
  • Fast Inference from Transformers via Speculative Decoding cites Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers7

  1. Broken Tokens? Your Language Model can Secretly Handle Non-Canonical TokenizationsBrian Siyuan Zheng, Alisa Liu, Orevaoghene Ahia, Jonathan Hayase et al.NeurIPS 2025 · 19 citations
  2. Sampling from Your Language Model One Byte at a TimeJonathan Hayase, Alisa Liu, Noah Smith, Sewoong OhICML 2026 · 9 citations
  3. TokSuite: Measuring the Impact of Tokenizer Choice on Language Model BehaviorGül Sena Altıntaş, Malikeh Ehghaghi, Brian Lester, Fengyuan Liu et al.ICML 2026 · 3 citations
  4. Proxy Compression for Language ModelingLin Zheng, Li Xinyu, Qian Liu, Xiachong Feng et al.ICML 2026 · 3 citations
  5. Approximately Aligned DecodingDaniel Melcer, Sujan Kumar Gonugondla, Pramuditha Perera, Haifeng Qian et al.NeurIPS 2025 · 3 citations

Builds on9

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes et al.ICLR 2020 · 4,112 citations
  3. Fast Inference from Transformers via Speculative DecodingYaniv Leviathan, Matan Kalman, Yossi MatiasICML 2023 · 1,472 citations
  4. Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and EntailmentDi Jin, Zhijing Jin, Joey Tianyi Zhou, Peter SzolovitsAAAI 2020 · 1,333 citations
  5. Adversarial NLI: A New Benchmark for Natural Language UnderstandingYixin Nie, Adina Williams, Emily Dinan, Mohit Bansal et al.ACL 2020 · 602 citations

Related papers

  1. Tokenization Consistency Matters for Generative Models on Extractive NLP TasksKaiser Sun, Peng Qi, Yuhao Zhang, Lan Liu et al.EMNLP Findings 2023 · 5 citations
  2. Follow the Flow: On Information Flow Across Textual Tokens in Text-to-Image ModelsGuy Kaplan, Michael Toker, Yuval Reif, Yonatan Belinkov et al.ACL 2026 · 4 citations
  3. Empowering Character-level Text Infilling by Eliminating Sub-TokensHouxing Ren, Mingjie Zhan, Zhongyuan Wu, Hongsheng LiACL 2024
  4. LoST: Level of Semantics Tokenization for 3D ShapesNiladri Shekhar Dutt, Zifan Shi, Paul Guerrero, Chun-Hao Paul Huang et al.CVPR 2026 · 4 citations
  5. SJD-SV: Speculative Jacobi Decoding with Semantics Verification for Autoregressive Image GenerationBaoquan Zhang, Bingqi Shan, Shihao Fang, Kenghong Lin et al.ICML 2026
Dusk over the sea between two cliffs drawn in fine vertical lines