nncf


Namenncf JSON
Version 1.7.1 PyPI version JSON
download
home_pagehttps://github.com/openvinotoolkit/nncf
SummaryNeural Networks Compression Framework
upload_time2021-05-06 11:03:20
maintainer
docs_urlNone
authorIntel
requires_python
license
keywords compression quantization sparsity mixed-precision-training quantization-aware-training hawq classification pruning object-detection semantic-segmentation nlp bert transformers mmdetection
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Neural Network Compression Framework (NNCF)

This repository contains a PyTorch\*-based framework and samples for neural networks compression.

The framework is organized as a Python\* package that can be built and used in a standalone mode.
The framework architecture is unified to make it easy to add different compression methods.

The samples demonstrate the usage of compression algorithms for three different use cases on public models and datasets: Image Classification, Object Detection and Semantic Segmentation.
[Compression results](#nncf-compressed-model-zoo) achievable with the NNCF-powered samples can be found in a table at the end of this document.

## Key Features

- Support of various compression algorithms, applied during a model fine-tuning process to achieve best compression parameters and accuracy:
    - [Quantization](./docs/compression_algorithms/Quantization.md)
    - [Binarization](./docs/compression_algorithms/Binarization.md)
    - [Sparsity](./docs/compression_algorithms/Sparsity.md)
    - [Filter pruning](./docs/compression_algorithms/Pruning.md)
- Automatic, configurable model graph transformation to obtain the compressed model. The source model is wrapped by the custom class and additional compression-specific layers are inserted in the graph.
- Common interface for compression methods
- GPU-accelerated layers for faster compressed model fine-tuning
- Distributed training support
- Configuration file examples for each supported compression algorithm.
- Git patches for prominent third-party repositories ([mmdetection](https://github.com/open-mmlab/mmdetection), [huggingface-transformers](https://github.com/huggingface/transformers)) demonstrating the process of integrating NNCF into custom training pipelines
- Exporting compressed models to ONNX\* checkpoints ready for usage with [OpenVINO™ toolkit](https://github.com/openvinotoolkit/).

## Usage
The NNCF is organized as a regular Python package that can be imported in your target training pipeline script.
The basic workflow is loading a JSON configuration script containing NNCF-specific parameters determining the compression to be applied to your model, and then passing your model along with the configuration script to the `nncf.create_compressed_model` function.
This function returns a wrapped model ready for compression fine-tuning, and handle to the object allowing you to control the compression during the training process:

```python
import torch
import nncf  # Important - should be imported directly after torch
from nncf import create_compressed_model, NNCFConfig, register_default_init_args

# Instantiate your uncompressed model
from torchvision.models.resnet import resnet50
model = resnet50()

# Load a configuration file to specify compression
nncf_config = NNCFConfig.from_json("resnet50_int8.json")

# Provide data loaders for compression algorithm initialization, if necessary
nncf_config = register_default_init_args(nncf_config, train_loader, loss_criterion)

# Apply the specified compression algorithms to the model
comp_ctrl, compressed_model = create_compressed_model(model, nncf_config)

# Now use compressed_model as a usual torch.nn.Module to fine-tune compression parameters along with the model weights

# ... the rest of the usual PyTorch-powered training pipeline

# Export to ONNX or .pth when done fine-tuning
comp_ctrl.export_model("compressed_model.onnx")
torch.save(compressed_model.state_dict(), "compressed_model.pth")
```

For a more detailed description of NNCF usage in your training code, see [Usage.md](./docs/Usage.md). For in-depth examples of NNCF integration, browse the [sample scripts](#model-compression-samples) code, or the [example patches](#third-party-repository-integration) to third-party repositories.

For more details about the framework architecture, refer to the [NNCFArchitecture.md](./docs/NNCFArchitecture.md).


## Model Compression Samples

For a quicker start with NNCF-powered compression, you can also try the sample scripts, each of which provides a basic training pipeline for classification, semantic segmentation and object detection neural network training correspondingly.

To run the samples please refer to the corresponding tutorials:
- [Image Classification sample](examples/classification/README.md)
- [Object Detection sample](examples/object_detection/README.md)
- [Semantic Segmentation sample](examples/semantic_segmentation/README.md)

## Third-party repository integration
NNCF may be straightforwardly integrated into training/evaluation pipelines of third-party repositories.
See [third_party_integration](./third_party_integration) for examples of code modifications (Git patches and base commit IDs are provided) that are necessary to integrate NNCF into select repositories.


## System requirements
- Ubuntu\* 18.04 or later (64-bit)
- Python\* 3.7 or later
- NVidia CUDA\* Toolkit 10.2 or later^
- PyTorch\* 1.5 or later (1.8.0 not supported, 1.8.1 supported)

*NOTE:* The best known PyTorch version for the current NNCF is 1.8.1, and it is highly recommended to use it.

^ If a torch package built for specific CUDA version is already present in the environment into which NNCF is being installed,
and if it has a matching base version, then the CUDA version for which the present torch package is targeted will be used.

Otherwise NNCF will install the latest available torch version from pip, which is targeted to the CUDA version of PyTorch packaging strategy's choosing.
For PyTorch 1.8.1, the default CUDA is 10.2.

## Installation
We suggest to install or use the package in the [Python virtual environment](https://docs.python.org/3/tutorial/venv.html).


#### As a package built from a checked-out repository:
1) Install the following system dependencies:

`sudo apt-get install python3-dev`

2) Install the package and its dependencies by running the following in the repository root directory:

`python setup.py install`


_NB_: For launching example scripts in this repository, we recommend replacing the `install` option above with `develop` and setting the `PYTHONPATH` variable to the root of the checked-out repository.

#### As a PyPI package:
NNCF can be installed as a regular PyPI package via pip:
```
sudo apt install python3-dev
pip install nncf
```

#### As a Docker image
Use one of the Dockerfiles in the [docker](./docker) directory to build an image with an environment already set up and ready for running NNCF [sample scripts](#model-compression-samples).

**NOTE**: If you want to use sample training scripts provided in the NNCF repository under `examples`, you should install the corresponding Python package dependencies:
```
pip install -r examples/requirements.txt
```

## Contributing
Refer to the [CONTRIBUTING.md](./CONTRIBUTING.md) file for guidelines on contributions to the NNCF repository.

## NNCF Compressed Model Zoo

Results achieved using sample scripts and NNCF configuration files provided with this repository. See README.md files for [sample scripts](#model-compression-samples) for links to exact configuration files and final PyTorch checkpoints.

Quick jump to sample type:

[Classification](#classification)

[Object detection](#object-detection)

[Semantic segmentation](#semantic-segmentation)

[Natural language processing (3rd-party training pipelines)](#nlp)

[Object detection (3rd-party training pipelines)](#object-detection-mmdetection)

[Instance Segmentation (3rd-party training pipelines)](#instance-segmentation-mmdetection)


#### Classification

|Model|Compression algorithm|Dataset|PyTorch FP32 baseline|PyTorch compressed accuracy|
| :---: | :---: | :---: | :---: | :---: |
|ResNet-50|INT8|ImageNet|76.16|76.42|
|ResNet-50|INT8 (per-tensor only)|ImageNet|76.16|76.37|
|ResNet-50|Mixed, 44.8% INT8 / 55.2% INT4|ImageNet|76.16|76.2|
|ResNet-50|INT8 + Sparsity 61% (RB)|ImageNet|76.16|75.43|
|ResNet-50|INT8 + Sparsity 50% (RB)|ImageNet|76.16|75.55|
|ResNet-50|Filter pruning, 40%, geometric median criterion|ImageNet|76.16|75.62|
|Inception V3|INT8|ImageNet|77.34|78.25|
|Inception V3|INT8 + Sparsity 61% (RB)|ImageNet|77.34|77.58|
|MobileNet V2|INT8|ImageNet|71.93|71.35|
|MobileNet V2|INT8 (per-tensor only)|ImageNet|71.93|71.3|
|MobileNet V2|Mixed, 46.6% INT8 / 53.4% INT4|ImageNet|71.93|70.92|
|MobileNet V2|INT8 + Sparsity 52% (RB)|ImageNet|71.93|71.11|
|SqueezeNet V1.1|INT8|ImageNet|58.24|58.28|
|SqueezeNet V1.1|INT8 (per-tensor only)|ImageNet|58.24|58.26|
|SqueezeNet V1.1|Mixed, 54.7% INT8 / 45.3% INT4|ImageNet|58.24|58.9|
|ResNet-18|XNOR (weights), scale/threshold (activations)|ImageNet|69.8|61.63|
|ResNet-18|DoReFa (weights), scale/threshold (activations)|ImageNet|69.8|61.61|
|ResNet-18|Filter pruning, 40%, magnitude criterion|ImageNet|69.8|69.26|
|ResNet-18|Filter pruning, 40%, geometric median criterion|ImageNet|69.8|69.32|
|ResNet-34|Filter pruning, 40%, geometric median criterion|ImageNet|73.3|72.73|
|GoogLeNet|Filter pruning, 40%, geometric median criterion|ImageNet|69.75|68.82|

#### Object detection

|Model|Compression algorithm|Dataset|PyTorch FP32 baseline|PyTorch compressed accuracy|
| :---: | :---: | :---: | :---: | :---: |
|SSD300-MobileNet|INT8 + Sparsity 70% (Magnitude)|VOC12+07 train, VOC07 eval|62.23|62.94|
|SSD300-VGG-BN|INT8|VOC12+07 train, VOC07 eval|78.28|77.96|
|SSD300-VGG-BN|INT8 + Sparsity 70% (Magnitude)|VOC12+07 train, VOC07 eval|78.28|77.59|
|SSD300-VGG-BN|Filter pruning, 40%, geometric median criterion|VOC12+07 train, VOC07 eval|78.28|77.72|
|SSD512-VGG-BN|INT8|VOC12+07 train, VOC07 eval|80.26|80.12|
|SSD512-VGG-BN|INT8 + Sparsity 70% (Magnitude)|VOC12+07 train, VOC07 eval|80.26|79.67|

#### Semantic segmentation

|Model|Compression algorithm|Dataset|PyTorch FP32 baseline|PyTorch compressed accuracy|
| :---: | :---: | :---: | :---: | :---: |
|UNet|INT8|CamVid|71.95|71.8|
|UNet|INT8 + Sparsity 60% (Magnitude)|CamVid|71.95|72.03|
|ICNet|INT8|CamVid|67.89|67.86|
|ICNet|INT8 + Sparsity 60% (Magnitude)|CamVid|67.89|67.18|
|UNet|INT8|Mapillary|56.23|55.87|
|UNet|INT8 + Sparsity 60% (Magnitude)|Mapillary|56.23|55.65|
|UNet|Filter pruning, 25%, geometric median criterion|Mapillary|56.23|55.62|


#### NLP

|Model|Compression algorithm|Dataset|PyTorch FP32 baseline|PyTorch compressed accuracy|
| :---: | :---: | :---: | :---: | :---: |
|BERT-base-chinese|INT8|XNLI|77.68|77.22|
|BERT-large (Whole Word Masking)|INT8|SQuAD v1.1|93.21 (F1)|92.68 (F1)|
|RoBERTa-large|INT8|MNLI|90.6 (matched)|89.25 (matched)|
|DistilBERT-base|INT8|SST-2|91.1|90.3|
|MobileBERT|INT8|SQuAD v1.1|89.98 (F1)|89.4 (F1)|
|GPT-2|INT8|WikiText-2 (raw)|19.73 (perplexity) | 20.9 (perplexity)|


#### Object detection (MMDetection)

|Model|Compression algorithm|Dataset|PyTorch FP32 baseline|PyTorch compressed accuracy|
| :---: | :---: | :---: | :---: | :---: |
|RetinaNet-ResNet50-FPN|INT8|COCO2017|35.6 (avg bbox mAP)|35.3 (avg bbox mAP)|
|RetinaNet-ResNet50-FPN|INT8 + Sparsity 50%|COCO2017|35.6 (avg bbox mAP)|34.7 (avg bbox mAP)|
|RetinaNet-ResNeXt101-64x4d-FPN|INT8|COCO2017|39.6 (avg bbox mAP)|39.1 (avg bbox mAP)|

#### Instance Segmentation (MMDetection)

|Model|Compression algorithm|Dataset|PyTorch FP32 baseline|PyTorch compressed accuracy|
| :---: | :---: | :---: | :---: | :---: |
|Mask-RCNN-ResNet50-FPN|INT8|COCO2017|40.8 (avg bbox mAP), 37.0 (avg segm mAP)|40.6 (avg bbox mAP), 36.5 (avg segm mAP)|

## Citing

```
@article{kozlov2020neural,
    title =   {Neural network compression framework for fast model inference},
    author =  {Kozlov, Alexander and Lazarevich, Ivan and Shamporov, Vasily and Lyalyushkin, Nikolay and Gorbachev, Yury},
    journal = {arXiv preprint arXiv:2002.08679},
    year =    {2020}
}
```

## Legal Information
[*] Other names and brands may be claimed as the property of others.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/openvinotoolkit/nncf",
    "name": "nncf",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "compression,quantization,sparsity,mixed-precision-training,quantization-aware-training,hawq,classification,pruning,object-detection,semantic-segmentation,nlp,bert,transformers,mmdetection",
    "author": "Intel",
    "author_email": "alexander.kozlov@intel.com",
    "download_url": "https://files.pythonhosted.org/packages/00/26/d3f696d49427e95f132f49d48a88f6e0e45a0602032bd11d09108c023b1e/nncf-1.7.1.tar.gz",
    "platform": "",
    "description": "# Neural Network Compression Framework (NNCF)\n\nThis repository contains a PyTorch\\*-based framework and samples for neural networks compression.\n\nThe framework is organized as a Python\\* package that can be built and used in a standalone mode.\nThe framework architecture is unified to make it easy to add different compression methods.\n\nThe samples demonstrate the usage of compression algorithms for three different use cases on public models and datasets: Image Classification, Object Detection and Semantic Segmentation.\n[Compression results](#nncf-compressed-model-zoo) achievable with the NNCF-powered samples can be found in a table at the end of this document.\n\n## Key Features\n\n- Support of various compression algorithms, applied during a model fine-tuning process to achieve best compression parameters and accuracy:\n    - [Quantization](./docs/compression_algorithms/Quantization.md)\n    - [Binarization](./docs/compression_algorithms/Binarization.md)\n    - [Sparsity](./docs/compression_algorithms/Sparsity.md)\n    - [Filter pruning](./docs/compression_algorithms/Pruning.md)\n- Automatic, configurable model graph transformation to obtain the compressed model. The source model is wrapped by the custom class and additional compression-specific layers are inserted in the graph.\n- Common interface for compression methods\n- GPU-accelerated layers for faster compressed model fine-tuning\n- Distributed training support\n- Configuration file examples for each supported compression algorithm.\n- Git patches for prominent third-party repositories ([mmdetection](https://github.com/open-mmlab/mmdetection), [huggingface-transformers](https://github.com/huggingface/transformers)) demonstrating the process of integrating NNCF into custom training pipelines\n- Exporting compressed models to ONNX\\* checkpoints ready for usage with [OpenVINO™ toolkit](https://github.com/openvinotoolkit/).\n\n## Usage\nThe NNCF is organized as a regular Python package that can be imported in your target training pipeline script.\nThe basic workflow is loading a JSON configuration script containing NNCF-specific parameters determining the compression to be applied to your model, and then passing your model along with the configuration script to the `nncf.create_compressed_model` function.\nThis function returns a wrapped model ready for compression fine-tuning, and handle to the object allowing you to control the compression during the training process:\n\n```python\nimport torch\nimport nncf  # Important - should be imported directly after torch\nfrom nncf import create_compressed_model, NNCFConfig, register_default_init_args\n\n# Instantiate your uncompressed model\nfrom torchvision.models.resnet import resnet50\nmodel = resnet50()\n\n# Load a configuration file to specify compression\nnncf_config = NNCFConfig.from_json(\"resnet50_int8.json\")\n\n# Provide data loaders for compression algorithm initialization, if necessary\nnncf_config = register_default_init_args(nncf_config, train_loader, loss_criterion)\n\n# Apply the specified compression algorithms to the model\ncomp_ctrl, compressed_model = create_compressed_model(model, nncf_config)\n\n# Now use compressed_model as a usual torch.nn.Module to fine-tune compression parameters along with the model weights\n\n# ... the rest of the usual PyTorch-powered training pipeline\n\n# Export to ONNX or .pth when done fine-tuning\ncomp_ctrl.export_model(\"compressed_model.onnx\")\ntorch.save(compressed_model.state_dict(), \"compressed_model.pth\")\n```\n\nFor a more detailed description of NNCF usage in your training code, see [Usage.md](./docs/Usage.md). For in-depth examples of NNCF integration, browse the [sample scripts](#model-compression-samples) code, or the [example patches](#third-party-repository-integration) to third-party repositories.\n\nFor more details about the framework architecture, refer to the [NNCFArchitecture.md](./docs/NNCFArchitecture.md).\n\n\n## Model Compression Samples\n\nFor a quicker start with NNCF-powered compression, you can also try the sample scripts, each of which provides a basic training pipeline for classification, semantic segmentation and object detection neural network training correspondingly.\n\nTo run the samples please refer to the corresponding tutorials:\n- [Image Classification sample](examples/classification/README.md)\n- [Object Detection sample](examples/object_detection/README.md)\n- [Semantic Segmentation sample](examples/semantic_segmentation/README.md)\n\n## Third-party repository integration\nNNCF may be straightforwardly integrated into training/evaluation pipelines of third-party repositories.\nSee [third_party_integration](./third_party_integration) for examples of code modifications (Git patches and base commit IDs are provided) that are necessary to integrate NNCF into select repositories.\n\n\n## System requirements\n- Ubuntu\\* 18.04 or later (64-bit)\n- Python\\* 3.7 or later\n- NVidia CUDA\\* Toolkit 10.2 or later^\n- PyTorch\\* 1.5 or later (1.8.0 not supported, 1.8.1 supported)\n\n*NOTE:* The best known PyTorch version for the current NNCF is 1.8.1, and it is highly recommended to use it.\n\n^ If a torch package built for specific CUDA version is already present in the environment into which NNCF is being installed,\nand if it has a matching base version, then the CUDA version for which the present torch package is targeted will be used.\n\nOtherwise NNCF will install the latest available torch version from pip, which is targeted to the CUDA version of PyTorch packaging strategy's choosing.\nFor PyTorch 1.8.1, the default CUDA is 10.2.\n\n## Installation\nWe suggest to install or use the package in the [Python virtual environment](https://docs.python.org/3/tutorial/venv.html).\n\n\n#### As a package built from a checked-out repository:\n1) Install the following system dependencies:\n\n`sudo apt-get install python3-dev`\n\n2) Install the package and its dependencies by running the following in the repository root directory:\n\n`python setup.py install`\n\n\n_NB_: For launching example scripts in this repository, we recommend replacing the `install` option above with `develop` and setting the `PYTHONPATH` variable to the root of the checked-out repository.\n\n#### As a PyPI package:\nNNCF can be installed as a regular PyPI package via pip:\n```\nsudo apt install python3-dev\npip install nncf\n```\n\n#### As a Docker image\nUse one of the Dockerfiles in the [docker](./docker) directory to build an image with an environment already set up and ready for running NNCF [sample scripts](#model-compression-samples).\n\n**NOTE**: If you want to use sample training scripts provided in the NNCF repository under `examples`, you should install the corresponding Python package dependencies:\n```\npip install -r examples/requirements.txt\n```\n\n## Contributing\nRefer to the [CONTRIBUTING.md](./CONTRIBUTING.md) file for guidelines on contributions to the NNCF repository.\n\n## NNCF Compressed Model Zoo\n\nResults achieved using sample scripts and NNCF configuration files provided with this repository. See README.md files for [sample scripts](#model-compression-samples) for links to exact configuration files and final PyTorch checkpoints.\n\nQuick jump to sample type:\n\n[Classification](#classification)\n\n[Object detection](#object-detection)\n\n[Semantic segmentation](#semantic-segmentation)\n\n[Natural language processing (3rd-party training pipelines)](#nlp)\n\n[Object detection (3rd-party training pipelines)](#object-detection-mmdetection)\n\n[Instance Segmentation (3rd-party training pipelines)](#instance-segmentation-mmdetection)\n\n\n#### Classification\n\n|Model|Compression algorithm|Dataset|PyTorch FP32 baseline|PyTorch compressed accuracy|\n| :---: | :---: | :---: | :---: | :---: |\n|ResNet-50|INT8|ImageNet|76.16|76.42|\n|ResNet-50|INT8 (per-tensor only)|ImageNet|76.16|76.37|\n|ResNet-50|Mixed, 44.8% INT8 / 55.2% INT4|ImageNet|76.16|76.2|\n|ResNet-50|INT8 + Sparsity 61% (RB)|ImageNet|76.16|75.43|\n|ResNet-50|INT8 + Sparsity 50% (RB)|ImageNet|76.16|75.55|\n|ResNet-50|Filter pruning, 40%, geometric median criterion|ImageNet|76.16|75.62|\n|Inception V3|INT8|ImageNet|77.34|78.25|\n|Inception V3|INT8 + Sparsity 61% (RB)|ImageNet|77.34|77.58|\n|MobileNet V2|INT8|ImageNet|71.93|71.35|\n|MobileNet V2|INT8 (per-tensor only)|ImageNet|71.93|71.3|\n|MobileNet V2|Mixed, 46.6% INT8 / 53.4% INT4|ImageNet|71.93|70.92|\n|MobileNet V2|INT8 + Sparsity 52% (RB)|ImageNet|71.93|71.11|\n|SqueezeNet V1.1|INT8|ImageNet|58.24|58.28|\n|SqueezeNet V1.1|INT8 (per-tensor only)|ImageNet|58.24|58.26|\n|SqueezeNet V1.1|Mixed, 54.7% INT8 / 45.3% INT4|ImageNet|58.24|58.9|\n|ResNet-18|XNOR (weights), scale/threshold (activations)|ImageNet|69.8|61.63|\n|ResNet-18|DoReFa (weights), scale/threshold (activations)|ImageNet|69.8|61.61|\n|ResNet-18|Filter pruning, 40%, magnitude criterion|ImageNet|69.8|69.26|\n|ResNet-18|Filter pruning, 40%, geometric median criterion|ImageNet|69.8|69.32|\n|ResNet-34|Filter pruning, 40%, geometric median criterion|ImageNet|73.3|72.73|\n|GoogLeNet|Filter pruning, 40%, geometric median criterion|ImageNet|69.75|68.82|\n\n#### Object detection\n\n|Model|Compression algorithm|Dataset|PyTorch FP32 baseline|PyTorch compressed accuracy|\n| :---: | :---: | :---: | :---: | :---: |\n|SSD300-MobileNet|INT8 + Sparsity 70% (Magnitude)|VOC12+07 train, VOC07 eval|62.23|62.94|\n|SSD300-VGG-BN|INT8|VOC12+07 train, VOC07 eval|78.28|77.96|\n|SSD300-VGG-BN|INT8 + Sparsity 70% (Magnitude)|VOC12+07 train, VOC07 eval|78.28|77.59|\n|SSD300-VGG-BN|Filter pruning, 40%, geometric median criterion|VOC12+07 train, VOC07 eval|78.28|77.72|\n|SSD512-VGG-BN|INT8|VOC12+07 train, VOC07 eval|80.26|80.12|\n|SSD512-VGG-BN|INT8 + Sparsity 70% (Magnitude)|VOC12+07 train, VOC07 eval|80.26|79.67|\n\n#### Semantic segmentation\n\n|Model|Compression algorithm|Dataset|PyTorch FP32 baseline|PyTorch compressed accuracy|\n| :---: | :---: | :---: | :---: | :---: |\n|UNet|INT8|CamVid|71.95|71.8|\n|UNet|INT8 + Sparsity 60% (Magnitude)|CamVid|71.95|72.03|\n|ICNet|INT8|CamVid|67.89|67.86|\n|ICNet|INT8 + Sparsity 60% (Magnitude)|CamVid|67.89|67.18|\n|UNet|INT8|Mapillary|56.23|55.87|\n|UNet|INT8 + Sparsity 60% (Magnitude)|Mapillary|56.23|55.65|\n|UNet|Filter pruning, 25%, geometric median criterion|Mapillary|56.23|55.62|\n\n\n#### NLP\n\n|Model|Compression algorithm|Dataset|PyTorch FP32 baseline|PyTorch compressed accuracy|\n| :---: | :---: | :---: | :---: | :---: |\n|BERT-base-chinese|INT8|XNLI|77.68|77.22|\n|BERT-large (Whole Word Masking)|INT8|SQuAD v1.1|93.21 (F1)|92.68 (F1)|\n|RoBERTa-large|INT8|MNLI|90.6 (matched)|89.25 (matched)|\n|DistilBERT-base|INT8|SST-2|91.1|90.3|\n|MobileBERT|INT8|SQuAD v1.1|89.98 (F1)|89.4 (F1)|\n|GPT-2|INT8|WikiText-2 (raw)|19.73 (perplexity) | 20.9 (perplexity)|\n\n\n#### Object detection (MMDetection)\n\n|Model|Compression algorithm|Dataset|PyTorch FP32 baseline|PyTorch compressed accuracy|\n| :---: | :---: | :---: | :---: | :---: |\n|RetinaNet-ResNet50-FPN|INT8|COCO2017|35.6 (avg bbox mAP)|35.3 (avg bbox mAP)|\n|RetinaNet-ResNet50-FPN|INT8 + Sparsity 50%|COCO2017|35.6 (avg bbox mAP)|34.7 (avg bbox mAP)|\n|RetinaNet-ResNeXt101-64x4d-FPN|INT8|COCO2017|39.6 (avg bbox mAP)|39.1 (avg bbox mAP)|\n\n#### Instance Segmentation (MMDetection)\n\n|Model|Compression algorithm|Dataset|PyTorch FP32 baseline|PyTorch compressed accuracy|\n| :---: | :---: | :---: | :---: | :---: |\n|Mask-RCNN-ResNet50-FPN|INT8|COCO2017|40.8 (avg bbox mAP), 37.0 (avg segm mAP)|40.6 (avg bbox mAP), 36.5 (avg segm mAP)|\n\n## Citing\n\n```\n@article{kozlov2020neural,\n    title =   {Neural network compression framework for fast model inference},\n    author =  {Kozlov, Alexander and Lazarevich, Ivan and Shamporov, Vasily and Lyalyushkin, Nikolay and Gorbachev, Yury},\n    journal = {arXiv preprint arXiv:2002.08679},\n    year =    {2020}\n}\n```\n\n## Legal Information\n[*] Other names and brands may be claimed as the property of others.\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Neural Networks Compression Framework",
    "version": "1.7.1",
    "split_keywords": [
        "compression",
        "quantization",
        "sparsity",
        "mixed-precision-training",
        "quantization-aware-training",
        "hawq",
        "classification",
        "pruning",
        "object-detection",
        "semantic-segmentation",
        "nlp",
        "bert",
        "transformers",
        "mmdetection"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "fff4d2893f3a1d09dfc089ec75d91397",
                "sha256": "63aade3b14aaf152b1b065f162d35c09dac2b34648bd8d9b08a6f1d89db36a7a"
            },
            "downloads": -1,
            "filename": "nncf-1.7.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fff4d2893f3a1d09dfc089ec75d91397",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 327571,
            "upload_time": "2021-05-06T11:03:19",
            "upload_time_iso_8601": "2021-05-06T11:03:19.056144Z",
            "url": "https://files.pythonhosted.org/packages/ef/77/d1fad8316a5f40edac1f5bdf375275030ea917132ffbdee0c0a51747e866/nncf-1.7.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "08b389459a5e480c254bff9a416ff869",
                "sha256": "ccbacab5ce06e1afe861ff8254acdccc71efc65a02a05e4d38c126a92b5499f3"
            },
            "downloads": -1,
            "filename": "nncf-1.7.1.tar.gz",
            "has_sig": false,
            "md5_digest": "08b389459a5e480c254bff9a416ff869",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 249100,
            "upload_time": "2021-05-06T11:03:20",
            "upload_time_iso_8601": "2021-05-06T11:03:20.079852Z",
            "url": "https://files.pythonhosted.org/packages/00/26/d3f696d49427e95f132f49d48a88f6e0e45a0602032bd11d09108c023b1e/nncf-1.7.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-05-06 11:03:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": null,
    "github_project": "openvinotoolkit",
    "error": "Could not fetch GitHub repository",
    "lcname": "nncf"
}
        
Elapsed time: 0.26428s