mct-nightly 2.0.0.20240521.145957__py3-none-any.whl → 2.0.0.20240522.420__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mct_nightly-2.0.0.20240521.145957.dist-info → mct_nightly-2.0.0.20240522.420.dist-info}/METADATA +23 -23
- {mct_nightly-2.0.0.20240521.145957.dist-info → mct_nightly-2.0.0.20240522.420.dist-info}/RECORD +6 -6
- model_compression_toolkit/__init__.py +1 -1
- {mct_nightly-2.0.0.20240521.145957.dist-info → mct_nightly-2.0.0.20240522.420.dist-info}/LICENSE.md +0 -0
- {mct_nightly-2.0.0.20240521.145957.dist-info → mct_nightly-2.0.0.20240522.420.dist-info}/WHEEL +0 -0
- {mct_nightly-2.0.0.20240521.145957.dist-info → mct_nightly-2.0.0.20240522.420.dist-info}/top_level.txt +0 -0
{mct_nightly-2.0.0.20240521.145957.dist-info → mct_nightly-2.0.0.20240522.420.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mct-nightly
|
|
3
|
-
Version: 2.0.0.
|
|
3
|
+
Version: 2.0.0.20240522.420
|
|
4
4
|
Summary: A Model Compression Toolkit for neural networks
|
|
5
5
|
Home-page: UNKNOWN
|
|
6
6
|
License: UNKNOWN
|
|
@@ -33,7 +33,7 @@ This project provides researchers, developers, and engineers tools for optimizin
|
|
|
33
33
|
|
|
34
34
|
Specifically, this project aims to apply quantization to compress neural networks.
|
|
35
35
|
|
|
36
|
-
<img src="
|
|
36
|
+
<img src="docsrc/images/mct_block_diagram.svg" width="10000">
|
|
37
37
|
|
|
38
38
|
MCT is developed by researchers and engineers working at Sony Semiconductor Israel.
|
|
39
39
|
|
|
@@ -41,12 +41,12 @@ MCT is developed by researchers and engineers working at Sony Semiconductor Isra
|
|
|
41
41
|
|
|
42
42
|
## Table of Contents
|
|
43
43
|
|
|
44
|
-
- [Getting Started](
|
|
45
|
-
- [Supported features](
|
|
46
|
-
- [Results](
|
|
47
|
-
- [Troubleshooting](
|
|
48
|
-
- [Contributions](
|
|
49
|
-
- [License](
|
|
44
|
+
- [Getting Started](#getting-started)
|
|
45
|
+
- [Supported features](#supported-features)
|
|
46
|
+
- [Results](#results)
|
|
47
|
+
- [Troubleshooting](#trouble-shooting)
|
|
48
|
+
- [Contributions](#contributions)
|
|
49
|
+
- [License](#license)
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
## Getting Started
|
|
@@ -60,17 +60,17 @@ To install the latest stable release of MCT, run the following command:
|
|
|
60
60
|
pip install model-compression-toolkit
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
For installing the nightly version or installing from source, refer to the [installation guide](
|
|
63
|
+
For installing the nightly version or installing from source, refer to the [installation guide](INSTALLATION.md).
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
### Quick start & tutorials
|
|
67
67
|
|
|
68
68
|
Explore the Model Compression Toolkit (MCT) through our tutorials,
|
|
69
|
-
covering compression techniques for Keras and PyTorch models. Access interactive [notebooks](
|
|
69
|
+
covering compression techniques for Keras and PyTorch models. Access interactive [notebooks](tutorials/README.md)
|
|
70
70
|
for hands-on learning. For example:
|
|
71
|
-
* [Keras MobileNetV2 post training quantization](
|
|
72
|
-
* [Post training quantization with PyTorch](
|
|
73
|
-
* [Data Generation for ResNet18 with PyTorch](
|
|
71
|
+
* [Keras MobileNetV2 post training quantization](tutorials/notebooks/imx500_notebooks/keras/example_keras_mobilenetv2_for_imx500.ipynb)
|
|
72
|
+
* [Post training quantization with PyTorch](tutorials/notebooks/mct_features_notebooks/pytorch/example_pytorch_ptq_mnist.ipynb)
|
|
73
|
+
* [Data Generation for ResNet18 with PyTorch](tutorials/notebooks/mct_features_notebooks/pytorch/example_pytorch_data_generation.ipynb).
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
### Supported Versions
|
|
@@ -94,15 +94,15 @@ Currently, MCT is being tested on various Python, Pytorch and TensorFlow version
|
|
|
94
94
|
## Supported Features
|
|
95
95
|
MCT offers a range of powerful features to optimize neural network models for efficient deployment. These supported features include:
|
|
96
96
|
|
|
97
|
-
### Data Generation [*](
|
|
97
|
+
### Data Generation [*](#experimental-features)
|
|
98
98
|
MCT provides tools for generating synthetic images based on the statistics stored in a model's batch normalization layers. These generated images are valuable for various compression tasks where image data is required, such as quantization and pruning.
|
|
99
|
-
You can customize data generation configurations to suit your specific needs. [Go to the Data Generation page.](
|
|
99
|
+
You can customize data generation configurations to suit your specific needs. [Go to the Data Generation page.](model_compression_toolkit/data_generation/README.md)
|
|
100
100
|
|
|
101
101
|
### Quantization
|
|
102
102
|
MCT supports different quantization methods:
|
|
103
103
|
* Post-training quantization (PTQ): [Keras API](https://sony.github.io/model_optimization/docs/api/api_docs/methods/keras_post_training_quantization.html), [PyTorch API](https://sony.github.io/model_optimization/docs/api/api_docs/methods/pytorch_post_training_quantization.html)
|
|
104
104
|
* Gradient-based post-training quantization (GPTQ): [Keras API](https://sony.github.io/model_optimization/docs/api/api_docs/methods/keras_gradient_post_training_quantization.html), [PyTorch API](https://sony.github.io/model_optimization/docs/api/api_docs/methods/pytorch_gradient_post_training_quantization.html)
|
|
105
|
-
* Quantization-aware training (QAT) [*](
|
|
105
|
+
* Quantization-aware training (QAT) [*](#experimental-features)
|
|
106
106
|
|
|
107
107
|
|
|
108
108
|
| Quantization Method | Complexity | Computational Cost |
|
|
@@ -124,20 +124,20 @@ Main features:
|
|
|
124
124
|
* <ins>Advanced quantization algorithms:</ins> To prevent a performance degradation some algorithms are applied such as:
|
|
125
125
|
* <ins>Shift negative correction:</ins> Symmetric activation quantization can hurt the model's performance when some layers output both negative and positive activations, but their range is asymmetric. For more details please visit [1].
|
|
126
126
|
* <ins>Outliers filtering:</ins> Computing z-score for activation statistics to detect and remove outliers.
|
|
127
|
-
* <ins>Clustering:</ins> Using non-uniform quantization grid to quantize the weights and activations to match their distributions.[*](
|
|
127
|
+
* <ins>Clustering:</ins> Using non-uniform quantization grid to quantize the weights and activations to match their distributions.[*](#experimental-features)
|
|
128
128
|
* <ins>Mixed-precision search:</ins> Assigning quantization bit-width per layer (for weights/activations), based on the layer's sensitivity to different bit-widths.
|
|
129
129
|
* <ins>Visualization:</ins> You can use TensorBoard to observe useful information for troubleshooting the quantized model's performance (for example, the model in different phases of the quantization, collected statistics, similarity between layers of the float and quantized model and bit-width configuration for mixed-precision quantization). For more details, please read the [visualization documentation](https://sony.github.io/model_optimization/docs/guidelines/visualization.html).
|
|
130
|
-
* <ins>Target Platform Capabilities:</ins> The Target Platform Capabilities (TPC) describes the target platform (an edge device with dedicated hardware). For more details, please read the [TPC README](
|
|
130
|
+
* <ins>Target Platform Capabilities:</ins> The Target Platform Capabilities (TPC) describes the target platform (an edge device with dedicated hardware). For more details, please read the [TPC README](model_compression_toolkit/target_platform_capabilities/README.md).
|
|
131
131
|
|
|
132
132
|
### Enhanced Post-Training Quantization (EPTQ)
|
|
133
133
|
As part of the GPTQ we provide an advanced optimization algorithm called EPTQ.
|
|
134
134
|
|
|
135
135
|
The specifications of the algorithm are detailed in the paper: _"**EPTQ: Enhanced Post-Training Quantization via Label-Free Hessian**"_ [4].
|
|
136
136
|
|
|
137
|
-
More details on the how to use EPTQ via MCT can be found in the [EPTQ guidelines](
|
|
137
|
+
More details on the how to use EPTQ via MCT can be found in the [EPTQ guidelines](model_compression_toolkit/gptq/README.md).
|
|
138
138
|
|
|
139
139
|
|
|
140
|
-
### Structured Pruning [*](
|
|
140
|
+
### Structured Pruning [*](#experimental-features)
|
|
141
141
|
MCT introduces a structured and hardware-aware model pruning.
|
|
142
142
|
This pruning technique is designed to compress models for specific hardware architectures,
|
|
143
143
|
taking into account the target platform's Single Instruction, Multiple Data (SIMD) capabilities.
|
|
@@ -159,7 +159,7 @@ For more details, we highly recommend visiting our project website where experim
|
|
|
159
159
|
Graph of [MobileNetV2](https://keras.io/api/applications/mobilenet/) accuracy on ImageNet vs average bit-width of weights, using
|
|
160
160
|
single-precision quantization, mixed-precision quantization, and mixed-precision quantization with GPTQ.
|
|
161
161
|
|
|
162
|
-
<img src="
|
|
162
|
+
<img src="docsrc/images/mbv2_accuracy_graph.png">
|
|
163
163
|
|
|
164
164
|
For more results, please see [1]
|
|
165
165
|
|
|
@@ -195,11 +195,11 @@ Check out the [FAQ](https://github.com/sony/model_optimization/tree/main/FAQ.md)
|
|
|
195
195
|
## Contributions
|
|
196
196
|
MCT aims at keeping a more up-to-date fork and welcomes contributions from anyone.
|
|
197
197
|
|
|
198
|
-
*You will find more information about contributions in the [Contribution guide](
|
|
198
|
+
*You will find more information about contributions in the [Contribution guide](CONTRIBUTING.md).
|
|
199
199
|
|
|
200
200
|
|
|
201
201
|
## License
|
|
202
|
-
[Apache License 2.0](
|
|
202
|
+
[Apache License 2.0](LICENSE.md).
|
|
203
203
|
|
|
204
204
|
## References
|
|
205
205
|
|
{mct_nightly-2.0.0.20240521.145957.dist-info → mct_nightly-2.0.0.20240522.420.dist-info}/RECORD
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
model_compression_toolkit/__init__.py,sha256=
|
|
1
|
+
model_compression_toolkit/__init__.py,sha256=v8YoSPNYRn91dEf88cagXX095viQMwtZN9gYLQtPGDk,1573
|
|
2
2
|
model_compression_toolkit/constants.py,sha256=b63Jk_bC7VXEX3Qn9TZ3wUvrNKD8Mkz8zIuayoyF5eU,3828
|
|
3
3
|
model_compression_toolkit/defaultdict.py,sha256=LSc-sbZYXENMCw3U9F4GiXuv67IKpdn0Qm7Fr11jy-4,2277
|
|
4
4
|
model_compression_toolkit/logger.py,sha256=3DByV41XHRR3kLTJNbpaMmikL8icd9e1N-nkQAY9oDk,4567
|
|
@@ -483,8 +483,8 @@ model_compression_toolkit/trainable_infrastructure/keras/quantize_wrapper.py,sha
|
|
|
483
483
|
model_compression_toolkit/trainable_infrastructure/keras/quantizer_utils.py,sha256=MVwXNymmFRB2NXIBx4e2mdJ1RfoHxRPYRgjb1MQP5kY,1797
|
|
484
484
|
model_compression_toolkit/trainable_infrastructure/pytorch/__init__.py,sha256=huHoBUcKNB6BnY6YaUCcFvdyBtBI172ZoUD8ZYeNc6o,696
|
|
485
485
|
model_compression_toolkit/trainable_infrastructure/pytorch/base_pytorch_quantizer.py,sha256=MxylaVFPgN7zBiRBy6WV610EA4scLgRJFbMucKvvNDU,2896
|
|
486
|
-
mct_nightly-2.0.0.
|
|
487
|
-
mct_nightly-2.0.0.
|
|
488
|
-
mct_nightly-2.0.0.
|
|
489
|
-
mct_nightly-2.0.0.
|
|
490
|
-
mct_nightly-2.0.0.
|
|
486
|
+
mct_nightly-2.0.0.20240522.420.dist-info/LICENSE.md,sha256=aYSSIb-5AFPeITTvXm1UAoe0uYBiMmSS8flvXaaFUks,10174
|
|
487
|
+
mct_nightly-2.0.0.20240522.420.dist-info/METADATA,sha256=mVKhgUzRrPWgjkKKh7j45yHheRKd4MwcZtp8-hHALBM,18477
|
|
488
|
+
mct_nightly-2.0.0.20240522.420.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
489
|
+
mct_nightly-2.0.0.20240522.420.dist-info/top_level.txt,sha256=gsYA8juk0Z-ZmQRKULkb3JLGdOdz8jW_cMRjisn9ga4,26
|
|
490
|
+
mct_nightly-2.0.0.20240522.420.dist-info/RECORD,,
|
|
@@ -27,4 +27,4 @@ from model_compression_toolkit import data_generation
|
|
|
27
27
|
from model_compression_toolkit import pruning
|
|
28
28
|
from model_compression_toolkit.trainable_infrastructure.keras.load_model import keras_load_quantized_model
|
|
29
29
|
|
|
30
|
-
__version__ = "2.0.0.
|
|
30
|
+
__version__ = "2.0.0.20240522.000420"
|
{mct_nightly-2.0.0.20240521.145957.dist-info → mct_nightly-2.0.0.20240522.420.dist-info}/LICENSE.md
RENAMED
|
File without changes
|
{mct_nightly-2.0.0.20240521.145957.dist-info → mct_nightly-2.0.0.20240522.420.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|