sqrt-space-kv (Python)
Sqrt-Checkpoint KV-cache residency: cost models, keep-set computation, and exact reference attention. Zero runtime dependencies.
Full documentation, honest tradeoffs, and links to the paper / Rust port: see the repository README.
Install
pip install sqrt-space-kv
Quickstart
from sqrt_space_kv import keep_indices, strategy_cost
s = 4096
keep = keep_indices(s) # token indices to keep resident
print(len(keep), "of", s, "kept")
cost = strategy_cost("sqrt-checkpoint", s)
print(cost["kv_cells"], cost["fidelity"])
Development
python -m pip install -e ".[dev]"
pytest -q
Release files for sqrt-space-kv 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 | |
|---|---|---|---|
| sqrt_space_kv-0.1.0.tar.gz | 10.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sqrt_space_kv-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.7 kB
Release files / sqrt_space_kv-0.1.0.tar.gz
| Download URL | sqrt_space_kv-0.1.0.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
58f6f7f0d042452d14cb35eee45c415e4a890c81438c9ef28a75cb60305e6de7
|
|
BLAKE2b-256 checksum How to use checksums |
f8daa835e50b65275715c2a66bc3cfc786f1fc97c9317df42a6a5fd381708906
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 19, 2026.
Transparency logRelease files / sqrt_space_kv-0.1.0-py3-none-any.whl
| Download URL | sqrt_space_kv-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
adff86fed3631dab9c4975d0f58602e0bb6bdd0fc9639e730027b96a1b8da5c6
|
|
BLAKE2b-256 checksum How to use checksums |
7f07914be4c49b9a7bf9aee7a9614198c5289490bcfd3f62e8e1b5a99c9134f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 19, 2026.
Transparency log