Skip to content

Commit

Permalink
Jfinks sparsezoo doc update (#124) (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul-tuli committed Feb 1, 2022
1 parent c51a70c commit 207a08f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 39 deletions.
42 changes: 4 additions & 38 deletions README.md
Expand Up @@ -53,7 +53,7 @@ limitations under the License.

## Overview

SparseZoo is a constantly-growing repository of sparsified (pruned and pruned-quantized) models with matching sparsification recipes for neural networks.
[SparseZoo is a constantly-growing repository](https://sparsezoo.neuralmagic.com) of sparsified (pruned and pruned-quantized) models with matching sparsification recipes for neural networks.
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.
Read more about sparsification [here](https://docs.neuralmagic.com/main/source/getstarted.html#sparsification).

Expand All @@ -66,8 +66,9 @@ The [GitHub repository](https://github.com/neuralmagic/sparsezoo) contains the P

## Highlights

- [Available Models Listing](https://github.com/neuralmagic/sparsezoo/blob/main/docs/source/models.md)
- [Available Recipes Listing](https://github.com/neuralmagic/sparsezoo/blob/main/docs/source/recipes.md)
- [Model Stub Architecture Overview](https://github.com/neuralmagic/sparsezoo/blob/main/docs/source/models.md)
- [Available Model Recipes](https://github.com/neuralmagic/sparsezoo/blob/main/docs/source/recipes.md)
- [sparsezoo.neuralmagic.com](https://sparsezoo.neuralmagic.com)

## Installation

Expand All @@ -82,41 +83,6 @@ pip install sparsezoo

## Quick Tour

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

`DOMAIN/SUB_DOMAIN/ARCHITECTURE{-SUB_ARCHITECTURE}/FRAMEWORK/REPO/DATASET{-TRAINING_SCHEME}/SPARSE_NAME-SPARSE_CATEGORY-{SPARSE_TARGET}`

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

| Model Property | Definition | Examples |
|:----------------:|:----------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------:|
| DOMAIN | The type of solution the model is architected and trained for | cv, nlp |
| SUB_DOMAIN | The sub type of solution the model is architected and trained for | classification, segmentation |
| ARCHITECTURE | The name of the guiding setup for the network's graph | resnet_v1, mobilenet_v1 |
| SUB_ARCHITECTURE | (optional) The scaled version of the architecture such as width or depth | 50, 101, 152 |
| FRAMEWORK | The machine learning framework the model was defined and trained in | pytorch, tensorflow_v1 |
| REPO | The model repository the model and baseline weights originated from | sparseml, torchvision |
| DATASET | The dataset the model was trained on | imagenet, cifar10 |
| TRAINING_SCHEME | (optional) A description on how the model was trained | augmented, lower_lr |
| SPARSE_NAME | An overview of what was done to sparsify the model | base, pruned, quant (quantized), pruned_quant, arch (architecture modified) |
| 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%) |
| SPARSE_TARGET | (optional) Descriptor for the target environment the model was sparsified for | disk, edge, deepsparse, gpu |

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

- model.md: The model card containing metadata, descriptions, and information for the model.
- model.onnx: The [ONNX](https://onnx.ai/) representation of the model's graph.
- model.onnx.tar.gz: A compressed format for the ONNX file.
Currently ONNX does not support sparse tensors and quantized sparse tensors well for compression.
- [FRAMEWORK]/model.[EXTENSION]: The native ML framework file(s) for the model in which it was originally trained.
Such as PyTorch, Keras, TensorFlow V1
- recipes/original.[md|yaml]: The original sparsification recipe used to create the model.
- recipes/[NAME].[md|yaml]: Additional sparsification recipes that can be used with the model such as transfer learning.
- sample-originals: The original sample data without any preprocessing for use with the model.
- sample-inputs: The sample data after pre processing for use with the model.
- sample-outputs: The outputs after running the sample inputs through the model.
- sample-labels: The labels that classify the sample inputs.

### Python APIS

The Python APIs respect this format enabling you to search and download models. Some code examples are given below.
Expand Down
3 changes: 2 additions & 1 deletion docs/index.rst
Expand Up @@ -18,7 +18,8 @@
.. toctree::
:maxdepth: 3
:caption: General


SparseZoo Repository <https://github.com/neuralmagic/sparsezoo/issues>
source/models
source/recipes

Expand Down

0 comments on commit 207a08f

Please sign in to comment.