# So many tokens, so little time: Introducing a faster, more flexible byte-pair tokenizer

DevFeed: [So many tokens, so little time: Introducing a faster, more flexible byte-pair tokenizer](<https://devfeed.tech/articles/so-many-tokens-so-little-time-introducing-a-faster-more-flexible-byte-pair-tokenizer-67617.md>)

Original publisher: [Read original article](<https://github.blog/ai-and-ml/llms/so-many-tokens-so-little-time-introducing-a-faster-more-flexible-byte-pair-tokenizer/>)

Author: Hendrik van Antwerpen

Published: 2024-12-12T13:51:13Z

Content type: article

Language: en

Sources: [GitHub Blog](<https://devfeed.tech/sources/github-engineering.md>)

Topics: [tokenization](<https://devfeed.tech/topics/tokenization.md>), [Python](<https://devfeed.tech/topics/python.md>), [concatenation](<https://devfeed.tech/topics/concatenation.md>)

Tags: [ai-ml](<https://devfeed.tech/tags/ai-ml.md>), [benchmark](<https://devfeed.tech/tags/benchmark.md>), [database](<https://devfeed.tech/tags/database.md>), [denial-of-service](<https://devfeed.tech/tags/denial-of-service.md>), [efficiency](<https://devfeed.tech/tags/efficiency.md>), [llms](<https://devfeed.tech/tags/llms.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [tokens](<https://devfeed.tech/tags/tokens.md>)

## AI overview

GitHub describes an open source Rust byte-pair encoding tokenizer designed for incremental tokenization and efficient token counting. Its algorithm uses a compatibility property and dynamic programming to achieve linear runtime, and includes encoders for appending or prepending text, full-text encoding, and token counts over subranges. The post reports benchmark results against tiktoken-rs and Hugging Face tokenizers.

## Source excerpt

We released a new open source byte-pair tokenizer that is faster and more flexible than popular alternatives.