Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

quantcard

Quantization report cards for PyTorch models headed to the edge.

You trained a model and you want it smaller and faster on-device. torchao gives you a dozen quantization configs; ExecuTorch consumes them; but nothing tells you, for your model, what each config costs in accuracy and buys in size and latency. quantcard answers that with one command:

pip install quantcard

quantcard report my_model.py
| config       | top-1 acc | acc delta | weights  | size ratio | latency (ms) | speedup |
|--------------|-----------|-----------|----------|------------|--------------|---------|
| fp32         | 98.44%    | +0.00%    | 100 KiB  | 1.00x      | 0.05         | 1.00x   |
| int8wo       | 98.44%    | +0.00%    | 33 KiB   | 0.33x      | 0.05         | 1.05x   |
| int8da-int8w | 98.24%    | -0.20%    | 33 KiB   | 0.33x      | 0.06         | 0.90x   |

Your model file just needs two functions:

# my_model.py
def get_model():          # -> torch.nn.Module (trained, ready for eval)
    ...

def get_eval_batches():   # -> iterable of (inputs, targets)
    ...

Configs

fp32 (baseline) · int8wo · int8da-int8w · int4wo · int8da-int4w (the classic ExecuTorch 8da4w recipe) · qat-int8da-int4w (QAT prepare step — what the fake-quant numerics cost before any training). Run quantcard report model.py --configs all for everything.

ExecuTorch export column

With the executorch package installed (pip install quantcard[pte]), --pte adds a column with the exported .pte program size — and tells you honestly when a config can't export yet:

| config | ... | .pte |
| fp32   | ... | 102 KiB |
| int8wo | ... | 32 KiB |
| int8da-int4w | ... | export failed (RuntimeError) |

Status

Early alpha, deliberately narrow: torchao configs, CPU accuracy/size/latency, .pte export size, markdown reports. Planned next: robustness rows (input noise, quantized-vs-float disagreement rate), QAT convert deltas after a training hook, and device latency via ExecuTorch runners.

Development

pip install -e .[dev]
pytest

License

MIT

Metadata

Release files for quantcard 0.1.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for quantcard 0.1.0a1
File Size Uploaded Provenance
quantcard-0.1.0a1.tar.gz 8.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for quantcard 0.1.0a1
File Interpreter ABI Platform
quantcard-0.1.0a1-py3-none-any.whl Python 3 none any Details

Total release size: 16.9 kB

Release files / quantcard-0.1.0a1.tar.gz

Download URL quantcard-0.1.0a1.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c20f1ab9c13072c72de11a2e27b25c82c30460b5b8712c8a2f246d2a925d06b9
BLAKE2b-256 checksum
How to use checksums
37dd6a6f3aae0be41ae86ec0c9d6407cdf9d9655961fa686d07cc0bb29aa5a9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 8, 2026.

Transparency log

Release files / quantcard-0.1.0a1-py3-none-any.whl

Download URL quantcard-0.1.0a1-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2ee5620cadea9090f68af4094ebc7e6802b0bc732f029edb83ff1f042db715e9
BLAKE2b-256 checksum
How to use checksums
92e78cc17b962b7fe12f40a32b1a0deaec6f5daf1940d73aa0142995ed0a627b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 8, 2026.

Transparency log

Security for quantcard 0.1.0a1

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.

Select from 2 files

Attestation for quantcard-0.1.0a1.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 Jul 8, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page