Training-dynamics-driven mixed-precision LLM quantization, with prebuilt CUDA kernels.
Project description
dynquant
Mixed-precision LLM quantization that decides bit-widths from your fine-tune's own training dynamics.
pip install dynquant
dynquant doctor
This distribution contains no code. It is the one name to install, and it pulls in:
dynquant-core— the Python half: signal collection hook, role classification, scoring, allocation, packing, CLI. Installs anywhere, no compiler required.dynquant-kernels— prebuilt CUDA kernels, where a wheel exists for your platform. Without them everything still works on the reference backend; you lose inference speed and the VRAM saving, not correctness.
Usage
Collect signals during the fine-tune you were going to run anyway:
from transformers import Trainer
from dynquant import DynQuantCallback
trainer = Trainer(model=model, ..., callbacks=[DynQuantCallback("stats/")])
trainer.train()
Allocate and pack:
dynquant quantize ./merged --stats stats/dynquant_stats.json --target 3.0 -o ./q3
Load through plain transformers:
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("./q3")
Full documentation: https://github.com/kambojvikram/dynquant
Extras
pip install 'dynquant[train]' # transformers, peft, trl, datasets
pip install 'dynquant[eval]' # lm-eval-harness
pip install 'dynquant[triton]' # portability fallback for ROCm / newer GPUs
pip install 'dynquant[kernels]' # force the compiled kernels (builds from sdist)
License
Apache-2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dynquant-0.1.0.tar.gz.
File metadata
- Download URL: dynquant-0.1.0.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b2a2f3f6d97ffd8e7815e4923fd8f4c58f04565a11a2467aafd689c9e9a1f00
|
|
| MD5 |
e48e598d5b3b0435e918f9f3aac1a9c9
|
|
| BLAKE2b-256 |
c03e409f0033c59a9daf528f9b66ac770cae72911156a015af59ac5c21e1cb4a
|
Provenance
The following attestation bundles were made for dynquant-0.1.0.tar.gz:
Publisher:
wheels.yml on kambojvikram/dynquant
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dynquant-0.1.0.tar.gz -
Subject digest:
2b2a2f3f6d97ffd8e7815e4923fd8f4c58f04565a11a2467aafd689c9e9a1f00 - Sigstore transparency entry: 2273239627
- Sigstore integration time:
-
Permalink:
kambojvikram/dynquant@ec4dc4866a98c9ac74ff636261481d7a2290eaea -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/kambojvikram
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@ec4dc4866a98c9ac74ff636261481d7a2290eaea -
Trigger Event:
push
-
Statement type:
File details
Details for the file dynquant-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dynquant-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
019798ef7c35fe916d50cc50f7e95be1197188895260b243f2035f3902c260f7
|
|
| MD5 |
a435f656f905d3cb556a50072cf73c0f
|
|
| BLAKE2b-256 |
755542a905c10f4ba269e03d93f57b7ea5aecff7cba1b30ace5e2c8efaded292
|
Provenance
The following attestation bundles were made for dynquant-0.1.0-py3-none-any.whl:
Publisher:
wheels.yml on kambojvikram/dynquant
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dynquant-0.1.0-py3-none-any.whl -
Subject digest:
019798ef7c35fe916d50cc50f7e95be1197188895260b243f2035f3902c260f7 - Sigstore transparency entry: 2273239654
- Sigstore integration time:
-
Permalink:
kambojvikram/dynquant@ec4dc4866a98c9ac74ff636261481d7a2290eaea -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/kambojvikram
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@ec4dc4866a98c9ac74ff636261481d7a2290eaea -
Trigger Event:
push
-
Statement type: