{"id":13654231,"url":"https://github.com/Xilinx/brevitas","last_synced_at":"2025-04-23T08:31:57.469Z","repository":{"id":40002736,"uuid":"140494324","full_name":"Xilinx/brevitas","owner":"Xilinx","description":"Brevitas: neural network quantization in PyTorch","archived":false,"fork":false,"pushed_at":"2025-04-17T14:01:08.000Z","size":21055,"stargazers_count":1292,"open_issues_count":204,"forks_count":210,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-04-18T04:49:20.004Z","etag":null,"topics":["brevitas","deep-learning","fpga","hardware-acceleration","neural-networks","ptq","pytorch","qat","quantization","xilinx"],"latest_commit_sha":null,"homepage":"https://xilinx.github.io/brevitas/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Xilinx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-07-10T22:37:01.000Z","updated_at":"2025-04-17T20:43:33.000Z","dependencies_parsed_at":"2023-10-04T21:57:38.924Z","dependency_job_id":"82944a3f-1a61-49fd-bb57-de7dd99b86a7","html_url":"https://github.com/Xilinx/brevitas","commit_stats":{"total_commits":1282,"total_committers":23,"mean_commits":55.73913043478261,"dds":"0.45553822152886114","last_synced_commit":"200456825f3b4b8db414f2b25b64311f82d3991a"},"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xilinx%2Fbrevitas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xilinx%2Fbrevitas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xilinx%2Fbrevitas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xilinx%2Fbrevitas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xilinx","download_url":"https://codeload.github.com/Xilinx/brevitas/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250399509,"owners_count":21424195,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["brevitas","deep-learning","fpga","hardware-acceleration","neural-networks","ptq","pytorch","qat","quantization","xilinx"],"created_at":"2024-08-02T02:01:25.384Z","updated_at":"2025-04-23T08:31:53.651Z","avatar_url":"https://github.com/Xilinx.png","language":"Python","funding_links":[],"categories":["Tools"],"sub_categories":["Approximations Frameworks"],"readme":"# Brevitas\n\n[![Downloads](https://pepy.tech/badge/brevitas)](https://pepy.tech/project/brevitas)\n[![Pytest](https://github.com/Xilinx/brevitas/actions/workflows/pytest.yml/badge.svg?branch=master)](https://github.com/Xilinx/brevitas/actions/workflows/pytest.yml)\n[![Examples Pytest](https://github.com/Xilinx/brevitas/actions/workflows/examples_pytest.yml/badge.svg?branch=master)](https://github.com/Xilinx/brevitas/actions/workflows/examples_pytest.yml)\n[![DOI](https://zenodo.org/badge/140494324.svg)](https://zenodo.org/badge/latestdoi/140494324)\n\nBrevitas is a PyTorch library for neural network quantization, with support for both *post-training quantization (PTQ)* and *quantization-aware training (QAT)*.\n\n**Please note that Brevitas is a research project and not an official Xilinx product.**\n\nIf you like this project please consider ⭐ this repo, as it is the simplest and best way to support it.\n\n## Requirements\n\n* Python \u003e= 3.8.\n* [Pytorch](https://pytorch.org) \u003e= 1.9.1, \u003c= 2.1 (more recent versions would be untested).\n* Windows, Linux or macOS.\n* GPU training-time acceleration (*Optional* but recommended).\n\n## Installation\n\nYou can install the latest release from PyPI:\n```bash\npip install brevitas\n```\n\n## Getting Started\n\nBrevitas currently offers quantized implementations of the most common PyTorch layers used in DNN under `brevitas.nn`, such as `QuantConv1d`, `QuantConv2d`, `QuantConvTranspose1d`, `QuantConvTranspose2d`, `QuantMultiheadAttention`, `QuantRNN`, `QuantLSTM` etc., for adoption within PTQ and/or QAT.\nFor each one of these layers, quantization of different tensors (inputs, weights, bias, outputs, etc) can be individually tuned according to a wide range of quantization settings.\n\nAs a reference for PTQ, Brevitas provides an example user flow for ImageNet classification models under [`brevitas_examples.imagenet_classification.ptq`](https://github.com/Xilinx/brevitas/blob/master/src/brevitas_examples/imagenet_classification/ptq/ptq_evaluate.py) that quantizes an input torchvision model using PTQ under different quantization configurations (e.g. bit-width, granularity of scale, etc).\n\nFor more info, checkout our [getting started guide](https://xilinx.github.io/brevitas/getting_started).\n\n## Cite as\n\nIf you adopt Brevitas in your work, please cite it as:\n```\n@software{brevitas,\n  author       = {Alessandro Pappalardo},\n  title        = {Xilinx/brevitas},\n  year         = {2023},\n  publisher    = {Zenodo},\n  doi          = {10.5281/zenodo.3333552},\n  url          = {https://doi.org/10.5281/zenodo.3333552}\n}\n```\n\n## History\n\n- *2024/10/10* - Release version 0.11.0, see the [release notes](https://github.com/Xilinx/brevitas/releases/tag/v0.11.0).\n- *2024/07/23* - Minor release version 0.10.3, see the [release notes](https://github.com/Xilinx/brevitas/releases/tag/v0.10.3).\n- *2024/02/19* - Minor release version 0.10.2, see the [release notes](https://github.com/Xilinx/brevitas/releases/tag/v0.10.2).\n- *2024/02/15* - Minor release version 0.10.1, see the [release notes](https://github.com/Xilinx/brevitas/releases/tag/v0.10.1).\n- *2023/12/08* - Release version 0.10.0, see the [release notes](https://github.com/Xilinx/brevitas/releases/tag/v0.10.0).\n- *2023/04/28* - Minor release version 0.9.1, see the [release notes](https://github.com/Xilinx/brevitas/releases/tag/v0.9.1).\n- *2023/04/21* - Release version 0.9.0, see the [release notes](https://github.com/Xilinx/brevitas/releases/tag/v0.9.0).\n- *2023/01/10* - Release version 0.8.0, see the [release notes](https://github.com/Xilinx/brevitas/releases/tag/v0.8.0).\n- *2021/12/13* - Release version 0.7.1, fix a bunch of issues. Added TVMCon 2021 tutorial notebook.\n- *2021/11/03* - Re-release version 0.7.0 (build 1) on PyPI to fix a packaging issue.\n- *2021/10/29* - Release version 0.7.0, see the [release notes](https://github.com/Xilinx/brevitas/releases/tag/v0.7.0).\n- *2021/06/04* - Release version 0.6.0, see the [release notes](https://github.com/Xilinx/brevitas/releases/tag/v0.6.0).\n- *2021/05/24* - Release version 0.5.1, fix a bunch of minor issues. See [release notes](https://github.com/Xilinx/brevitas/releases/tag/v0.5.1).\n- *2021/05/06* - Release version 0.5.0, see the [release notes](https://github.com/Xilinx/brevitas/releases/tag/v0.5.0).\n- *2021/03/15* - Release version 0.4.0, add support for \\_\\_torch_function\\_\\_ to QuantTensor.\n- *2021/03/04* - Release version 0.3.1, fix bug w/ act initialization from statistics w/ IGNORE_MISSING_KEYS=1.\n- *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.\n- *2021/02/04* - Release version 0.2.1, includes various bugfixes of QuantTensor w/ zero-point.\n- *2021/01/30* - First release version 0.2.0 on PyPI.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FXilinx%2Fbrevitas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FXilinx%2Fbrevitas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FXilinx%2Fbrevitas/lists"}