drafters
Typed building blocks for speculative decoding with local language models.
Installation
pip install drafters
Usage
from drafters import Draft, accepted_prefix
draft = Draft(
token_ids=(314, 159, 265),
scores=(0.95, 0.87, 0.72),
)
verified = accepted_prefix(draft, accepted_tokens=2)
The initial API defines a provider-independent representation for draft tokens and a protocol that speculative draft models can implement.
Development
pip install -e ".[dev]"
pytest
ruff check --fix --select I
ruff format
License
MIT
Metadata
Release files for drafters 0.0.1
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 |
|---|---|---|---|---|
| drafters-0.0.1.tar.gz | 34.1 kB | Without provenance | Details for drafters-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| drafters-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for drafters-0.0.1-py3-none-any.whl |
Total release size: 37.5 kB
Release files / drafters-0.0.1.tar.gz
| Download URL | drafters-0.0.1.tar.gz |
|---|---|
| Size | 34.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6523f01030f6bfeb71b9fc4fd496b1f1956c2eafad189b4c6888de92cb51ae60
|
|
BLAKE2b-256 checksum How to use checksums |
0cb795214f673b008344258eee65a820916fbf406acff54a888e4d956e84d21d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / drafters-0.0.1-py3-none-any.whl
| Download URL | drafters-0.0.1-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d669d26158ccebc207da716b6c8dd789fc11e2566129cd87f776237ae7f9ad3b
|
|
BLAKE2b-256 checksum How to use checksums |
a2d0ff4fca3f40bffeb579ef6c8ce89124d5940a83e9b4ccd23358a7575ccb71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for drafters 0.0.1
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.