{"id":13696439,"url":"https://github.com/NVlabs/condensa","last_synced_at":"2025-05-03T17:31:24.067Z","repository":{"id":62564342,"uuid":"189249245","full_name":"NVlabs/condensa","owner":"NVlabs","description":"Programmable Neural Network Compression","archived":false,"fork":false,"pushed_at":"2022-05-26T18:35:45.000Z","size":16954,"stargazers_count":146,"open_issues_count":6,"forks_count":26,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-11-06T05:50:36.651Z","etag":null,"topics":["deep-neural-networks","model-compression","model-pruning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NVlabs.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}},"created_at":"2019-05-29T15:10:25.000Z","updated_at":"2024-01-04T16:34:18.000Z","dependencies_parsed_at":"2022-11-03T16:46:02.828Z","dependency_job_id":null,"html_url":"https://github.com/NVlabs/condensa","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NVlabs%2Fcondensa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NVlabs%2Fcondensa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NVlabs%2Fcondensa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NVlabs%2Fcondensa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NVlabs","download_url":"https://codeload.github.com/NVlabs/condensa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224369538,"owners_count":17299918,"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":["deep-neural-networks","model-compression","model-pruning"],"created_at":"2024-08-02T18:00:40.140Z","updated_at":"2024-11-13T00:30:34.708Z","avatar_url":"https://github.com/NVlabs.png","language":"Python","funding_links":[],"categories":["Tools","Networks"],"sub_categories":["Libraries"],"readme":"# A Programming System for Neural Network Compression\n\n**Note:** the original version of Condensa (contained in this branch) is no longer actively maintained. Please check out the [lite branch](https://github.com/NVlabs/condensa/tree/lite) for the most up-to-date version.\n\nCondensa is a framework for _programmable model compression_ in Python.\nIt comes with a set of built-in compression operators which may be used to\ncompose complex compression schemes targeting specific combinations of DNN architecture,\nhardware platform, and optimization objective.\nTo recover any accuracy lost during compression, Condensa uses a constrained\noptimization formulation of model compression and employs an Augmented Lagrangian-based\nalgorithm as the optimizer.\n\n**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.\n\n## Supported Operators and Schemes\n\nCondensa provides the following set of pre-built compression schemes:\n\n* [Unstructured Pruning](https://nvlabs.github.io/condensa/modules/schemes.html#unstructured-pruning)\n* [Filter and Neuron Pruning](https://nvlabs.github.io/condensa/modules/schemes.html#neuron-pruning)\n* [Block Pruning](https://nvlabs.github.io/condensa/modules/schemes.html#block-pruning)\n* [Quantization](https://nvlabs.github.io/condensa/modules/schemes.html#quantization)\n* [Scheme Composition](https://nvlabs.github.io/condensa/modules/schemes.html#composition)\n\nThe schemes above are built using one or more [compression operators](https://nvlabs.github.io/condensa/modules/pi.html), which may be combined in various ways to define your own custom schemes.\n\nPlease refer to the [documentation](https://nvlabs.github.io/condensa/index.html) for a detailed description of available operators and schemes.\n\n## Prerequisites\n\nCondensa requires:\n\n* A working Linux installation (we use Ubuntu 18.04)\n* NVIDIA drivers and CUDA 10+ for GPU support\n* Python 3.5 or newer\n* PyTorch 1.0 or newer\n\n## Installation\n\nThe most straightforward way of installing Condensa is via `pip`:\n\n```bash\npip install condensa\n```\n\n### Installation from Source\n\nRetrieve the latest source code from the Condensa repository:\n\n```bash\ngit clone https://github.com/NVlabs/condensa.git\n```\n\nNavigate to the source code directory and run the following:\n\n```bash\npip install -e .\n```\n\n### Test out the Installation\n\nTo check the installation, run the unit test suite:\n\n```bash\nbash run_all_tests.sh -v\n```\n\n## Getting Started\n\nThe [AlexNet Notebook](https://github.com/NVlabs/condensa/blob/master/notebooks/AlexNet.ipynb) contains a simple step-by-step walkthrough of compressing a pre-trained model using Condensa.\nCheck out the [`examples` folder](https://github.com/NVlabs/condensa/tree/master/examples/cifar) for additional, more complex examples of using Condensa (**note**: some examples require the `torchvision` package to be installed).\n\n## Documentation\n\nDocumentation is available [here](https://nvlabs.github.io/condensa/). Please also check out the [Condensa paper](https://arxiv.org/abs/1911.02497) for a detailed\ndescription of Condensa's motivation, features, and performance results.\n\n## Contributing\n\nWe appreciate all contributions, including bug fixes, new features and documentation, and additional tutorials. You can initiate\ncontributions via Github pull requests. When making code contributions, please follow the `PEP 8` Python coding standard and provide\nunit tests for the new features. Finally, make sure to sign off your commits using the `-s` flag or adding \n`Signed-off-By: Name\u003cEmail\u003e` in the commit message.\n\n## Citing Condensa\n\nIf you use Condensa for research, please consider citing the following paper:\n\n```\n@article{condensa2020,\n  title={A Programmable Approach to Neural Network Compression}, \n  author={V. {Joseph} and G. L. {Gopalakrishnan} and S. {Muralidharan} and M. {Garland} and A. {Garg}},\n  journal={IEEE Micro}, \n  year={2020},\n  volume={40},\n  number={5},\n  pages={17-25},\n  doi={10.1109/MM.2020.3012391}\n}\n```\n\n## Disclaimer\n\nCondensa is a research prototype and not an official NVIDIA product. Many features are still experimental and yet to be properly documented.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNVlabs%2Fcondensa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNVlabs%2Fcondensa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNVlabs%2Fcondensa/lists"}