Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit 5ba3b84

Browse files
markurtzjeanniefinksbfinerankevinaer
authored
Rebase release/0.1 off of main for 0.1.1 (#45)
* GA code, toctree links (#32) - added tracking for docs output - added help links for docs output * Update README.md (#34) removed placeholder reference to comingsoon repo in favor of active repo * Makefile build command for nightly builds (#35) * docs updates (#36) - correcting double-slash URL issue - enhancing left nav for Help - revised mission statement provided for readme and docs * Zoo functions for loading recipes and base checkpoint weights from stubs (#37) * Update for 0.1.1 release (#40) - update python version to 0.1.1 - setup.py add in version parts and _VERSION_MAJOR_MINOR for more flexibility with dependencies between neural magic packages * base weight loading for pytorch sparse quant models (#39) * add hard check for valid recipe types in download_recipe_from_stub (#42) * Log Level Changes (#44) Logging level to warn, changed credential log to debug, increased credential duration to 30 days * Sparsification update (#43) * Update sparsification descriptions and move to preferred verbage * more sparsification updates * update from comments in deepsparse for sparsification * Update README.md Co-authored-by: Jeannie Finks <[email protected]> * Update README.md Co-authored-by: Jeannie Finks <[email protected]> * Update README.md Co-authored-by: Jeannie Finks <[email protected]> * Update README.md Co-authored-by: Jeannie Finks <[email protected]> * Update docs/source/index.rst Co-authored-by: Jeannie Finks <[email protected]> * Update docs/source/index.rst Co-authored-by: Jeannie Finks <[email protected]> * Update docs/source/index.rst Co-authored-by: Jeannie Finks <[email protected]> * Update docs/source/index.rst Co-authored-by: Jeannie Finks <[email protected]> * Update README.md Co-authored-by: Jeannie Finks <[email protected]> * Update docs/source/index.rst Co-authored-by: Jeannie Finks <[email protected]> * fix links in index.rst for reviewed content * update compontent overviews and taglines * update "this repository link" for docs in overview * update doc links to not have trailing slash Co-authored-by: Jeannie Finks <[email protected]> Co-authored-by: Jeannie Finks (NM) <[email protected]> Co-authored-by: Benjamin Fineran <[email protected]> Co-authored-by: Kevin Escobar Rodriguez <[email protected]>
1 parent 77f10ec commit 5ba3b84

File tree

13 files changed

+354
-171
lines changed

13 files changed

+354
-171
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ DOCDIR := docs
77
MDCHECKGLOBS := 'docs/**/*.md' 'docs/**/*.rst' 'examples/**/*.md' 'notebooks/**/*.md' 'scripts/**/*.md'
88
MDCHECKFILES := CODE_OF_CONDUCT.md CONTRIBUTING.md DEVELOPING.md README.md
99

10+
BUILD_ARGS := # set nightly to build nightly release
1011
TARGETS := "" # targets for running pytests: full,efficientnet,inception,resnet,vgg,ssd,yolo
1112
PYTEST_ARGS := ""
1213
ifneq ($(findstring full,$(TARGETS)),full)
@@ -61,7 +62,7 @@ docs:
6162

6263
# creates wheel file
6364
build:
64-
python3 setup.py sdist bdist_wheel
65+
python3 setup.py sdist bdist_wheel $(BUILD_ARGS)
6566

6667
# clean package
6768
clean:

README.md

Lines changed: 40 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ limitations under the License.
1616

1717
# ![icon for SparseZoo](https://raw.githubusercontent.com/neuralmagic/sparsezoo/main/docs/source/icon-sparsezoo.png) SparseZoo
1818

19-
### Neural network model repository for highly sparse models and optimization recipes
19+
### Neural network model repository for highly sparse and sparse-quantized models with matching sparsification recipes
2020

2121
<p>
2222
<a href="https://github.com/neuralmagic/sparsezoo/blob/main/LICENSE">
23-
<img alt="GitHub" src="https://img.shields.io/github/license/neuralmagic/comingsoon.svg?color=purple&style=for-the-badge" height=25>
23+
<img alt="GitHub" src="https://img.shields.io/github/license/neuralmagic/sparsezoo.svg?color=purple&style=for-the-badge" height=25>
2424
</a>
2525
<a href="https://docs.neuralmagic.com/sparsezoo/index.html">
2626
<img alt="Documentation" src="https://img.shields.io/website/http/docs.neuralmagic.com/sparsezoo/index.html.svg?down_color=red&down_message=offline&up_message=online&style=for-the-badge" height=25>
@@ -44,42 +44,55 @@ limitations under the License.
4444

4545
## Overview
4646

47-
SparseZoo is a constantly-growing repository of optimized models and optimization recipes for neural networks.
47+
SparseZoo is a constantly-growing repository of highly sparse and sparse-quantized models with matching sparsification recipes for neural networks.
4848
It simplifies and accelerates your time-to-value in building performant deep learning models with a collection of inference-optimized models and recipes to prototype from.
4949

50-
Available via API and hosted in the cloud, the SparseZoo contains both baseline and models optimized to different degrees of inference performance vs baseline loss recovery. Optimizations on neural networks include approaches such as [pruning](https://neuralmagic.com/blog/pruning-overview/) and [quantization](https://arxiv.org/abs/1609.07061)
51-
allowing for significantly faster models with limited to no effect on their baseline metrics such as accuracy.
52-
Recipe-driven approaches built around these optimizations allow you to take the models as given, transfer learn from the models onto private datasets, or transfer the recipes to your architectures.
50+
Available via API and hosted in the cloud, the SparseZoo contains both baseline and models optimized to different degrees of inference performance vs. baseline loss recovery.
51+
Recipe-driven approaches built around sparsification algorithms allow you to take the models as given, transfer-learn from the models onto private datasets, or transfer the recipes to your architectures.
5352

5453
This repository contains the Python API code to handle the connection and authentication to the cloud.
5554

56-
### Related Products
5755

58-
- [DeepSparse](https://github.com/neuralmagic/deepsparse): CPU inference engine that delivers unprecedented performance for sparse models
59-
- [SparseML](https://github.com/neuralmagic/sparseml): Libraries for state-of-the-art deep neural network optimization algorithms, enabling simple pipelines integration with a few lines of code
60-
- [Sparsify](https://github.com/neuralmagic/sparsify): Easy-to-use autoML interface to optimize deep neural networks for better inference performance and a smaller footprint
56+
## Sparsification
57+
58+
Sparsification is the process of taking a trained deep learning model and removing redundant information from the overprecise and over-parameterized network resulting in a faster and smaller model.
59+
Techniques for sparsification are all encompassing including everything from inducing sparsity using [pruning](https://neuralmagic.com/blog/pruning-overview/) and [quantization](https://arxiv.org/abs/1609.07061) to enabling naturally occurring sparsity using [activation sparsity](http://proceedings.mlr.press/v119/kurtz20a.html) or [winograd/FFT](https://arxiv.org/abs/1509.09308).
60+
When implemented correctly, these techniques result in significantly more performant and smaller models with limited to no effect on the baseline metrics.
61+
For example, pruning plus quantization can give over [7x improvements in performance](https://neuralmagic.com/blog/benchmark-resnet50-with-deepsparse) while recovering to nearly the same baseline accuracy.
62+
63+
The Deep Sparse product suite builds on top of sparsification enabling you to easily apply the techniques to your datasets and models using recipe-driven approaches.
64+
Recipes encode the directions for how to sparsify a model into a simple, easily editable format.
65+
- Download a sparsification recipe and sparsified model from the [SparseZoo](https://github.com/neuralmagic/sparsezoo).
66+
- Alternatively, create a recipe for your model using [Sparsify](https://github.com/neuralmagic/sparsify).
67+
- Apply your recipe with only a few lines of code using [SparseML](https://github.com/neuralmagic/sparseml).
68+
- Finally, for GPU-level performance on CPUs, deploy your sparse-quantized model with the [DeepSparse Engine](https://github.com/neuralmagic/deepsparse).
69+
70+
71+
**Full Deep Sparse product flow:**
72+
73+
<img src="https://docs.neuralmagic.com/docs/source/sparsification/flow-overview.svg" width="960px">
6174

6275
## Quick Tour
6376

6477
Each model in the SparseZoo has a specific stub that identifies it. The stubs are made up of the following structure:
6578

66-
`DOMAIN/SUB_DOMAIN/ARCHITECTURE{-SUB_ARCHITECTURE}/FRAMEWORK/REPO/DATASET{-TRAINING_SCHEME}/OPTIM_NAME-OPTIM_CATEGORY-{OPTIM_TARGET}`
79+
`DOMAIN/SUB_DOMAIN/ARCHITECTURE{-SUB_ARCHITECTURE}/FRAMEWORK/REPO/DATASET{-TRAINING_SCHEME}/SPARSE_NAME-SPARSE_CATEGORY-{SPARSE_TARGET}`
6780

6881
The properties within each model stub are defined as the following:
6982

70-
| Model Property | Definition | Examples |
71-
|:----------------:|:---------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------:|
72-
| DOMAIN | The type of solution the model is architected and trained for | cv, nlp |
73-
| SUB_DOMAIN | The sub type of solution the model is architected and trained for | classification, segmentation |
74-
| ARCHITECTURE | The name of the guiding setup for the network's graph | resnet_v1, mobilenet_v1 |
75-
| SUB_ARCHITECTURE | (optional) The scaled version of the architecture such as width or depth | 50, 101, 152 |
76-
| FRAMEWORK | The machine learning framework the model was defined and trained in | pytorch, tensorflow_v1 |
77-
| REPO | The model repository the model and baseline weights originated from | sparseml, torchvision |
78-
| DATASET | The dataset the model was trained on | imagenet, cifar10 |
79-
| TRAINING_SCHEME | (optional) A description on how the model was trained | augmented, lower_lr |
80-
| OPTIM_NAME | An overview of what was done to optimize the model | base, pruned, quant (quantized), pruned_quant, arch (architecture modified) |
81-
| OPTIM_CATEGORY | Descriptor on the degree to which the model is optimized as compared with the baseline metric | none, conservative (100% baseline), moderate (>= 99% baseline), aggressive (< 99%) |
82-
| OPTIM_TARGET | (optional) Descriptor for the target environment the model was optimized for | disk, edge, deepsparse, gpu |
83+
| Model Property | Definition | Examples |
84+
|:----------------:|:----------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------:|
85+
| DOMAIN | The type of solution the model is architected and trained for | cv, nlp |
86+
| SUB_DOMAIN | The sub type of solution the model is architected and trained for | classification, segmentation |
87+
| ARCHITECTURE | The name of the guiding setup for the network's graph | resnet_v1, mobilenet_v1 |
88+
| SUB_ARCHITECTURE | (optional) The scaled version of the architecture such as width or depth | 50, 101, 152 |
89+
| FRAMEWORK | The machine learning framework the model was defined and trained in | pytorch, tensorflow_v1 |
90+
| REPO | The model repository the model and baseline weights originated from | sparseml, torchvision |
91+
| DATASET | The dataset the model was trained on | imagenet, cifar10 |
92+
| TRAINING_SCHEME | (optional) A description on how the model was trained | augmented, lower_lr |
93+
| SPARSE_NAME | An overview of what was done to sparsify the model | base, pruned, quant (quantized), pruned_quant, arch (architecture modified) |
94+
| SPARSE_CATEGORY | Descriptor on the degree to which the model is sparsified as compared with the baseline metric | none, conservative (100% baseline), moderate (>= 99% baseline), aggressive (< 99%) |
95+
| SPARSE_TARGET | (optional) Descriptor for the target environment the model was sparsified for | disk, edge, deepsparse, gpu |
8396

8497
The contents of each model are made up of the following:
8598

@@ -89,8 +102,8 @@ The contents of each model are made up of the following:
89102
Currently ONNX does not support sparse tensors and quantized sparse tensors well for compression.
90103
- [FRAMEWORK]/model.[EXTENSION]: The native ML framework file(s) for the model in which it was originally trained.
91104
Such as PyTorch, Keras, TensorFlow V1
92-
- recipes/optimization.[md|yaml]: The original optimization recipe used to create the model.
93-
- recipes/[NAME].[md|yaml]: Additional optimization recipes that can be used with the model such as transfer learning.
105+
- recipes/original.[md|yaml]: The original sparsification recipe used to create the model.
106+
- recipes/[NAME].[md|yaml]: Additional sparsification recipes that can be used with the model such as transfer learning.
94107
- sample-originals: The original sample data without any preprocessing for use with the model.
95108
- sample-inputs: The sample data after pre processing for use with the model.
96109
- sample-outputs: The outputs after running the sample inputs through the model.
@@ -210,7 +223,7 @@ clone the repository and install any additional dependencies as required.
210223

211224
## Available Models and Recipes
212225

213-
A number of pre-trained baseline and optimized models across domains and sub domains are available and constantly being added.
226+
A number of pre-trained baseline and sparsified models across domains and sub domains are available and constantly being added.
214227
For an up to date list, please consult the [available models listing](https://github.com/neuralmagic/sparsezoo/blob/main/docs/source/models.md).
215228

216229
## Resources and Learning More

docs/source/conf.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@
8686
html_theme = "sphinx_rtd_theme"
8787
html_logo = "icon-sparsezoo.png"
8888

89+
html_theme_options = {
90+
'analytics_id': 'UA-128364174-1', # Provided by Google in your dashboard
91+
'analytics_anonymize_ip': False,
92+
}
93+
8994
# Add any paths that contain custom static files (such as style sheets) here,
9095
# relative to this directory. They are copied after the builtin static files,
9196
# so a file named "default.css" will overwrite the builtin "default.css".

docs/source/index.rst

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
SparseZoo |version|
1818
===================
1919

20-
Neural network model repository for highly sparse models and optimization recipes
20+
Neural network model repository for highly sparse and sparse-quantized models with matching sparsification recipes
2121

2222
.. raw:: html
2323

@@ -48,51 +48,53 @@ Neural network model repository for highly sparse models and optimization recipe
4848
Overview
4949
========
5050

51-
SparseZoo is a constantly-growing repository of optimized models and optimization recipes for neural networks.
52-
It simplifies and accelerates your time-to-value in building performant deep learning models with a
53-
collection of inference-optimized models and recipes to prototype from.
51+
SparseZoo is a constantly-growing repository of highly sparse and sparse-quantized models with matching sparsification recipes for neural networks.
52+
It simplifies and accelerates your time-to-value in building performant deep learning models with a collection of inference-optimized models and recipes to prototype from.
5453

55-
Available via API and hosted in the cloud, the SparseZoo contains both baseline and models optimized
56-
to different degrees of inference performance vs baseline loss recovery.
57-
Optimizations on neural networks include approaches such as
58-
`pruning <https://neuralmagic.com/blog/pruning-overview />`_ and `quantization <https://arxiv.org/abs/1609.07061 />`_
59-
allowing for significantly faster models with limited to no effect on their baseline metrics such as accuracy.
60-
Recipe-driven approaches built around these optimizations allow you to take the models as given,
61-
transfer learn from the models onto private datasets, or transfer the recipes to your architectures.
54+
Available via API and hosted in the cloud, the SparseZoo contains both baseline and models optimized to different degrees of inference performance vs. baseline loss recovery.
55+
Recipe-driven approaches built around sparsification algorithms allow you to take the models as given, transfer-learn from the models onto private datasets, or transfer the recipes to your architectures.
6256

63-
This repository contains the Python API code to handle the connection and authentication to the cloud.
57+
`This repository <https://github.com/neuralmagic/sparsezoo>`_ contains the Python API code to handle the connection and authentication to the cloud.
6458

65-
Related Products
66-
================
59+
Sparsification
60+
==============
6761

68-
- `DeepSparse <https://github.com/neuralmagic/deepsparse />`_:
69-
CPU inference engine that delivers unprecedented performance for sparse models
70-
- `SparseML <https://github.com/neuralmagic/sparseml />`_:
71-
Libraries for state-of-the-art deep neural network optimization algorithms,
72-
enabling simple pipelines integration with a few lines of code
73-
- `Sparsify <https://github.com/neuralmagic/sparsify />`_:
74-
Easy-to-use autoML interface to optimize deep neural networks for
75-
better inference performance and a smaller footprint
62+
Sparsification is the process of taking a trained deep learning model and removing redundant information from the overprecise and over-parameterized network resulting in a faster and smaller model.
63+
Techniques for sparsification are all encompassing including everything from inducing sparsity using `pruning <https://neuralmagic.com/blog/pruning-overview/>`_ and `quantization <https://arxiv.org/abs/1609.07061>`_ to enabling naturally occurring sparsity using `activation sparsity <http://proceedings.mlr.press/v119/kurtz20a.html>`_ or `winograd/FFT <https://arxiv.org/abs/1509.09308>`_.
64+
When implemented correctly, these techniques result in significantly more performant and smaller models with limited to no effect on the baseline metrics.
65+
For example, pruning plus quantization can give over `7x improvements in performance <https://neuralmagic.com/blog/benchmark-resnet50-with-deepsparse>`_ while recovering to nearly the same baseline accuracy.
66+
67+
The Deep Sparse product suite builds on top of sparsification enabling you to easily apply the techniques to your datasets and models using recipe-driven approaches.
68+
Recipes encode the directions for how to sparsify a model into a simple, easily editable format.
69+
- Download a sparsification recipe and sparsified model from the `SparseZoo <https://github.com/neuralmagic/sparsezoo>`_.
70+
- Alternatively, create a recipe for your model using `Sparsify <https://github.com/neuralmagic/sparsify>`_.
71+
- Apply your recipe with only a few lines of code using `SparseML <https://github.com/neuralmagic/sparseml>`_.
72+
- Finally, for GPU-level performance on CPUs, deploy your sparse-quantized model with the `DeepSparse Engine <https://github.com/neuralmagic/deepsparse>`_.
73+
74+
75+
**Full Deep Sparse product flow:**
76+
77+
<img src="https://docs.neuralmagic.com/docs/source/sparsification/flow-overview.svg" width="960px">
7678

7779
Resources and Learning More
7880
===========================
7981

80-
- `SparseML Documentation <https://docs.neuralmagic.com/sparseml/ />`_
81-
- `Sparsify Documentation <https://docs.neuralmagic.com/sparsify/ />`_
82-
- `DeepSparse Documentation <https://docs.neuralmagic.com/deepsparse/ />`_
83-
- `Neural Magic Blog <https://www.neuralmagic.com/blog/ />`_,
84-
`Resources <https://www.neuralmagic.com/resources/ />`_,
85-
`Website <https://www.neuralmagic.com/ />`_
82+
- `SparseML Documentation <https://docs.neuralmagic.com/sparseml>`_
83+
- `Sparsify Documentation <https://docs.neuralmagic.com/sparsify>`_
84+
- `DeepSparse Documentation <https://docs.neuralmagic.com/deepsparse>`_
85+
- `Neural Magic Blog <https://www.neuralmagic.com/blog>`_,
86+
`Resources <https://www.neuralmagic.com/resources>`_,
87+
`Website <https://www.neuralmagic.com>`_
8688

8789
Release History
8890
===============
8991

9092
Official builds are hosted on PyPi
91-
- stable: `sparsezoo <https://pypi.org/project/sparsezoo/ />`_
92-
- nightly (dev): `sparsezoo-nightly <https://pypi.org/project/sparsezoo-nightly/ />`_
93+
- stable: `sparsezoo <https://pypi.org/project/sparsezoo>`_
94+
- nightly (dev): `sparsezoo-nightly <https://pypi.org/project/sparsezoo-nightly>`_
9395

9496
Additionally, more information can be found via
95-
`GitHub Releases <https://github.com/neuralmagic/sparsezoo/releases />`_.
97+
`GitHub Releases <https://github.com/neuralmagic/sparsezoo/releases>`_.
9698

9799
.. toctree::
98100
:maxdepth: 3
@@ -110,9 +112,9 @@ Additionally, more information can be found via
110112
api/sparsezoo
111113

112114
.. toctree::
113-
:maxdepth: 2
114-
:caption: Help and Support
115+
:maxdepth: 3
116+
:caption: Help
115117

116-
`Bugs, Feature Requests <https://github.com/neuralmagic/sparsezoo/discussions>`_
117-
`Support, General Q&A <https://github.com/neuralmagic/sparsezoo/issues>`_
118-
118+
Bugs, Feature Requests <https://github.com/neuralmagic/sparsezoo/issues>
119+
Support, General Q&A <https://github.com/neuralmagic/sparsezoo/discussions>
120+
Neural Magic Docs <https://docs.neuralmagic.com>

0 commit comments

Comments
 (0)