tokie
Blazingly fast tokenizer — 50x faster, 10x smaller, 100% accurate
Decision gist · record as of 2026-08-14
Yes, if you are tokenizing text for transformer models and speed or model size matters. The package is actively maintained, has no known vulnerabilities, supports current Python versions, and offers a permissive dual license. Install friction is moderate due to compiled wheels, but prebuilt binaries cover common platforms. Not necessary if your tokenization is already fast enough or if you need features not yet documented in the fact sheet.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; prebuilt wheels are available for CPython on common platforms.
- Medium install friction due to compiled wheels, but prebuilt binaries are available for modern Python versions (3.10–3.14) across macOS, Linux, and Windows.
- Repository is active with a recent release (21 days old) and no known vulnerabilities.
License · maintenance · safety
MIT OR Apache-2.0 (permissive) — Dual-licensed under MIT OR Apache-2.0, both permissive; you may choose either license when using or distributing this package.
last release 2026-07-24 (21 days) · last repo commit 2026-07-26 · 49 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 487,336 downloads/mo, #6,386 on PyPI
Alternatives
Verify before relying
pip install tokie
import tokie
tokenizer = tokie.Tokenizer.from_pretrained("bert-base-uncased")
encoding = tokenizer("Hello, world!")
print(encoding.ids) # [101, 7592, 1010, 2088, 999, 102]- Whether .tkz format is backward-compatible across tokie versions or requires re-serialization after updates.
- Performance characteristics on very large batches or streaming use cases beyond the provided benchmarks.
- Whether all HuggingFace tokenizer edge cases (custom tokens, special token handling) are fully supported.
What it is and what it does
tokie is a tokenizer library written in Rust with Python bindings that converts text into token IDs and metadata for transformer models. It supports BPE (used by GPT-2 and tiktoken), WordPiece (BERT), and Unigram encoders, and can load any HuggingFace tokenizer model directly. The library is designed as a drop-in replacement for HuggingFace's tokenizers package, offering substantially faster encoding and decoding through its Rust implementation.
The package handles common tokenization workflows: single-text encoding, batch encoding across multiple CPU cores, pair encoding for cross-encoder models, padding and truncation, byte-offset tracking, and token counting. It also provides a compact binary .tkz format for model storage that is significantly smaller than the standard tokenizer.json format. No runtime dependencies are required beyond Python itself.
Use it for
- Accelerate batch tokenization in production NLP pipelines where throughput matters (e.g., preprocessing large datasets for model training).
- Replace HuggingFace tokenizers in latency-sensitive applications like real-time inference or API endpoints.
- Reduce model artifact size by storing tokenizers in .tkz format instead of tokenizer.json for deployment.
- Tokenize text for BERT, GPT-2, Llama, Mistral, and other transformer models without rewriting tokenization logic.
- Count tokens quickly without creating full encoding objects, useful for prompt length validation in LLM applications.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are tokenizing text for transformer models and speed or model size matters.
The package is actively maintained, has no known vulnerabilities, supports current Python versions, and offers a permissive dual license. Install friction is moderate due to compiled wheels, but prebuilt binaries cover common platforms. Not necessary if your tokenization is already fast enough or if you need features not yet documented in the fact sheet.
Install
tokie on PyPI
Before you install
Medium install friction due to compiled wheels, but prebuilt binaries are available for modern Python versions (3.10–3.14) across macOS, Linux, and Windows. Repository is active with a recent release (21 days old) and no known vulnerabilities.
Requires Python 3.10 or later; prebuilt wheels are available for CPython on common platforms.
License in practice
Dual-licensed under MIT OR Apache-2.0, both permissive; you may choose either license when using or distributing this package.
Quickstart
pip install tokie
import tokie
tokenizer = tokie.Tokenizer.from_pretrained("bert-base-uncased")
encoding = tokenizer("Hello, world!")
print(encoding.ids) # [101, 7592, 1010, 2088, 999, 102]
Verify before relying
- Whether .tkz format is backward-compatible across tokie versions or requires re-serialization after updates.
- Performance characteristics on very large batches or streaming use cases beyond the provided benchmarks.
- Whether all HuggingFace tokenizer edge cases (custom tokens, special token handling) are fully supported.
Package facts
| License | MIT OR Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 21 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 487,336 / month, #6,386 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: RustTopic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Text ProcessingTopic :: Text Processing :: LinguisticTyping :: Typed |
Evidence: tokie-0.1.4-cp310-cp310-macosx_10_12_x86_64.whl; tokie-0.1.4-cp310-cp310-macosx_11_0_arm64.whl; tokie-0.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; tokie-0.1.4-cp310-cp310-manylinux_2_28_aarch64.whl; tokie-0.1.4-cp310-cp310-win_amd64.whl; tokie-0.1.4-cp311-cp311-macosx_10_12_x86_64.whl; tokie-0.1.4-cp311-cp311-macosx_11_0_arm64.whl; tokie-0.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; tokie-0.1.4-cp311-cp311-manylinux_2_28_aarch64.whl; tokie-0.1.4-cp311-cp311-win_amd64.whl; tokie-0.1.4-cp312-cp312-macosx_10_12_x86_64.whl; tokie-0.1.4-cp312-cp312-macosx_11_0_arm64.whl; tokie-0.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; tokie-0.1.4-cp312-cp312-manylinux_2_28_aarch64.whl; tokie-0.1.4-cp312-cp312-win_amd64.whl; tokie-0.1.4-cp313-cp313-macosx_10_12_x86_64.whl; tokie-0.1.4-cp313-cp313-macosx_11_0_arm64.whl; tokie-0.1.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; tokie-0.1.4-cp313-cp313-manylinux_2_28_aarch64.whl; tokie-0.1.4-cp313-cp313-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “fast tokenizer for transformers”
- tokieA fast, Rust-backed tokenizer library that encodes and decodes text…
- curated-tokenizersProvides BPE, Byte BPE, Unigram, and Wordpiece tokenizers for…
- livekit-blingfireProvides BlingFire tokenization bindings for the LiveKit Agents…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also curated-tokenizers · fastokens · pytorch-tokenizers · tiktoken · blingfire · openvino-tokenizers · sentencepiece · spacy-alignments · stop-sequencer