Catalog PyPI
PACKAGE EXPLORERView in registry

adadec

PyPI

AdaDec is an uncertainty-guided adaptive decoding framework for large language model (LLM) code generation which enhances standard decoding with a selective pause-then-rerank mechanism triggered by model uncertainty.

Versions collected1
Direct dependencies5From release 0.1.0
Last observed20 Oct, 18:46 UTC

README

Version 0.1.0 documentation

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

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.025 Sept 20255

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
sysuselab/adadec

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:46 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:d0b5cc4aaa956f9aed6c1952c3d327684c77dd3f4afb794c86193d4ae6f4493a