Skip to main content

Implementing auto adpq

Project description

Docs Paper CI Build and Release

auto_adpq

Adaptive Post-Training Quantization tooling (replicating AdpQ)

This repository implements tools and reference code to reproduce the ideas from AdpQ: A Zero-shot Calibration Free Adaptive Post Training Quantization Method for LLMs.

This README explains how to install, run tests, build documentation (including multi-version docs), and contribute.

Installation

Install from PyPI (recommended):

python -m pip install auto_adpq

Install the latest development version directly from GitHub:

python -m pip install "git+https://github.com/Tfloow/auto_adpq.git"

To develop locally (editable install):

git clone https://github.com/Tfloow/auto_adpq.git
cd auto_adpq
python -m pip install -e .

Makefile helper:

# Run formatting, linting, coverage and docs targets as defined in Makefile
make

Quick usage

Import the package and use the public API. Example (replace with real API):

from auto_adpq import Auto_AdpQ

Add a short usage snippet here specific to the package functions you expect users to try first.

Running tests & linters

Coverage test: 75%

  • Run tests with pytest:
pytest -q
  • Run full coverage report (Makefile target):
make coverage
  • Format & lint with ruff (Makefile target):
make ruff

Debug mode

To obtain logs of the package, it is possible to enable the logging module. To activate it please create the new environment variable AUTO_ADPQ_DEBUG by running:

# Linux
export AUTO_ADPQ_DEBUG=1

# Windows
$Env:AUTO_ADPQ_DEBUG = 1

Documentation

The documentation can be found here.

Building the documentation

This project uses Sphinx for documentation. There are two common workflows:

  • Build a single-version site (useful for local writing and previews):
python -m pip install -r docs/requirements.txt
python -m sphinx -b html docs docs/_build/html
  • Build a multi-version site using sphinx-multiversion (we configure this in docs/conf.py). This produces one static site containing each built branch and tag (useful for publishing versioned docs with a dropdown selector):
python -m pip install -r docs/requirements.txt
sphinx-multiversion docs docs/_build/html-mv

Notes about versions

  • The project includes a small template docs/_templates/versions.html which renders a versions dropdown when the site is built with sphinx-multiversion.
  • Adjust smv_tag_whitelist and smv_branch_whitelist in docs/conf.py to control which tags/branches are included in the build.

Contributing

Contributions are welcome. A suggested workflow:

  1. Fork the repository and create a feature branch.
  2. Add tests for new functionality.
  3. Run ruff to format and lint.
  4. Open a pull request describing the change.

Please include unit tests and keep the public API stable when possible.

Development notes

  • Docs templates: docs/_templates/versions.html — version switcher used by sphinx-multiversion.
  • Makefile targets: make ruff, make coverage, make docs (runs single and multiversion builds).

License

This work is under Apache 2.0 License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

auto_adpq-0.2.0.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

auto_adpq-0.2.0-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file auto_adpq-0.2.0.tar.gz.

File metadata

  • Download URL: auto_adpq-0.2.0.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for auto_adpq-0.2.0.tar.gz
Algorithm Hash digest
SHA256 597e814fd264398dff509a45d94d351a268c128bbe6d2371a8374d1a9ee5d108
MD5 2a1a3bd7c0276b60be56320f86380257
BLAKE2b-256 366b36ae58be974f268d1464656e8f9dc3cd6caef6cc1441fca95fa127fee70a

See more details on using hashes here.

File details

Details for the file auto_adpq-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: auto_adpq-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for auto_adpq-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 695830f1341908f059a69a7942e372adac99e6dae5d8cd26166e86e8af045f5e
MD5 07868acbeae54e69c50d33f6af623e8f
BLAKE2b-256 0fdaf1bfbdcd41ae2434c4f02dfa1a8ea2d41a9138809d24e44d780e1169fa83

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page