Skip to content

Commit 1937a97

Browse files
Release v2.9.0 of NNCF to master
1 parent 17b72c8 commit 1937a97

File tree

1,585 files changed

+66194
-1755430
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,585 files changed

+66194
-1755430
lines changed

.file-header

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/workflows/mypy.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: mypy
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
9+
10+
jobs:
11+
mypy:
12+
runs-on: ubuntu-20.04
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-python@v3
16+
with:
17+
python-version: 3.8.10
18+
- name: Install NNCF
19+
run: pip install -e .
20+
- name: Install mypy
21+
run: pip install mypy==1.8.0
22+
- name: Run mypy
23+
run: mypy --install-types --config-file=.mypy.ini --non-interactive

.mypy.ini

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[mypy]
2+
files = nncf/common/sparsity
3+
follow_imports = silent
4+
strict = True
5+
6+
# should be removed later
7+
# mypy recommends the following tool as an autofix:
8+
# https://github.com/hauntsaninja/no_implicit_optional
9+
implicit_optional = True

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ repos:
2626
hooks:
2727
- id: markdownlint
2828
args: [--config=.markdownlint.yaml]
29+

Makefile

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ install-pre-commit:
2323
install-onnx-test:
2424
pip install -U pip
2525
pip install -e .[onnx]
26+
pip install "git+https://github.com/openvinotoolkit/open_model_zoo.git@37f60eb#egg=omz-tools&subdirectory=tools/model_tools"
27+
pip install "git+https://github.com/openvinotoolkit/open_model_zoo.git@37f60eb#egg=accuracy_checker&subdirectory=tools/accuracy_checker"
2628
pip install -r tests/onnx/requirements.txt
2729
pip install -r tests/cross_fw/install/requirements.txt
2830
pip install -r tests/cross_fw/examples/requirements.txt
@@ -50,14 +52,14 @@ test-examples-onnx:
5052
install-openvino-test:
5153
pip install -U pip
5254
pip install -e .[openvino]
55+
pip install "git+https://github.com/openvinotoolkit/open_model_zoo.git@37f60eb#egg=omz-tools&subdirectory=tools/model_tools"
56+
pip install "git+https://github.com/openvinotoolkit/open_model_zoo.git@37f60eb#egg=accuracy_checker&subdirectory=tools/accuracy_checker"
5357
pip install tensorflow==2.12.0
5458
pip install -r tests/openvino/requirements.txt
5559
pip install -r tests/cross_fw/install/requirements.txt
5660
pip install -r tests/cross_fw/examples/requirements.txt
5761

5862
install-openvino-dev: install-openvino-test install-pre-commit
59-
pip install -r examples/experimental/openvino/bert/requirements.txt
60-
pip install -r examples/experimental/openvino/yolo_v5/requirements.txt
6163
pip install -r examples/post_training_quantization/openvino/mobilenet_v2/requirements.txt
6264
pip install -r examples/post_training_quantization/openvino/anomaly_stfpm_quantize_with_accuracy_control/requirements.txt
6365
pip install -r examples/post_training_quantization/openvino/yolov8/requirements.txt
@@ -81,6 +83,8 @@ test-examples-openvino:
8183
install-tensorflow-test:
8284
pip install -U pip
8385
pip install -e .[tf]
86+
pip install "git+https://github.com/openvinotoolkit/open_model_zoo.git@37f60eb#egg=omz-tools&subdirectory=tools/model_tools"
87+
pip install "git+https://github.com/openvinotoolkit/open_model_zoo.git@37f60eb#egg=accuracy_checker&subdirectory=tools/accuracy_checker"
8488
pip install -r tests/tensorflow/requirements.txt
8589
pip install -r tests/cross_fw/install/requirements.txt
8690
pip install -r tests/cross_fw/examples/requirements.txt
@@ -105,6 +109,8 @@ test-examples-tensorflow:
105109
install-torch-test:
106110
pip install -U pip
107111
pip install -e .[torch] --index-url https://download.pytorch.org/whl/cu118 --extra-index-url=https://pypi.org/simple # ticket 119128
112+
pip install "git+https://github.com/openvinotoolkit/open_model_zoo.git@37f60eb#egg=omz-tools&subdirectory=tools/model_tools"
113+
pip install "git+https://github.com/openvinotoolkit/open_model_zoo.git@37f60eb#egg=accuracy_checker&subdirectory=tools/accuracy_checker"
108114
pip install -r tests/torch/requirements.txt --index-url https://download.pytorch.org/whl/cu118 --extra-index-url=https://pypi.org/simple
109115
pip install -r tests/cross_fw/install/requirements.txt
110116
pip install -r tests/cross_fw/examples/requirements.txt
@@ -170,3 +176,12 @@ test-examples:
170176
# Pre commit check
171177
pre-commit:
172178
pre-commit run -a
179+
180+
181+
###############################################################################
182+
# Fuzzing tests
183+
install-fuzz-test: install-common-test
184+
pip install -r tests/cross_fw/sdl/fuzz/requirements.txt
185+
186+
test-fuzz:
187+
python tests/cross_fw/sdl/fuzz/quantize_api.py

README.md

Lines changed: 36 additions & 41 deletions
Large diffs are not rendered by default.

ReleaseNotes.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,42 @@
11
# Release Notes
22

