AdaDec: Adaptive Decoding for Code Generation
AdaDec is an adaptive decoding framework for LLM code generation. It selectively pauses decoding when uncertainty is high, reranks candidates, and improves accuracy with moderate overhead.
Installation
pip install adadec
Quick Start
from adadec import prepare_adadec, generate_adadec
prepare_adadec(model, tokenizer, "train.jsonl", "out.parquet", "mymodel", "thresholds.json")
result = generate_adadec(model, tokenizer, ["def add(a, b):"], "mymodel")
Note that train.jsonl requires "task_id", "prompt", and "canonical_solution".
stop_words.json example:
["\\n{4,}", "^\\S"]
📖 License
MIT License
Links
Metadata
Release files for adadec 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 | Provenance | |
|---|---|---|---|---|
| adadec-0.1.0.tar.gz | 10.3 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| adadec-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.8 kB
Release files / adadec-0.1.0.tar.gz
| Download URL | adadec-0.1.0.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6766137b4fdd79d25d80463a11e7e08e700d4f4221eb7f70ea81370cbf40e777
|
|
BLAKE2b-256 checksum How to use checksums |
a1e4747f1eb1e0a0e2fade7922eacad8561ba10bb0dba632abd5e6cff656456d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Sep 25, 2025.
Transparency logRelease files / adadec-0.1.0-py3-none-any.whl
| Download URL | adadec-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fff9c41f1b5ff2b5f8165e62f253463eb4d48c0ebae310a0c9a0973ecaa3e03d
|
|
BLAKE2b-256 checksum How to use checksums |
53690d8671852ee1c90b746c663a98f326990a7d05aaf1b93f80f81a0e7d69b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Sep 25, 2025.
Transparency logSecurity for adadec 0.1.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for adadec-0.1.0.tar.gz
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 Sep 25, 2025.
Transparency logA 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.