Skip to main content

Quantization-aware training in PyTorch

Project description

Brevitas

Downloads Gitter Pytest Examples Pytest DOI

Brevitas is a PyTorch library for neural network quantization, with a focus on quantization-aware training (QAT).

Please note that Brevitas is a research project and not an official Xilinx product.

If you like this project please consider ⭐ this repo, as it is the simplest and best way to support it.

If you have issues, comments, or are just looking for advices on training quantized neural networks, open an issue or a discussion.

Cite as

If you adopt Brevitas in your work, please cite it as:

@software{brevitas,
  author       = {Alessandro Pappalardo},
  title        = {Xilinx/brevitas},
  year         = {2022},
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.3333552},
  url          = {https://doi.org/10.5281/zenodo.3333552}
}

History

  • 2023/01/10 - Release version 0.8.0, see the release notes.
  • 2021/12/13 - Release version 0.7.1, fix a bunch of issues. Added TVMCon 2021 tutorial notebook.
  • 2021/11/03 - Re-release version 0.7.0 (build 1) on PyPI to fix a packaging issue.
  • 2021/10/29 - Release version 0.7.0, see the release notes.
  • 2021/06/04 - Release version 0.6.0, see the release notes.
  • 2021/05/24 - Release version 0.5.1, fix a bunch of minor issues. See release notes.
  • 2021/05/06 - Release version 0.5.0, see the release notes.
  • 2021/03/15 - Release version 0.4.0, add support for __torch_function__ to QuantTensor.
  • 2021/03/04 - Release version 0.3.1, fix bug w/ act initialization from statistics w/ IGNORE_MISSING_KEYS=1.
  • 2021/03/01 - Release version 0.3.0, implements enum and shape solvers within extended dependency injectors. This allows declarative quantizers to be self-contained.
  • 2021/02/04 - Release version 0.2.1, includes various bugfixes of QuantTensor w/ zero-point.
  • 2021/01/30 - First release version 0.2.0 on PyPI.

Requirements

  • Python >= 3.7 .
  • Pytorch >= 1.5.1 .
  • Windows, Linux or macOS.
  • GPU training-time acceleration (Optional but recommended).

Installation

You can install the latest release from PyPI:

pip install brevitas

Getting started

Check out available info at https://xilinx.github.io/brevitas/getting_started .

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

brevitas-0.8.0.tar.gz (301.5 kB view hashes)

Uploaded Source

Built Distribution

brevitas-0.8.0-py3-none-any.whl (357.3 kB view hashes)

Uploaded Python 3

Supported by

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