3+
## New in Release 2.9.0
4+
5+
Post-training Quantization:
6+
7+
- Features:
8+
- (OpenVINO) Added modified AWQ algorithm for 4-bit data-aware weights compression. This algorithm applied only for patterns `MatMul->Multiply->Matmul`. For that `awq` optional parameter has been added to `nncf.compress_weights()` and can be used to minimize accuracy degradation of compressed models (note that this option increases the compression time).
9+
- (ONNX) Introduced support for the ONNX backend in the `nncf.quantize_with_accuracy_control()` method. Users can now perform quantization with accuracy control for `onnx.ModelProto`. By leveraging this feature, users can enhance the accuracy of quantized models while minimizing performance impact.
10+
- (ONNX) Added an example based on the YOLOv8n-seg model for demonstrating the usage of quantization with accuracy control for the ONNX backend.
11+
- (PT) Added SmoothQuant algorithm for PyTorch backend in `nncf.quantize()`.
12+
- (OpenVINO) Added [an example](examples/llm_compression/openvino/tiny_llama_find_hyperparams) with the hyperparameters tuning for the TinyLLama model.
13+
- Introduced the `nncf.AdvancedAccuracyRestorerParameters`.
14+
- Introduced the `subset_size` option for the `nncf.compress_weights()`.
15+
- Introduced `TargetDevice.NPU` as the replacement for `TargetDevice.VPU`.
16+
- Fixes:
17+
- Fixed API Enums serialization/deserialization issue.
18+
- Fixed issue with required arguments for `revert_operations_to_floating_point_precision` method.
19+
- Improvements:
20+
- (ONNX) Aligned statistics collection with OpenVINO and PyTorch backends.
21+
- Extended `nncf.compress_weights()` with Convolution & Embeddings compression in order to reduce memory footprint.
22+
- Deprecations/Removals:
23+
- (OpenVINO) Removed outdated examples with `nncf.quantize()` for BERT and YOLOv5 models.
24+
- (OpenVINO) Removed outdated example with `nncf.quantize_with_accuracy_control()` for SSD MobileNetV1 FPN model.
25+
- (PyTorch) Deprecated the `binarization` algorithm.
26+
- Removed Post-training Optimization Tool as OpenVINO backend.
27+
- Removed Dockerfiles.
28+
- `TargetDevice.VPU` was replaced by `TargetDevice.NPU`.
29+
- Tutorials:
30+
- [Post-Training Optimization of Stable Diffusion v2 Model](https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/236-stable-diffusion-v2/236-stable-diffusion-v2-text-to-image.ipynb)
31+
- [Post-Training Optimization of DeciDiffusion Model](https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/259-decidiffusion-image-generation/259-decidiffusion-image-generation.ipynb)
32+
- [Post-Training Optimization of DepthAnything Model](https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/280-depth-anything/280-depth-anything.ipynb)
33+
- [Post-Training Optimization of Stable Diffusion ControlNet Model](https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/235-controlnet-stable-diffusion/235-controlnet-stable-diffusion.ipynb)
34+
35+
Compression-aware training:
36+
37+
- Fixes
38+
- (PyTorch) Fixed issue with `NNCFNetworkInterface.get_clean_shallow_copy` missed arguments.
39+
340
## New in Release 2.8.1
441

542
Post-training Quantization:
@@ -22,7 +59,7 @@ Post-training Quantization:
2259
- (OpenVINO) Changed default OpenVINO opset from 9 to 13.
2360
- Features:
2461
- (OpenVINO) Added 4-bit data-aware weights compression. For that `dataset` optional parameter has been added to `nncf.compress_weights()` and can be used to minimize accuracy degradation of compressed models (note that this option increases the compression time).
25-
- (PyTorch) Added support for PyTorch models with shared weights and custom PyTorch modules in `nncf.compress_weights()`. The weights compression algorithm for PyTorch models is now based on tracing the model graph. The `dataset` parameter is now required in `nncf.compress_weights()` for the compression of PyTorch models.
62+
- (PyTorch) Added support for PyTorch models with shared weights and custom PyTorch modules in nncf.compress_weights(). The weights compression algorithm for PyTorch models is now based on tracing the model graph. The dataset parameter is now required in nncf.compress_weights() for the compression of PyTorch models.
2663
- (Common) Renamed the `nncf.CompressWeightsMode.INT8` to `nncf.CompressWeightsMode.INT8_ASYM` and introduce `nncf.CompressWeightsMode.INT8_SYM` that can be efficiently used with dynamic 8-bit quantization of activations.
2764
The original `nncf.CompressWeightsMode.INT8` enum value is now deprecated.
2865
- (OpenVINO) Added support for quantizing the ScaledDotProductAttention operation from OpenVINO opset 13.

docker/README.md

Lines changed: 0 additions & 45 deletions
This file was deleted.

docker/onnx/openvinoep/Dockerfile

Lines changed: 0 additions & 57 deletions
This file was deleted.

docker/onnx/openvinoep/build.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

docker/tensorflow/gpu/Dockerfile

Lines changed: 0 additions & 44 deletions
This file was deleted.

docker/torch/cpu/Dockerfile

Lines changed: 0 additions & 28 deletions
This file was deleted.

docker/torch/gpu/Dockerfile

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)