Skip to main content

quantcheck

Find the smallest quantized version of an open model that still passes your tests.

Early preview (0.0.1). This release reserves the name and shows where the project is going. Sign-in settings are not bundled yet, so the lab stops at the sign-in screen; a usable beta follows. Runs only on your Mac: prompts, answers and models never leave the machine.

A quantized model stores its numbers with fewer bits (8, 6, 4, 3). It is smaller and faster, but can quietly get worse. quantcheck runs every version on your own prompts, with the same instructions, documents and tools your app sends, then tells you:

  • which version is the smallest one that is still safe, with a statistical check, or "cannot tell yet";
  • every answer that changed or failed, side by side with the reference;
  • speed, time to first token, peak memory and file size per version.

Quick start (about 2 minutes, plus model download)

Needs an Apple Silicon Mac (M1 or newer), Python 3.11+ and uv.

pip install "quantcheck[mlx]"     # add [llamacpp] for GGUF files
quantcheck hw                     # chip, memory, free disk

Sign in once (opens your browser; needs the sign-in settings, see Status below):

quantcheck login

Run the example (Qwen3-8B, 3 versions, downloads a few GB the first time):

quantcheck run examples/quantcheck.yaml

Or use the local lab, which runs only on your Mac:

quantcheck ui

Open runs/<run-id>/report.html in a browser. Rebuild it any time:

quantcheck report <run-id>

Everything is also saved to runs/<run-id>/results.json.

Your own tests

tests.jsonl has one test per line. A first line with "type": "set" holds what your app sends with every question (instructions, tools). See examples/tests.jsonl: English, Hindi and Tamil prompts, a document-grounded answer, a tool call and an "I don't know" case.

{"id": "hi-001", "prompt": "ऑर्डर कैंसल कैसे करें?", "checks": [{"type": "language", "value": "hi"}], "tags": ["hindi"]}

Checks (hard yes/no): json, json_schema, regex, contains, not_contains, language, min_length, max_length, tool_call, grounded, refusal. Tools are never executed: quantcheck only reads the tool call the model writes and plays back the result you recorded.

How the score works: a failed check scores 0, otherwise a judge model scores 0 to 10 against the reference (the expected answer, or the largest version). The judge also runs on your Mac.

What a report looks like

report.html is one file that opens offline. It shows the recommendation ("use 6-bit", or "not proven yet"), speed, memory and file size per version, quality by tag, and every answer that changed or failed, side by side with the reference. With fewer than 20 prompts quantcheck refuses to name a safe version; use 100 or more for real decisions.

Status

Working: the local lab (quantcheck ui: sign in, start a test, watch progress, read reports), test loader, MLX and llama.cpp runners, checks, local judge, recommendation, terminal and HTML reports. Sign-in (quantcheck login, logout, whoami) works with Google through a Supabase project (see docs/decisions/001-auth-provider.md). Token refresh and sign-out are tested with mocks only so far. Not built yet: judge: claude, quantizing models yourself, GPU runners.

Known limits:

  • The language check works by script (Devanagari, Tamil, Telugu, Bengali and more) and English. It cannot tell Hindi from Marathi, and does not support other Latin-script languages yet.
  • llama.cpp peak memory is sampled from process memory: compare versions with each other, not with MLX numbers.
  • Tool calls are read for Qwen/Hermes, Mistral and Llama 3 formats.

Develop

uv sync --extra dev --extra mlx --extra llamacpp
uv run pytest -q            # fast tests, no model downloads
uv run pytest -m slow       # real tiny-model tests (downloads ~1 GB)
uv run ruff check . && uv run ruff format .

License: Apache-2.0.

Metadata

Release files for quantcheck 0.0.2

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

Source distribution (sdist)

Source distribution for quantcheck 0.0.2
File Size Uploaded Provenance Actions
quantcheck-0.0.2.tar.gz 525.5 kB Without provenance Details for quantcheck-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for quantcheck 0.0.2
File Interpreter ABI Platform Actions
quantcheck-0.0.2-py3-none-any.whl Python 3 none any Details for quantcheck-0.0.2-py3-none-any.whl

Total release size: 1.0 MB

Release files / quantcheck-0.0.2.tar.gz

Download URL quantcheck-0.0.2.tar.gz
Size 525.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ab441b58979e2729a39ce1545fae77820cc86dca3f955072c87d4118fb2f5e5b
BLAKE2b-256 checksum
How to use checksums
cd3d21b783540fbf903dd0d97efa716584e8dba842e1073d24b1a0ccd9b18b82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / quantcheck-0.0.2-py3-none-any.whl

Download URL quantcheck-0.0.2-py3-none-any.whl
Size 517.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7e2f7184a45c918d9bf29f2de5d9ff6bd74bb192c9f94cd8487ba8ed15b82a7f
BLAKE2b-256 checksum
How to use checksums
b113e1860ff6e1727382a65b3b4c7be279a62a85fd79531a9b69b46f7e8dbd39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for quantcheck 0.0.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

0.0.2 This release

2 release files No provenance

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