IncliToken
A simple Byte Pair Encoding (BPE) tokenizer implementation from scratch in Python.
Installation
uv add inclitoken
Or you can use pip:
pip install inclitoken
Usage
from inclitoken.tokenizer import BPETokenizer
# Initialize tokenizer
tokenizer = BPETokenizer()
# Train on your text
text = "Hello world! This is a simple example."
tokenizer.train(text, turns=100, verbose=False)
# Encode text to token IDs
ids = tokenizer.encode("Hello world!")
print(ids)
# Decode token IDs back to text
decoded = tokenizer.decode(ids)
print(decoded)
Features
- Train custom BPE tokenizers on your text
- Encode text into token IDs
- Decode token IDs back into text
- Track merge operations and vocabulary
Requirements
- Python >= 3.14
- tqdm
Author
Built by Adarsh Dubey
Metadata
Release files for inclitoken 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| inclitoken-0.1.0.tar.gz | 3.2 kB | Without provenance | Details for inclitoken-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| inclitoken-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for inclitoken-0.1.0-py3-none-any.whl |
Total release size: 7.9 kB
Release files / inclitoken-0.1.0.tar.gz
| Download URL | inclitoken-0.1.0.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
044b61399c8c727726dc4e01c4b8a6cfe3a3dc9c95ec9bb582a9892c5842c070
|
|
BLAKE2b-256 checksum How to use checksums |
c659591c182d271f177727ef38993abbf6cfbe9bb0c12eac6d61dfae02c68582
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.7
|
Release files / inclitoken-0.1.0-py3-none-any.whl
| Download URL | inclitoken-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
930b64db0ebe9087fd8d6713524de46b6e243c5f79cc1e6b51862a648ed45144
|
|
BLAKE2b-256 checksum How to use checksums |
c2fec9242cfe53715ea14a8dac9e6e53723143f0086633bb7803ff2fa9d52e7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.7
|
Security for inclitoken 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.