toktier-fastokens
This distribution is a pinned build of fastokens 0.3.1 carrying the toktier
patch set 1. It keeps the upstream import name fastokens, so install either
this distribution or the upstream one, not both. The toktier project
publishes it for its own explicit experimental adapter; it is not affiliated
with or endorsed by the upstream project. Reports about the id divergences
the patch set addresses have been submitted to the upstream project.
It provides the same import name as upstream:
import fastokens
so it is a drop-in for code written against fastokens 0.3.1.
Install only one of the two
Both distributions install a top-level fastokens package. Installing this
one beside upstream fastokens in the same environment leaves whichever was
installed last in place, silently, with two sets of metadata pointing at the
same files; uninstalling either of them then removes the shared files. To
keep only the pinned build, reinstall rather than uninstall one of the two:
pip uninstall -y fastokens toktier-fastokens
pip install "toktier[fastokens]"
or, to keep upstream instead:
pip uninstall -y fastokens toktier-fastokens
pip install fastokens
If other code needs the upstream distribution, use a separate environment; the two cannot coexist under one import name.
What the patches change
Five patches close cases where the engine returned a token-id list that
differs from the reference tokenizer for the same input, with no error
raised, or refused an input the reference accepts; a sixth adds a notice
line to each modified source file. CHANGES-toktier.md lists them one by
one, NOTICE states which files each one touches, and PATCHES/ carries the
patches verbatim.
Applying patches 0001 to 0005 in order to upstream commit
fe854299553524f2156a22036a2cb4d1f2ef4d97 (tag v0.3.1) reproduces the
source tree the 0.3.1.1 wheel comes from: git tree hash
aa1924284ec4abaedcc8ed5823ee17e7959c55c5.
Rebuilding
packaging/fastokens-pinned/build_pinned.sh in the toktier repository
rebuilds this distribution from a clean upstream checkout with a pinned Rust
toolchain and a pinned maturin. It checks the patch digests and the resulting
tree hash before it builds.
Licensing
Upstream fastokens is Apache-2.0; the upstream LICENSE text is included
verbatim, as is the upstream NOTICES.txt (also reproduced inside NOTICE,
which carries the statement of modification required by section 4(b)). The
license texts of the compiled dependency closure are collected in
THIRD_PARTY_LICENSES-fastokens.txt.
What toktier reports about it
toktier recognises the wheels it publishes by the content digest of the
installed fastokens/ package and reports what it knows as
engine_assurance next to the adapter's admission word. When the installed
bytes are a published wheel, that reads certified_pinned and the readings
toktier took on that wheel apply; the upstream distribution reads
upstream_build, and a wheel built elsewhere, from this sdist or otherwise,
reads unrecognized_build, because the readings are about specific bytes.
The adapter itself remains an explicit experimental route in toktier and is
never selected automatically. See the toktier documentation for the full list
of states.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file toktier_fastokens-0.3.1.2.tar.gz.
File metadata
- Download URL: toktier_fastokens-0.3.1.2.tar.gz
- Upload date:
- Size: 833.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b0d1ffd43023750bc7956bd8d50c6c818dcafdc1abd1b782cdf5ce28519fb30
|
|
| MD5 |
340786734a1ab077d49f3338daac56cb
|
|
| BLAKE2b-256 |
c04edac6438c9419940311a26cc85db14904e529cdd2d0e72791e3ef4d0c76f1
|
File details
Details for the file toktier_fastokens-0.3.1.2-cp39-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: toktier_fastokens-0.3.1.2-cp39-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 3.6 MB
- Tags: CPython 3.9+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad10936dd941ebd505efa37943b683aef9abd32ccd45fd9aa3661a8d4a640b48
|
|
| MD5 |
8c82c37aaa3851f1b03d2366e6c730e9
|
|
| BLAKE2b-256 |
6063090a8cf6376f9fb6edf798163579ab114b64b2f30f96b8152b0df2f16f54
|