Metadata-Version: 2.4
Name: drafters
Version: 0.0.1
Summary: Building blocks for speculative decoding with local language models
Author: Abubakar Abid
License-File: LICENSE
Keywords: inference,llm,local-models,speculative-decoding
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Typing :: Typed
Requires-Python: >=3.10
Provides-Extra: dev
Requires-Dist: pytest<9.0.0,>=8.0.0; extra == 'dev'
Requires-Dist: ruff==0.9.3; extra == 'dev'
Description-Content-Type: text/markdown

# drafters

Typed building blocks for speculative decoding with local language models.

## Installation

```bash
pip install drafters
```

## Usage

```python
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

```bash
pip install -e ".[dev]"
pytest
ruff check --fix --select I
ruff format
```

## License

MIT
