Skip to main content

Remove all non-English tokens from the model

pip install prunetokens

prunetokens /path/to/model_directory_with_safetensors

Requirements: safetensors to read and write file. No VRAM required.

Model Before After Saved Vocab
Qwen3.5-9B-AWQ-4bit 8.5 GB 7.0 GB ~18% 248k → 146k
MiniCPM5-1B 2.1 GB 1.9 GB ~10% 130k → 94k

Pruned models:

UPDATE 0.1.4:

Model Before After Saved Vocab
Qwen3.5-9B-AWQ-4bit 8.5 GB 6.8 GB ~20% 248k → 137k
Qwen-3.5-4B-AWQ 4.1 GB 3.5 GB ~14% 248k → 138k

Metadata

Release files for prunetokens 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for prunetokens 0.1.4
File Size Uploaded Provenance
prunetokens-0.1.4.tar.gz 5.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for prunetokens 0.1.4
File Interpreter ABI Platform
prunetokens-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 11.8 kB

Release files / prunetokens-0.1.4.tar.gz

Download URL prunetokens-0.1.4.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
63974374c5ead18849014f33471399ecb64c534a208a49d8d2dc0d5a6f803e88
BLAKE2b-256 checksum
How to use checksums
5a74d3cad1180ba9f5df2b5c318d0e8871ccdf37be1614094636fb1a700b6f02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / prunetokens-0.1.4-py3-none-any.whl

Download URL prunetokens-0.1.4-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de97369df3fb850bccb21a903189c0d62a0157f9889db75d1ec6d6cbee1d22a0
BLAKE2b-256 checksum
How to use checksums
db49a919e5c04fa3fe59b90b1350ac6c6475e6561c8e0f6fb214cf331a333367
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for prunetokens 0.1.4

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page