nncf 3.0.0__tar.gz → 3.2.0__tar.gz
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.
- {nncf-3.0.0 → nncf-3.2.0}/PKG-INFO +10 -6
- {nncf-3.0.0 → nncf-3.2.0}/README.md +11 -8
- {nncf-3.0.0 → nncf-3.2.0}/docs/PyPiPublishing.md +7 -3
- {nncf-3.0.0 → nncf-3.2.0}/licensing/third-party-programs.txt +52 -0
- {nncf-3.0.0 → nncf-3.2.0}/pyproject.toml +20 -10
- {nncf-3.0.0 → nncf-3.2.0}/src/custom_version.py +5 -1
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/__init__.py +26 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/deprecation.py +3 -3
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/graph/graph.py +100 -71
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/graph/graph_matching.py +4 -4
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/graph/layer_attributes.py +5 -5
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/graph/operator_metatypes.py +4 -4
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/graph/patterns/manager.py +6 -6
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/graph/patterns/patterns.py +31 -20
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/graph/utils.py +2 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/hardware/config.py +7 -6
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/hardware/defines.py +2 -1
- nncf-3.2.0/src/nncf/common/hardware/opset.py +79 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/hardware/setups/cpu.py +54 -53
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/hardware/setups/gpu.py +55 -54
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/hardware/setups/npu.py +55 -54
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/insertion_point_graph.py +27 -33
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/logging/track_progress.py +8 -8
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/quantization/config_assignment.py +4 -4
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/quantization/initialization/range.py +5 -7
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/quantization/quantizer_propagation/graph.py +20 -21
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/quantization/quantizer_propagation/grouping.py +1 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/quantization/quantizer_propagation/solver.py +38 -43
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/quantization/quantizer_propagation/structs.py +3 -4
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/quantization/quantizer_setup.py +5 -5
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/quantization/statistics.py +1 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/quantization/structs.py +15 -14
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/scopes.py +8 -8
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/strip.py +2 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/tensor_statistics/aggregator.py +2 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/tensor_statistics/builders.py +1 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/tensor_statistics/collectors.py +38 -38
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/tensor_statistics/statistic_point.py +2 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/tensor_statistics/statistical_functions.py +1 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/tensor_statistics/statistics_serializer.py +2 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/utils/api_marker.py +2 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/utils/dot_file_rw.py +4 -5
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/utils/helpers.py +2 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/utils/os.py +3 -3
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/utils/patcher.py +4 -4
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/data/dataset.py +8 -8
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/data/generators.py +2 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/definitions.py +1 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/common/graph/netron.py +10 -9
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/quantization/algorithms/post_training/algorithm.py +8 -8
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/quantization/algorithms/post_training/pipeline.py +6 -6
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/quantization/algorithms/range_estimator/algorithm.py +5 -5
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/quantization/algorithms/weight_compression/algorithm.py +4 -4
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/quantization/algorithms/weight_compression/codebook_estimation.py +7 -7
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/torch/fx/__init__.py +0 -1
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/torch/fx/commands.py +2 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/torch/fx/constant_folding.py +2 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/torch/fx/model_transformer.py +25 -24
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/torch/fx/nncf_graph_builder.py +22 -17
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/torch/fx/node_utils.py +16 -3
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/torch/fx/quantization/backend_parameters.py +1 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/torch/fx/quantization/quantize_model.py +10 -12
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/torch/fx/quantization/quantize_pt2e.py +18 -21
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/torch/fx/quantization/quantizer/openvino_adapter.py +3 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/torch/fx/quantization/quantizer/torch_ao_adapter.py +11 -12
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/torch/fx/transformations.py +34 -29
- nncf-3.2.0/src/nncf/experimental/torch/gptqmodel/convertor.py +132 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/torch/sparsify_activations/sparsify_activations_impl.py +2 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/torch/sparsify_activations/torch_backend.py +4 -4
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/onnx/graph/metatypes/onnx_metatypes.py +48 -49
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/onnx/graph/model_metadata.py +1 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/onnx/graph/model_transformer.py +1 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/onnx/graph/nncf_graph_builder.py +22 -9
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/onnx/graph/node_utils.py +3 -4
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/onnx/graph/onnx_helper.py +13 -10
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/onnx/graph/transformations/commands.py +1 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/onnx/hardware/fused_patterns.py +7 -4
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/onnx/quantization/backend_parameters.py +3 -4
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/onnx/quantization/ignored_patterns.py +2 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/onnx/quantization/quantize_model.py +15 -15
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/onnx/quantization/quantizer_parameters.py +1 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/onnx/statistics/aggregator.py +1 -1
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/engine.py +2 -3
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/graph/layer_attributes.py +5 -5
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/graph/metatypes/openvino_metatypes.py +55 -56
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/graph/nncf_graph_builder.py +9 -13
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/graph/node_utils.py +15 -15
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/graph/transformations/commands.py +1 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/hardware/fused_patterns.py +13 -10
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/optimized_functions/functions.py +28 -25
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/optimized_functions/models.py +60 -48
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/quantization/backend_parameters.py +1 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/quantization/ignored_patterns.py +43 -18
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/quantization/quantize_ifmodel.py +1 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/quantization/quantize_model.py +24 -24
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/rt_info.py +2 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/statistics/aggregator.py +2 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/statistics/builders.py +1 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/statistics/collectors.py +3 -4
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/parameters.py +7 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/pruning/prune_model.py +5 -7
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/advanced_parameters.py +18 -18
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/accuracy_control/algorithm.py +3 -3
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/accuracy_control/backend.py +2 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/accuracy_control/evaluator.py +12 -12
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/accuracy_control/onnx_backend.py +1 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/accuracy_control/openvino_backend.py +1 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/accuracy_control/ranker.py +7 -7
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/accuracy_control/subset_selection.py +4 -4
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/algorithm.py +3 -3
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/bias_correction/algorithm.py +7 -7
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/bias_correction/backend.py +4 -15
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/bias_correction/onnx_backend.py +2 -8
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/bias_correction/openvino_backend.py +2 -8
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/bias_correction/torch_fx_backend.py +3 -9
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/channel_alignment/algorithm.py +6 -6
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/channel_alignment/openvino_backend.py +1 -1
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/fast_bias_correction/algorithm.py +5 -5
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/fast_bias_correction/backend.py +6 -6
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/fast_bias_correction/onnx_backend.py +2 -3
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/fast_bias_correction/openvino_backend.py +2 -3
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/fast_bias_correction/torch_backend.py +6 -7
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/fast_bias_correction/torch_fx_backend.py +4 -5
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/hyperparameter_tuner/algorithm.py +3 -5
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/layerwise/backend.py +2 -14
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/layerwise/engine.py +4 -3
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/layerwise/openvino_backend.py +1 -8
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/layerwise/openvino_iterator.py +1 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/min_max/algorithm.py +47 -53
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/min_max/backend.py +4 -4
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/min_max/onnx_backend.py +2 -3
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/min_max/openvino_backend.py +2 -3
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/min_max/torch_backend.py +5 -6
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/min_max/torch_fx_backend.py +7 -6
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/pipeline.py +4 -4
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/post_training/algorithm.py +8 -8
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/post_training/pipeline.py +6 -6
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/smooth_quant/algorithm.py +13 -7
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/smooth_quant/torch_backend.py +2 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/smooth_quant/torch_fx_backend.py +2 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/weight_compression/algorithm.py +79 -46
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/weight_compression/awq.py +14 -18
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/weight_compression/backend.py +38 -17
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/weight_compression/config.py +43 -26
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/weight_compression/gptq.py +23 -5
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/weight_compression/lora_correction.py +5 -9
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/weight_compression/mixed_precision.py +8 -8
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/weight_compression/onnx_backend.py +16 -16
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/weight_compression/openvino_backend.py +36 -24
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/weight_compression/parameters.py +17 -9
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/weight_compression/scale_estimation.py +31 -54
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/weight_compression/torch_backend.py +27 -23
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/weight_compression/torch_fx_backend.py +28 -14
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/weight_compression/weight_lowering.py +112 -78
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/passes.py +42 -53
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/quantize_model.py +50 -52
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/range_estimator.py +3 -4
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/scopes.py +1 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/telemetry/decorator.py +2 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/telemetry/events.py +5 -5
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/telemetry/extractors.py +5 -5
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/telemetry/wrapper.py +3 -3
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/tensor/definitions.py +3 -4
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/tensor/functions/dispatcher.py +1 -1
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/tensor/functions/io.py +1 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/tensor/functions/linalg.py +5 -5
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/tensor/functions/numeric.py +40 -46
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/tensor/functions/numpy_io.py +3 -3
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/tensor/functions/numpy_linalg.py +4 -4
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/tensor/functions/numpy_numeric.py +45 -46
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/tensor/functions/openvino_numeric.py +2 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/tensor/functions/torch_io.py +1 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/tensor/functions/torch_linalg.py +4 -4
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/tensor/functions/torch_numeric.py +36 -38
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/tensor/tensor.py +35 -35
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/__init__.py +8 -8
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/engine.py +2 -5
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/commands.py +1 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/extractor.py +2 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/graph/build_graph_mode.py +3 -5
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/graph/graph_utils.py +3 -3
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/handle_inner_functions.py +3 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/hook_executor_mode.py +4 -4
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/hook_storage.py +28 -4
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/nncf_graph/nncf_graph_builder.py +17 -17
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/pruning/batch_norm_adaptation.py +2 -4
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/pruning/magnitude/algo.py +10 -12
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/pruning/magnitude/modules.py +0 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/pruning/magnitude/schedulers.py +1 -3
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/pruning/prune_model.py +35 -25
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/pruning/rb/algo.py +4 -6
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/pruning/rb/modules.py +0 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/pruning/rb/schedulers.py +1 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/quantization/quantize_model.py +5 -6
- nncf-3.2.0/src/nncf/torch/function_hook/serialization.py +207 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/statistics/aggregator.py +1 -1
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/weak_map.py +2 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/wrapper.py +2 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/functions.py +2 -2
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/graph/graph.py +4 -30
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/graph/operator_metatypes.py +66 -60
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/graph/transformations/command_creation.py +2 -3
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/graph/transformations/commands.py +12 -9
- nncf-3.2.0/src/nncf/torch/hardware/__init__.py +10 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/hardware/fused_patterns.py +7 -4
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/layer_utils.py +3 -5
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/model_creation.py +1 -40
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/model_graph_manager.py +11 -12
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/node_utils.py +4 -1
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/quantization/extensions.py +6 -7
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/quantization/layers.py +20 -91
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/quantization/quantize_model.py +8 -9
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/quantization/reference.py +28 -1
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/quantization/strip.py +6 -6
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/return_types.py +2 -4
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/utils.py +25 -50
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/version.py +1 -1
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf.egg-info/PKG-INFO +10 -6
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf.egg-info/SOURCES.txt +2 -3
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf.egg-info/requires.txt +2 -2
- nncf-3.0.0/src/nncf/common/hardware/opset.py +0 -64
- nncf-3.0.0/src/nncf/common/logging/progress_bar.py +0 -94
- nncf-3.0.0/src/nncf/experimental/torch/fx/quantization/quantizer/openvino_quantizer.py +0 -363
- nncf-3.0.0/src/nncf/torch/extensions/__pycache__/__init__.cpython-310.pyc +0 -0
- nncf-3.0.0/src/nncf/torch/function_hook/serialization.py +0 -124
- {nncf-3.0.0 → nncf-3.2.0}/LICENSE +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/MANIFEST.in +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/setup.cfg +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/api/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/api/statistics.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/engine.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/factory.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/graph/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/graph/definitions.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/graph/model_transformer.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/graph/patterns/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/graph/transformations/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/graph/transformations/command_creation.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/graph/transformations/commands.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/graph/transformations/layout.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/hardware/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/hardware/qspaces.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/hardware/setups/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/initialization/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/initialization/dataloader.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/logging/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/logging/logger.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/quantization/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/quantization/defaults.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/quantization/initialization/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/quantization/quantizer_propagation/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/quantization/quantizer_propagation/visualizer.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/quantization/quantizer_removal.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/quantization/quantizers.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/stateful_classes_registry.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/tensor_statistics/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/tensor_statistics/statistics.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/tensor_statistics/statistics_validator.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/utils/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/utils/backend.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/utils/caching.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/utils/debug.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/utils/decorators.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/utils/logger/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/utils/registry.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/common/utils/timer.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/data/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/errors.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/common/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/common/graph/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/quantization/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/quantization/algorithms/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/quantization/algorithms/post_training/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/quantization/algorithms/range_estimator/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/quantization/algorithms/weight_compression/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/quantization/quantizer.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/torch/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/torch/fx/groups.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/torch/fx/model_utils.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/torch/fx/quantization/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/torch/fx/quantization/quantizer/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/torch/fx/statistics/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/torch/fx/statistics/aggregator.py +0 -0
- {nncf-3.0.0/src/nncf/onnx/graph → nncf-3.2.0/src/nncf/experimental/torch/gptqmodel}/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/torch/sparsify_activations/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/experimental/torch/sparsify_activations/target_scope.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/onnx/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/onnx/engine.py +0 -0
- {nncf-3.0.0/src/nncf/onnx/graph/metatypes → nncf-3.2.0/src/nncf/onnx/graph}/__init__.py +0 -0
- {nncf-3.0.0/src/nncf/onnx/graph/transformations → nncf-3.2.0/src/nncf/onnx/graph/metatypes}/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/onnx/graph/metatypes/groups.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/onnx/graph/model_utils.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/onnx/graph/passes.py +0 -0
- {nncf-3.0.0/src/nncf/onnx/hardware → nncf-3.2.0/src/nncf/onnx/graph/transformations}/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/onnx/graph/transformations/command_creation.py +0 -0
- {nncf-3.0.0/src/nncf/onnx/quantization → nncf-3.2.0/src/nncf/onnx/hardware}/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/onnx/hardware/config.py +0 -0
- {nncf-3.0.0/src/nncf/onnx/statistics → nncf-3.2.0/src/nncf/onnx/quantization}/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/onnx/quantization/default_quantization.py +0 -0
- {nncf-3.0.0/src/nncf/openvino/graph → nncf-3.2.0/src/nncf/onnx/statistics}/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/cpu_info.py +0 -0
- {nncf-3.0.0/src/nncf/openvino/graph/metatypes → nncf-3.2.0/src/nncf/openvino/graph}/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/graph/layout.py +0 -0
- {nncf-3.0.0/src/nncf/openvino/graph/transformations → nncf-3.2.0/src/nncf/openvino/graph/metatypes}/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/graph/metatypes/groups.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/graph/model_builder.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/graph/model_transformer.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/graph/model_utils.py +0 -0
- {nncf-3.0.0/src/nncf/openvino/hardware → nncf-3.2.0/src/nncf/openvino/graph/transformations}/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/graph/transformations/command_creation.py +0 -0
- {nncf-3.0.0/src/nncf/openvino/quantization → nncf-3.2.0/src/nncf/openvino/hardware}/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/hardware/config.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/optimized_functions/__init__.py +0 -0
- {nncf-3.0.0/src/nncf/openvino/statistics → nncf-3.2.0/src/nncf/openvino/quantization}/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/openvino/quantization/default_quantization.py +0 -0
- {nncf-3.0.0/src/nncf/pruning → nncf-3.2.0/src/nncf/openvino/statistics}/__init__.py +0 -0
- {nncf-3.0.0/src/nncf/quantization/algorithms → nncf-3.2.0/src/nncf/pruning}/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/__init__.py +0 -0
- {nncf-3.0.0/src/nncf/quantization/algorithms/accuracy_control → nncf-3.2.0/src/nncf/quantization/algorithms}/__init__.py +0 -0
- {nncf-3.0.0/src/nncf/quantization/algorithms/bias_correction → nncf-3.2.0/src/nncf/quantization/algorithms/accuracy_control}/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/accuracy_control/rank_functions.py +0 -0
- {nncf-3.0.0/src/nncf/quantization/algorithms/channel_alignment → nncf-3.2.0/src/nncf/quantization/algorithms/bias_correction}/__init__.py +0 -0
- {nncf-3.0.0/src/nncf/quantization/algorithms/fast_bias_correction → nncf-3.2.0/src/nncf/quantization/algorithms/channel_alignment}/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/channel_alignment/backend.py +0 -0
- {nncf-3.0.0/src/nncf/quantization/algorithms/hyperparameter_tuner → nncf-3.2.0/src/nncf/quantization/algorithms/fast_bias_correction}/__init__.py +0 -0
- {nncf-3.0.0/src/nncf/quantization/algorithms/layerwise → nncf-3.2.0/src/nncf/quantization/algorithms/hyperparameter_tuner}/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/hyperparameter_tuner/param_grid.py +0 -0
- {nncf-3.0.0/src/nncf/quantization/algorithms/min_max → nncf-3.2.0/src/nncf/quantization/algorithms/layerwise}/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/layerwise/iterator.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/layerwise/scheduler.py +0 -0
- {nncf-3.0.0/src/nncf/quantization/algorithms/post_training → nncf-3.2.0/src/nncf/quantization/algorithms/min_max}/__init__.py +0 -0
- {nncf-3.0.0/src/nncf/quantization/algorithms/smooth_quant → nncf-3.2.0/src/nncf/quantization/algorithms/post_training}/__init__.py +0 -0
- {nncf-3.0.0/src/nncf/quantization/algorithms/weight_compression → nncf-3.2.0/src/nncf/quantization/algorithms/smooth_quant}/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/smooth_quant/backend.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/smooth_quant/onnx_backend.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/smooth_quant/openvino_backend.py +0 -0
- {nncf-3.0.0/src/nncf/torch/function_hook/graph → nncf-3.2.0/src/nncf/quantization/algorithms/weight_compression}/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/weight_compression/activation_stats.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/weight_compression/awq_patterns.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/weight_compression/constants.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/algorithms/weight_compression/fp8_conversion.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/fake_quantize.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/statistics_caching.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/quantization/telemetry_extractors.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/telemetry/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/tensor/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/tensor/functions/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/extensions/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/extensions/include/common_cpu_funcs.h +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/extensions/include/common_cuda_defs.cuh +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/extensions/include/common_cuda_funcs.cuh +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/extensions/include/common_defs.h +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/extensions/include/dispatch.h +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/extensions/include/quantization/functions_cuda_impl.h +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/extensions/src/common/cpu/tensor_funcs.cpp +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/extensions/src/quantization/cpu/functions_cpu.cpp +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/extensions/src/quantization/cuda/functions_cuda.cpp +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/extensions/src/quantization/cuda/functions_cuda_impl.cu +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/__init__.py +0 -0
- {nncf-3.0.0/src/nncf/torch/function_hook/nncf_graph → nncf-3.2.0/src/nncf/torch/function_hook/graph}/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/graph/graph_visualization.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/model_transformer.py +0 -0
- {nncf-3.0.0/src/nncf/torch/function_hook/pruning → nncf-3.2.0/src/nncf/torch/function_hook/nncf_graph}/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/nncf_graph/layer_attributes.py +0 -0
- {nncf-3.0.0/src/nncf/torch/function_hook/pruning/magnitude → nncf-3.2.0/src/nncf/torch/function_hook/pruning}/__init__.py +0 -0
- {nncf-3.0.0/src/nncf/torch/function_hook/pruning/rb → nncf-3.2.0/src/nncf/torch/function_hook/pruning/magnitude}/__init__.py +0 -0
- {nncf-3.0.0/src/nncf/torch/function_hook/quantization → nncf-3.2.0/src/nncf/torch/function_hook/pruning/rb}/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/pruning/rb/losses.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/pruning/scheduler_fns.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/pruning/statistics.py +0 -0
- {nncf-3.0.0/src/nncf/torch/function_hook/statistics → nncf-3.2.0/src/nncf/torch/function_hook/quantization}/__init__.py +0 -0
- {nncf-3.0.0/src/nncf/torch/graph → nncf-3.2.0/src/nncf/torch/function_hook/statistics}/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/function_hook/strip.py +0 -0
- {nncf-3.0.0/src/nncf/torch/graph/transformations → nncf-3.2.0/src/nncf/torch/graph}/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/graph/pattern_operations.py +0 -0
- {nncf-3.0.0/src/nncf/torch/hardware → nncf-3.2.0/src/nncf/torch/graph/transformations}/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/hardware/config.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/initialization.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/quantization/__init__.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/quantization/default_quantization.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/quantization/ignored_patterns.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/quantization/quantize_functions.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf/torch/strip.py +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf.egg-info/dependency_links.txt +0 -0
- {nncf-3.0.0 → nncf-3.2.0}/src/nncf.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nncf
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.2.0
|
|
4
4
|
Summary: Neural Networks Compression Framework
|
|
5
5
|
Author: Intel
|
|
6
6
|
Author-email: maksim.proshin@intel.com
|
|
@@ -14,10 +14,9 @@ Description-Content-Type: text/markdown
|
|
|
14
14
|
License-File: LICENSE
|
|
15
15
|
Requires-Dist: networkx<3.5.0,>=2.6
|
|
16
16
|
Requires-Dist: ninja<1.14,>=1.10.0.post2
|
|
17
|
-
Requires-Dist: numpy<2.
|
|
17
|
+
Requires-Dist: numpy<2.5.0,>=1.24.0
|
|
18
18
|
Requires-Dist: openvino-telemetry>=2023.2.0
|
|
19
19
|
Requires-Dist: packaging>=20.0
|
|
20
|
-
Requires-Dist: pandas<2.4,>=1.1.5
|
|
21
20
|
Requires-Dist: psutil
|
|
22
21
|
Requires-Dist: pydot<=3.0.4,>=1.4.1
|
|
23
22
|
Requires-Dist: rich>=13.5.2
|
|
@@ -28,6 +27,7 @@ Requires-Dist: tabulate>=0.9.0
|
|
|
28
27
|
Provides-Extra: plots
|
|
29
28
|
Requires-Dist: kaleido>=0.2.1; extra == "plots"
|
|
30
29
|
Requires-Dist: matplotlib>=3.3.4; extra == "plots"
|
|
30
|
+
Requires-Dist: pandas<2.4,>=1.1.5; extra == "plots"
|
|
31
31
|
Requires-Dist: pillow>=9.0.0; extra == "plots"
|
|
32
32
|
Requires-Dist: plotly-express>=0.4.1; extra == "plots"
|
|
33
33
|
Dynamic: license-file
|
|
@@ -118,7 +118,7 @@ NNCF may be easily integrated into training/evaluation pipelines of third-party
|
|
|
118
118
|
|
|
119
119
|
### Used by
|
|
120
120
|
|
|
121
|
-
- [HuggingFace Optimum Intel](https://huggingface.co/docs/optimum
|
|
121
|
+
- [HuggingFace Optimum Intel](https://huggingface.co/docs/optimum-intel/openvino/optimization)
|
|
122
122
|
|
|
123
123
|
NNCF is used as a compression backend within the renowned `transformers` repository in HuggingFace Optimum Intel. For instance, the command below exports the [Llama-3.2-3B-Instruct](https://huggingface.co/meta-llama/Llama-3.2-3B-Instruct) model to OpenVINO format with INT4-quantized weights:
|
|
124
124
|
|
|
@@ -136,13 +136,17 @@ NNCF may be easily integrated into training/evaluation pipelines of third-party
|
|
|
136
136
|
|
|
137
137
|
- [torch.compile](https://docs.pytorch.org/tutorials/prototype/openvino_quantizer.html)
|
|
138
138
|
|
|
139
|
-
NNCF is used as primary quantization framework for the [torch.compile OpenVINO integration](https://docs.openvino.ai/
|
|
139
|
+
NNCF is used as primary quantization framework for the [torch.compile OpenVINO integration](https://docs.openvino.ai/2026/openvino-workflow/torch-compile.html).
|
|
140
140
|
|
|
141
141
|
- [OpenVINO Training Extensions](https://github.com/openvinotoolkit/training_extensions)
|
|
142
142
|
|
|
143
143
|
NNCF is integrated into OpenVINO Training Extensions as a model optimization backend. You can train, optimize, and
|
|
144
144
|
export new models based on available model templates as well as run the exported models with OpenVINO.
|
|
145
145
|
|
|
146
|
+
- [Microsoft Olive](https://github.com/microsoft/olive)
|
|
147
|
+
|
|
148
|
+
NNCF is used to quantize OpenVINO IR and ONNX models for the [OpenVINO integration](https://microsoft.github.io/Olive/features/ihv-integration/openvino.html).
|
|
149
|
+
|
|
146
150
|
## NNCF Compressed Model Zoo<a id="nncf-compressed-model-zoo"></a>
|
|
147
151
|
|
|
148
152
|
List of models and compression results for them can be found at our [NNCF Model Zoo page](https://github.com/openvinotoolkit/nncf/blob/develop/docs/ModelZoo.md).
|
|
@@ -165,4 +169,4 @@ You can opt-out at any time by running the following command in the Python envir
|
|
|
165
169
|
|
|
166
170
|
`opt_in_out --opt_out`
|
|
167
171
|
|
|
168
|
-
More information available on [OpenVINO telemetry](https://docs.openvino.ai/
|
|
172
|
+
More information available on [OpenVINO telemetry](https://docs.openvino.ai/2026/about-openvino/additional-resources/telemetry.html).
|
|
@@ -213,7 +213,6 @@ Here is an example of Accuracy Aware Quantization pipeline where model weights a
|
|
|
213
213
|
|
|
214
214
|
```python
|
|
215
215
|
import nncf
|
|
216
|
-
import nncf.torch
|
|
217
216
|
import torch
|
|
218
217
|
from torchvision import datasets, models
|
|
219
218
|
|
|
@@ -252,8 +251,8 @@ resuming_checkpoint = torch.load(path_to_checkpoint)
|
|
|
252
251
|
nncf_config = resuming_checkpoint['nncf_config']
|
|
253
252
|
state_dict = resuming_checkpoint['state_dict']
|
|
254
253
|
|
|
255
|
-
quantized_model = nncf.torch.load_from_config(model, nncf_config
|
|
256
|
-
|
|
254
|
+
quantized_model = nncf.torch.load_from_config(model, nncf_config)
|
|
255
|
+
quantized_model.load_state_dict(state_dict)
|
|
257
256
|
# ... the rest of the usual PyTorch-powered training pipeline
|
|
258
257
|
```
|
|
259
258
|
|
|
@@ -329,7 +328,7 @@ NNCF may be easily integrated into training/evaluation pipelines of third-party
|
|
|
329
328
|
|
|
330
329
|
### Used by
|
|
331
330
|
|
|
332
|
-
- [HuggingFace Optimum Intel](https://huggingface.co/docs/optimum
|
|
331
|
+
- [HuggingFace Optimum Intel](https://huggingface.co/docs/optimum-intel/openvino/optimization)
|
|
333
332
|
|
|
334
333
|
NNCF is used as a compression backend within the renowned `transformers` repository in HuggingFace Optimum Intel. For instance, the command below exports the [Llama-3.2-3B-Instruct](https://huggingface.co/meta-llama/Llama-3.2-3B-Instruct) model to OpenVINO format with INT4-quantized weights:
|
|
335
334
|
|
|
@@ -347,13 +346,17 @@ NNCF may be easily integrated into training/evaluation pipelines of third-party
|
|
|
347
346
|
|
|
348
347
|
- [torch.compile](https://docs.pytorch.org/tutorials/prototype/openvino_quantizer.html)
|
|
349
348
|
|
|
350
|
-
NNCF is used as primary quantization framework for the [torch.compile OpenVINO integration](https://docs.openvino.ai/
|
|
349
|
+
NNCF is used as primary quantization framework for the [torch.compile OpenVINO integration](https://docs.openvino.ai/2026/openvino-workflow/torch-compile.html).
|
|
351
350
|
|
|
352
351
|
- [OpenVINO Training Extensions](https://github.com/openvinotoolkit/training_extensions)
|
|
353
352
|
|
|
354
353
|
NNCF is integrated into OpenVINO Training Extensions as a model optimization backend. You can train, optimize, and
|
|
355
354
|
export new models based on available model templates as well as run the exported models with OpenVINO.
|
|
356
355
|
|
|
356
|
+
- [Microsoft Olive](https://github.com/microsoft/olive)
|
|
357
|
+
|
|
358
|
+
NNCF is used to quantize OpenVINO IR and ONNX models for the [OpenVINO integration](https://microsoft.github.io/Olive/features/ihv-integration/openvino.html).
|
|
359
|
+
|
|
357
360
|
<a id="installation-guide"></a>
|
|
358
361
|
|
|
359
362
|
## Installation Guide
|
|
@@ -400,10 +403,10 @@ Refer to the [CONTRIBUTING.md](./CONTRIBUTING.md) file for guidelines on contrib
|
|
|
400
403
|
- [Examples](./examples)
|
|
401
404
|
- [FAQ](./docs/FAQ.md)
|
|
402
405
|
- [Notebooks](https://github.com/openvinotoolkit/openvino_notebooks#-model-training)
|
|
403
|
-
- [HuggingFace Optimum Intel](https://huggingface.co/docs/optimum
|
|
406
|
+
- [HuggingFace Optimum Intel](https://huggingface.co/docs/optimum-intel/openvino/optimization)
|
|
404
407
|
- [OpenVINO Model Optimization Guide](https://docs.openvino.ai/nncf)
|
|
405
408
|
- [OpenVINO Hugging Face page](https://huggingface.co/OpenVINO#models)
|
|
406
|
-
- [OpenVino Performance Benchmarks page](https://docs.openvino.ai/
|
|
409
|
+
- [OpenVino Performance Benchmarks page](https://docs.openvino.ai/2026/about-openvino/performance-benchmarks.html)
|
|
407
410
|
|
|
408
411
|
## Telemetry
|
|
409
412
|
|
|
@@ -412,4 +415,4 @@ You can opt-out at any time by running the following command in the Python envir
|
|
|
412
415
|
|
|
413
416
|
`opt_in_out --opt_out`
|
|
414
417
|
|
|
415
|
-
More information available on [OpenVINO telemetry](https://docs.openvino.ai/
|
|
418
|
+
More information available on [OpenVINO telemetry](https://docs.openvino.ai/2026/about-openvino/additional-resources/telemetry.html).
|
|
@@ -84,7 +84,7 @@ NNCF may be easily integrated into training/evaluation pipelines of third-party
|
|
|
84
84
|
|
|
85
85
|
### Used by
|
|
86
86
|
|
|
87
|
-
- [HuggingFace Optimum Intel](https://huggingface.co/docs/optimum
|
|
87
|
+
- [HuggingFace Optimum Intel](https://huggingface.co/docs/optimum-intel/openvino/optimization)
|
|
88
88
|
|
|
89
89
|
NNCF is used as a compression backend within the renowned `transformers` repository in HuggingFace Optimum Intel. For instance, the command below exports the [Llama-3.2-3B-Instruct](https://huggingface.co/meta-llama/Llama-3.2-3B-Instruct) model to OpenVINO format with INT4-quantized weights:
|
|
90
90
|
|
|
@@ -102,13 +102,17 @@ NNCF may be easily integrated into training/evaluation pipelines of third-party
|
|
|
102
102
|
|
|
103
103
|
- [torch.compile](https://docs.pytorch.org/tutorials/prototype/openvino_quantizer.html)
|
|
104
104
|
|
|
105
|
-
NNCF is used as primary quantization framework for the [torch.compile OpenVINO integration](https://docs.openvino.ai/
|
|
105
|
+
NNCF is used as primary quantization framework for the [torch.compile OpenVINO integration](https://docs.openvino.ai/2026/openvino-workflow/torch-compile.html).
|
|
106
106
|
|
|
107
107
|
- [OpenVINO Training Extensions](https://github.com/openvinotoolkit/training_extensions)
|
|
108
108
|
|
|
109
109
|
NNCF is integrated into OpenVINO Training Extensions as a model optimization backend. You can train, optimize, and
|
|
110
110
|
export new models based on available model templates as well as run the exported models with OpenVINO.
|
|
111
111
|
|
|
112
|
+
- [Microsoft Olive](https://github.com/microsoft/olive)
|
|
113
|
+
|
|
114
|
+
NNCF is used to quantize OpenVINO IR and ONNX models for the [OpenVINO integration](https://microsoft.github.io/Olive/features/ihv-integration/openvino.html).
|
|
115
|
+
|
|
112
116
|
## NNCF Compressed Model Zoo<a id="nncf-compressed-model-zoo"></a>
|
|
113
117
|
|
|
114
118
|
List of models and compression results for them can be found at our [NNCF Model Zoo page](https://github.com/openvinotoolkit/nncf/blob/develop/docs/ModelZoo.md).
|
|
@@ -131,4 +135,4 @@ You can opt-out at any time by running the following command in the Python envir
|
|
|
131
135
|
|
|
132
136
|
`opt_in_out --opt_out`
|
|
133
137
|
|
|
134
|
-
More information available on [OpenVINO telemetry](https://docs.openvino.ai/
|
|
138
|
+
More information available on [OpenVINO telemetry](https://docs.openvino.ai/2026/about-openvino/additional-resources/telemetry.html).
|
|
@@ -890,3 +890,55 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
890
890
|
SOFTWARE.
|
|
891
891
|
|
|
892
892
|
-------------------------------------------------------------
|
|
893
|
+
|
|
894
|
+
TochAO - PyTorch-Native Training-to-Serving Model Optimization
|
|
895
|
+
|
|
896
|
+
Copyright 2023 Meta
|
|
897
|
+
All contributions by Arm:
|
|
898
|
+
Copyright (c) 2024-2026 Arm Limited and/or its affiliates
|
|
899
|
+
|
|
900
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
901
|
+
|
|
902
|
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
903
|
+
|
|
904
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
905
|
+
|
|
906
|
+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
907
|
+
|
|
908
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
909
|
+
|
|
910
|
+
-------------------------------------------------------------
|
|
911
|
+
|
|
912
|
+
Torchvision
|
|
913
|
+
|
|
914
|
+
BSD 3-Clause License
|
|
915
|
+
|
|
916
|
+
Copyright (c) Soumith Chintala 2016,
|
|
917
|
+
All rights reserved.
|
|
918
|
+
|
|
919
|
+
Redistribution and use in source and binary forms, with or without
|
|
920
|
+
modification, are permitted provided that the following conditions are met:
|
|
921
|
+
|
|
922
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
923
|
+
list of conditions and the following disclaimer.
|
|
924
|
+
|
|
925
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
926
|
+
this list of conditions and the following disclaimer in the documentation
|
|
927
|
+
and/or other materials provided with the distribution.
|
|
928
|
+
|
|
929
|
+
* Neither the name of the copyright holder nor the names of its
|
|
930
|
+
contributors may be used to endorse or promote products derived from
|
|
931
|
+
this software without specific prior written permission.
|
|
932
|
+
|
|
933
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
934
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
935
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
936
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
937
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
938
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
939
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
940
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
941
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
942
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
943
|
+
|
|
944
|
+
-------------------------------------------------------------
|
|
@@ -34,10 +34,9 @@ classifiers = [
|
|
|
34
34
|
dependencies = [
|
|
35
35
|
"networkx>=2.6, <3.5.0",
|
|
36
36
|
"ninja>=1.10.0.post2, <1.14",
|
|
37
|
-
"numpy>=1.24.0, <2.
|
|
37
|
+
"numpy>=1.24.0, <2.5.0",
|
|
38
38
|
"openvino-telemetry>=2023.2.0",
|
|
39
39
|
"packaging>=20.0",
|
|
40
|
-
"pandas>=1.1.5,<2.4",
|
|
41
40
|
"psutil",
|
|
42
41
|
"pydot>=1.4.1, <=3.0.4",
|
|
43
42
|
"rich>=13.5.2",
|
|
@@ -51,6 +50,7 @@ dependencies = [
|
|
|
51
50
|
plots = [
|
|
52
51
|
"kaleido>=0.2.1",
|
|
53
52
|
"matplotlib>=3.3.4",
|
|
53
|
+
"pandas>=1.1.5,<2.4",
|
|
54
54
|
"pillow>=9.0.0",
|
|
55
55
|
"plotly-express>=0.4.1",
|
|
56
56
|
]
|
|
@@ -76,14 +76,25 @@ strict = true
|
|
|
76
76
|
# https://github.com/hauntsaninja/no_implicit_optional
|
|
77
77
|
implicit_optional = true
|
|
78
78
|
files = [
|
|
79
|
+
"src/custom_version.py",
|
|
79
80
|
"src/nncf/api",
|
|
80
81
|
"src/nncf/data",
|
|
81
82
|
"src/nncf/common",
|
|
82
83
|
"src/nncf/torch/function_hook",
|
|
84
|
+
"src/nncf/torch/engine.py",
|
|
85
|
+
"src/nncf/torch/functions.py",
|
|
86
|
+
"src/nncf/torch/model_creation.py",
|
|
87
|
+
"src/nncf/torch/node_utils.py",
|
|
88
|
+
"src/nncf/torch/strip.py",
|
|
89
|
+
"src/nncf/torch/utils.py",
|
|
83
90
|
"src/nncf/quantization/*py",
|
|
84
91
|
"src/nncf/telemetry/",
|
|
85
92
|
"src/nncf/tensor/",
|
|
86
93
|
"src/nncf/*py",
|
|
94
|
+
"src/nncf/experimental/torch/gptqmodel/",
|
|
95
|
+
"src/nncf/quantization/algorithms/weight_compression/config.py",
|
|
96
|
+
"src/nncf/quantization/algorithms/weight_compression/constants.py",
|
|
97
|
+
"examples/llm_compression/torch/gptq_model_convertor/main.py",
|
|
87
98
|
]
|
|
88
99
|
disable_error_code = ["import-untyped"]
|
|
89
100
|
|
|
@@ -91,6 +102,9 @@ disable_error_code = ["import-untyped"]
|
|
|
91
102
|
module = "nncf.tensor.functions.*"
|
|
92
103
|
disable_error_code = ["empty-body", "no-any-return"]
|
|
93
104
|
|
|
105
|
+
[[tool.mypy.overrides]]
|
|
106
|
+
module = ["transformers.*"]
|
|
107
|
+
ignore_missing_imports = true
|
|
94
108
|
|
|
95
109
|
[tool.ruff]
|
|
96
110
|
line-length = 120
|
|
@@ -99,9 +113,7 @@ exclude = ["src/nncf/torch/function_hook/handle_inner_functions.py"]
|
|
|
99
113
|
[tool.ruff.lint]
|
|
100
114
|
preview = true
|
|
101
115
|
ignore = [
|
|
102
|
-
"E201", # whitespace-after-open-bracket
|
|
103
116
|
"E203", # whitespace-before-punctuation
|
|
104
|
-
"E231", # missing-whitespace
|
|
105
117
|
"E251", # unexpected-spaces-around-keyword-parameter-equals
|
|
106
118
|
"E731", # lambda-assignment
|
|
107
119
|
"SIM108", # if-else-block-instead-of-if-exp
|
|
@@ -109,10 +121,7 @@ ignore = [
|
|
|
109
121
|
"SIM117", # multiple-with-statements
|
|
110
122
|
"SIM103", # needless-bool
|
|
111
123
|
"NPY002", # numpy-legacy-random
|
|
112
|
-
"UP007", # non-pep604-annotation-union
|
|
113
124
|
"UP035", # deprecated-import
|
|
114
|
-
"UP038", # non-pep604-isinstance
|
|
115
|
-
"UP045", # non-pep604-annotation-optional
|
|
116
125
|
"D100", # undocumented-public-module
|
|
117
126
|
"D101", # undocumented-public-class
|
|
118
127
|
"D102", # undocumented-public-method
|
|
@@ -135,12 +144,11 @@ ignore = [
|
|
|
135
144
|
"PERF203", # try-except-in-loop
|
|
136
145
|
"PERF401", # manual-list-comprehension
|
|
137
146
|
"PERF403", # manual-dict-comprehension
|
|
138
|
-
"B009", # get-attr-with-constant
|
|
139
|
-
"B010", # set-attr-with-constant
|
|
140
147
|
"B905", # zip-without-explicit-strict
|
|
141
148
|
"RET502", # implicit-return-value
|
|
142
149
|
"RET503", # implicit-return
|
|
143
150
|
"RET504", # unnecessary-assign
|
|
151
|
+
"TD003", # todo-missing-issue
|
|
144
152
|
]
|
|
145
153
|
select = [
|
|
146
154
|
"CPY001", # copyright check
|
|
@@ -156,6 +164,8 @@ select = [
|
|
|
156
164
|
"PERF", # perflint
|
|
157
165
|
"B", # flake8-bugbear
|
|
158
166
|
"RET", # flake8-return
|
|
167
|
+
"PTH", # flake8-use-pathlib
|
|
168
|
+
"TD", # flake8-todos
|
|
159
169
|
]
|
|
160
170
|
extend-select = [
|
|
161
171
|
"SIM", # https://pypi.org/project/flake8-simplify
|
|
@@ -166,7 +176,7 @@ extend-select = [
|
|
|
166
176
|
"tests/**/*.py" = ["F403"]
|
|
167
177
|
"tests/**/__init__.py" = ["F401"]
|
|
168
178
|
"examples/**/*.py" = ["F403"]
|
|
169
|
-
"!src/nncf/**.py" = ["INP", "D", "B"]
|
|
179
|
+
"!src/nncf/**.py" = ["INP", "D", "B", "PTH"]
|
|
170
180
|
"*.ipynb" = ["CPY001"]
|
|
171
181
|
|
|
172
182
|
[tool.ruff.lint.flake8-copyright]
|
|
@@ -104,7 +104,11 @@ def __getattr__(name: str) -> str:
|
|
|
104
104
|
# Rewrite version.py to pass custom version to package
|
|
105
105
|
if os.environ.get("_PYPROJECT_HOOKS_BUILD_BACKEND"):
|
|
106
106
|
content = Path(NNCF_VERSION_FILE).read_text()
|
|
107
|
-
|
|
107
|
+
version_match = re.search(r"^__version__ = ['\"][^'\"]*['\"]", content, re.M)
|
|
108
|
+
if version_match is None:
|
|
109
|
+
msg = "Unable to find version string."
|
|
110
|
+
raise RuntimeError(msg)
|
|
111
|
+
version_str = version_match.group(0)
|
|
108
112
|
content = content.replace(version_str, f'__version__ = "{version}"')
|
|
109
113
|
Path(NNCF_VERSION_FILE).write_text(content)
|
|
110
114
|
|
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
Neural Network Compression Framework (NNCF) for enhanced OpenVINO™ inference.
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
|
+
from types import ModuleType as _ModuleType
|
|
16
|
+
from typing import TYPE_CHECKING as _TYPE_CHECKING
|
|
17
|
+
|
|
15
18
|
from nncf.common.factory import build_graph as build_graph
|
|
16
19
|
from nncf.common.logging import nncf_logger as nncf_logger
|
|
17
20
|
from nncf.common.logging.logger import disable_logging as disable_logging
|
|
@@ -95,3 +98,26 @@ if not any(_AVAILABLE_FRAMEWORKS.values()):
|
|
|
95
98
|
"Please install one of the supported frameworks above in order to use NNCF on top of it.\n"
|
|
96
99
|
"See the installation guide at https://github.com/openvinotoolkit/nncf#installation-guide for help."
|
|
97
100
|
)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
# Lazy import for backend parts
|
|
104
|
+
if _TYPE_CHECKING:
|
|
105
|
+
from nncf import torch as torch
|
|
106
|
+
else:
|
|
107
|
+
|
|
108
|
+
def __getattr__(name: str) -> _ModuleType:
|
|
109
|
+
"""
|
|
110
|
+
This function intercepts attribute access on the module.
|
|
111
|
+
If 'torch' backend is requested, it dynamically imports the sub-package.
|
|
112
|
+
This prevents heavy dependencies from being loaded into memory until they are actually needed by the runtime.
|
|
113
|
+
|
|
114
|
+
:param name: Name of the attribute to lazily load.
|
|
115
|
+
:return: The imported module.
|
|
116
|
+
"""
|
|
117
|
+
from importlib import import_module
|
|
118
|
+
|
|
119
|
+
if name == "torch":
|
|
120
|
+
return import_module(f".{name}", __name__)
|
|
121
|
+
|
|
122
|
+
msg = f"module '{__name__}' has no attribute '{name}'"
|
|
123
|
+
raise AttributeError(msg)
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import types
|
|
13
13
|
import warnings
|
|
14
14
|
from functools import wraps
|
|
15
|
-
from typing import Any, Callable,
|
|
15
|
+
from typing import Any, Callable, TypeVar, cast
|
|
16
16
|
|
|
17
17
|
TObj = TypeVar("TObj")
|
|
18
18
|
|
|
@@ -28,7 +28,7 @@ def warning_deprecated(msg: str) -> None:
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
def deprecated(
|
|
31
|
-
msg:
|
|
31
|
+
msg: str | None = None, start_version: str | None = None, end_version: str | None = None
|
|
32
32
|
) -> Callable[[TObj], TObj]:
|
|
33
33
|
"""
|
|
34
34
|
Decorator to mark a function or class as deprecated.
|
|
@@ -73,7 +73,7 @@ def deprecated(
|
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
def _generate_deprecation_message(
|
|
76
|
-
name: str, text:
|
|
76
|
+
name: str, text: str | None, start_version: str | None, end_version: str | None
|
|
77
77
|
) -> str:
|
|
78
78
|
"""
|
|
79
79
|
Generate a deprecation message for a given name, with optional start and end versions.
|