This release is a pre-release and may not be stable for production use.
A Programming System for Model Compression
Condensa is a framework for programmable model compression in Python. It comes with a set of built-in compression operators which may be used to compose complex compression schemes targeting specific combinations of DNN architecture, hardware platform, and optimization objective. To recover any accuracy lost during compression, Condensa uses a constrained optimization formulation of model compression and employs an Augmented Lagrangian-based algorithm as the optimizer.
Status: Condensa is under active development, and bug reports, pull requests, and other feedback are all highly appreciated. See the contributions section below for more details on how to contribute.
Supported Operators and Schemes
Condensa provides the following set of pre-built compression schemes:
The schemes above are built using one or more compression operators, which may be combined in various ways to define your own custom schemes.
Please refer to the documentation for a detailed description of available operators and schemes.
Prerequisites
Condensa requires:
- A working Linux installation (we use Ubuntu 18.04)
- NVIDIA drivers and CUDA 10+ for GPU support
- Python 3.5 or newer
- PyTorch 1.0 or newer
Installation
The most straightforward way of installing Condensa is via pip:
pip install condensa
Installation from Source
Retrieve the latest source code from the Condensa repository:
git clone https://github.com/NVlabs/condensa.git
Navigate to the source code directory and run the following:
pip install -e .
Test out the Installation
To check the installation, run the unit test suite:
bash run_all_tests.sh -v
Getting Started
The AlexNet Notebook contains a simple step-by-step walkthrough of compressing a pre-trained model using Condensa.
Check out the examples folder for additional, more complex examples of using Condensa (note: some examples require the torchvision package to be installed).
Documentation
Documentation is available here. Please also check out the Condensa paper for a detailed description of Condensa's motivation, features, and performance results.
Contributing
We appreciate all contributions, including bug fixes, new features and documentation, and additional tutorials. You can initiate
contributions via Github pull requests. When making code contributions, please follow the PEP 8 Python coding standard and provide
unit tests for the new features. Finally, make sure to sign off your commits using the -s flag or adding
Signed-off-By: Name<Email> in the commit message.
Citing Condensa
If you use Condensa for research, please consider citing the following paper:
@article{condensa2019,
title = {A Programmable Approach to Model Compression},
author = {Joseph, Vinu and Muralidharan, Saurav and Garg, Animesh and Garland, Michael and Gopalakrishnan, Ganesh},
journal = {CoRR},
volume = {1911.02497},
year = {2019},
url = {https://arxiv.org/abs/1911.02497}
}
Disclaimer
Condensa is a research prototype and not an official NVIDIA product. Many features are still experimental and yet to be properly documented.
Metadata
Release files for condensa 0.5.0b0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| condensa-0.5.0b0.tar.gz | 21.1 kB | Without provenance | Details for condensa-0.5.0b0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| condensa-0.5.0b0-py3-none-any.whl | Python 3 | none | any | Details for condensa-0.5.0b0-py3-none-any.whl |
Total release size: 57.1 kB
Release files / condensa-0.5.0b0.tar.gz
| Download URL | condensa-0.5.0b0.tar.gz |
|---|---|
| Size | 21.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e9b1b2a18ec9c26890ab2d0438401b3371b90b661b6d01b116ef073b48e92513
|
|
BLAKE2b-256 checksum How to use checksums |
0d7be2a6d20b2403d3d07d5eb731fc27c66fe4e54011afa33f1bb5dac30fd83d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
|
Release files / condensa-0.5.0b0-py3-none-any.whl
| Download URL | condensa-0.5.0b0-py3-none-any.whl |
|---|---|
| Size | 36.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0a2894ffd86423d0421f9501fe4fb14391caf95bd6e8fb1939eade7f7c03b6a5
|
|
BLAKE2b-256 checksum How to use checksums |
214eaa3898a90c55013f75af91cdc556266aa7d6b716db8a536c21b03d2592b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
|
Security for condensa 0.5.0b0
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.