vix.ing · top · new · best · stats · spec

From Language Models over Tokens to Language Models over Characters

2024/12/04 by Tim Vieira, Vieira, Tim, Ben LeBrun +13 · 4 citations
Computer Science · #Artificial Intelligence (cs.AI) #Computation and Language (cs.CL) #FOS: Computer and information sciences #Natural Language Processing Techniques

paper · pdf · doi:10.48550/arxiv.2412.03719

openalex publication_date 2024/12/04 · openalex created_date 2025/10/10 · openalex updated_date 2026/07/28

Abstract

Modern language models are internally -- and mathematically -- distributions over \ittoken strings rather than \itcharacter strings, posing numerous challenges for programmers building user applications on top of them. For example, if a prompt is specified as a character string, it must be tokenized before passing it to the token-level language model. Thus, the tokenizer and consequent processing are very sensitive to the specification of the prompt (e.g., whether the prompt ends with a space or not). This paper presents algorithms for converting token-level language models to character-level ones. We present both exact and approximate algorithms. In the empirical portion of the paper, we benchmark the practical runtime and approximation quality. Across four publicly available language models, we find that -- even with a small computation budget -- our method is able to accurately approximate the character-level distribution at reasonably fast speeds, and that a significant improvement in the language model's compression rate (bits/byte) is achieved.

Cited by

Related