Metadata-Version: 2.4
Name: dynquant-core
Version: 0.1.1
Summary: Training-dynamics-driven mixed-precision LLM quantization: signals, scoring, allocation, packing. Pure Python.
Project-URL: Homepage, https://github.com/kambojvikram/dynquant
Project-URL: Issues, https://github.com/kambojvikram/dynquant/issues
Project-URL: Changelog, https://github.com/kambojvikram/dynquant/blob/main/CHANGELOG.md
Author: DynQuant authors
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: compression,llm,mixed-precision,moe,quantization,transformers
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: numpy>=1.24
Requires-Dist: pyyaml>=6.0
Requires-Dist: safetensors>=0.4.3
Requires-Dist: torch>=2.4
Requires-Dist: typing-extensions>=4.9; python_version < '3.12'
Provides-Extra: dev
Requires-Dist: accelerate>=0.34; extra == 'dev'
Requires-Dist: datasets>=2.20; extra == 'dev'
Requires-Dist: hypothesis>=6.100; extra == 'dev'
Requires-Dist: lm-eval>=0.4.4; extra == 'dev'
Requires-Dist: mkdocs-material>=9.5; extra == 'dev'
Requires-Dist: mkdocstrings[python]>=0.25; extra == 'dev'
Requires-Dist: mypy>=1.11; extra == 'dev'
Requires-Dist: peft>=0.13; extra == 'dev'
Requires-Dist: pre-commit>=3.7; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest-xdist>=3.5; extra == 'dev'
Requires-Dist: pytest>=7.4; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Requires-Dist: transformers>=4.45; extra == 'dev'
Requires-Dist: trl>=0.11; extra == 'dev'
Provides-Extra: eval
Requires-Dist: accelerate>=0.34; extra == 'eval'
Requires-Dist: datasets>=2.20; extra == 'eval'
Requires-Dist: lm-eval>=0.4.4; extra == 'eval'
Requires-Dist: transformers>=4.45; extra == 'eval'
Provides-Extra: hf
Requires-Dist: accelerate>=0.34; extra == 'hf'
Requires-Dist: transformers>=4.45; extra == 'hf'
Provides-Extra: train
Requires-Dist: accelerate>=0.34; extra == 'train'
Requires-Dist: datasets>=2.20; extra == 'train'
Requires-Dist: peft>=0.13; extra == 'train'
Requires-Dist: transformers>=4.45; extra == 'train'
Requires-Dist: trl>=0.11; extra == 'train'
Provides-Extra: triton
Requires-Dist: triton>=3.0; (platform_system == 'Linux') and extra == 'triton'
Description-Content-Type: text/markdown

# dynquant-core

The pure-Python half of [DynQuant](https://github.com/kambojvikram/dynquant):
training-dynamics-driven mixed-precision LLM quantization.

Most users should `pip install dynquant`, which adds the prebuilt CUDA kernels.
Install `dynquant-core` directly when you want the quantization pipeline without
any binary dependency — CPU-only machines, Windows, macOS, ARM, and CI.

## What is in here

* `dynquant.signals` — the training-time hook and the stats file format
* `dynquant.graph` — architecture-generic module role classification
* `dynquant.quant` — group-wise n-bit packing and the quantizer driver
* `dynquant.runtime` — backend selection and the packed `Linear`
* `dynquant.cli` — the `dynquant` command, including `dynquant doctor`

Everything except inference speed works with no compiler and no GPU. The
reference (`torch`) backend dequantizes to compute, so it saves no memory and is
not fast — but it is the oracle the CUDA kernels are tested against, and it is
what makes quantizing a checkpoint possible on a laptop.

## Install

```bash
pip install dynquant-core            # quantize anywhere
pip install 'dynquant-core[hf]'      # + transformers, accelerate
pip install 'dynquant-core[train]'   # + peft, trl, datasets
pip install 'dynquant-core[dev]'     # + pytest, ruff, mypy, docs
```

## License

Apache-2.0.
