Batching BPE Tokenization Merges

Alexander P. Morgan
8/5/2024
cs.CLcs.AI

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

The Byte Pair Encoding algorithm can be safely batched to merge hundreds of pairs of tokens at a time when building up a tokenizer's vocabulary. This technique combined with reducing the memory footprint of text used in vocabulary training make it feasible to train a high quality tokenizer on a basic laptop. This paper presents BatchBPE, an open-source pure Python implementation of these concepts, with the goal of making experimenting with new tokenization strategies more accessible especially in compute- and memory-constrained contexts. BatchBPE's usefulness and malleability are demonstrated through the training of several token vocabularies to explore the batch merging process and experiment with preprocessing a stop word list and ignoring the least common text chunks in a dataset. Resultant encoded lengths of texts are used as a basic evaluation metric.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{morgan2024batching,
  title  = {Batching BPE Tokenization Merges},
  author = {Alexander P. Morgan},
  year   = {2024},
  eprint = {2408.04653},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2408.04653v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2408.04653.svg)](https://codeofpaper.com/paper/2408.04653)

Discussion