From Characters to Tokens: Dynamic Grouping with Hierarchical BPE

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Dolga, Rares, Maystre, Lucas, Berariu, Tudor, Barber, David
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866908599498833920
author Dolga, Rares
Maystre, Lucas
Berariu, Tudor
Barber, David
author_facet Dolga, Rares
Maystre, Lucas
Berariu, Tudor
Barber, David
contents Subword tokenization methods like Byte Pair Encoding (BPE) are widely used in large language models due to their balance of vocabulary compactness and representational power. However, they suffer from inefficiencies in representing rare words and require large embedding matrices. Character-level models address these issues but introduce performance bottlenecks, particularly in Transformer-based architectures. Recent hierarchical models attempt to merge the benefits of both paradigms by grouping characters into patches, but existing patching strategies either rely on whitespace-limiting applicability to certain languages, or require auxiliary models that introduce new dependencies. In this paper, we propose a dynamic character grouping method that leverages the structure of existing BPE tokenization without requiring additional models. By appending explicit end-of-patch markers to BPE tokens and introducing a second-level BPE compression stage to control patch granularity, our method offers efficient, flexible, and language-agnostic representations. Empirical results demonstrate that our approach matches or exceeds the performance of dynamic entropy- and whitespace-based patching strategies, while maintaining a compact vocabulary.
format Preprint
id arxiv_https___arxiv_org_abs_2510_15517
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle From Characters to Tokens: Dynamic Grouping with Hierarchical BPE
Dolga, Rares
Maystre, Lucas
Berariu, Tudor
Barber, David
Computation and Language
Subword tokenization methods like Byte Pair Encoding (BPE) are widely used in large language models due to their balance of vocabulary compactness and representational power. However, they suffer from inefficiencies in representing rare words and require large embedding matrices. Character-level models address these issues but introduce performance bottlenecks, particularly in Transformer-based architectures. Recent hierarchical models attempt to merge the benefits of both paradigms by grouping characters into patches, but existing patching strategies either rely on whitespace-limiting applicability to certain languages, or require auxiliary models that introduce new dependencies. In this paper, we propose a dynamic character grouping method that leverages the structure of existing BPE tokenization without requiring additional models. By appending explicit end-of-patch markers to BPE tokens and introducing a second-level BPE compression stage to control patch granularity, our method offers efficient, flexible, and language-agnostic representations. Empirical results demonstrate that our approach matches or exceeds the performance of dynamic entropy- and whitespace-based patching strategies, while maintaining a compact vocabulary.
title From Characters to Tokens: Dynamic Grouping with Hierarchical BPE
topic Computation and Language
url https://arxiv.org/abs/2510.15517