Metadata-Version: 2.4
Name: cfgzip
Version: 0.1.0
Summary: Token vocabulary compression for constrained LLM decoding
Project-URL: Homepage, https://github.com/mjs227/cfgzip
Project-URL: Repository, https://github.com/mjs227/cfgzip
License-Expression: Apache-2.0
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: interegular
Requires-Dist: psutil
Requires-Dist: torch
Requires-Dist: tqdm
Requires-Dist: transformers
Provides-Extra: dev
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: xgrammar; extra == 'dev'
Provides-Extra: xgrammar
Requires-Dist: xgrammar; extra == 'xgrammar'
Description-Content-Type: text/markdown

# CFGzip

**Lossless token vocabulary compression for fast CFG-constrained decoding.**

CFGzip is an offline pre-computation technique that pairs with a constrained decoding engine (e.g. XGrammar2) to
massively speed up the engine's inference: generation with CFGzip+XGrammar2 is **up to 7.5x faster** than SoTA
XGrammar2 alone, and **lossless** — outputs are byte-identical to the unmodified grammar engine.

```bash
pip install "cfgzip[xgrammar]"
```

**Full documentation:** https://github.com/mjs227/cfgzip
