Skip to content

Commit 65679a5

Browse files
Add docs
1 parent f600f5f commit 65679a5

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

docs/source/openvino/optimization.mdx

+2
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ quantization_config = OVWeightQuantizationConfig(
8787
)
8888
```
8989

90+
Note: `OVWeightQuantizationConfig` also accepts key word arguments not listed in its constructor. In this case such arguments will be passed directly to `nncf.compress_weights()` call. This is useful for passing additional parameters to the quantization algorithm.
91+
9092
By default the quantization scheme will be [asymmetric](https://github.com/openvinotoolkit/nncf/blob/develop/docs/usage/training_time_compression/other_algorithms/LegacyQuantization.md#asymmetric-quantization), to make it [symmetric](https://github.com/openvinotoolkit/nncf/blob/develop/docs/usage/training_time_compression/other_algorithms/LegacyQuantization.md#symmetric-quantization) you can add `sym=True`.
9193

9294
For 4-bit quantization you can also specify the following arguments in the quantization configuration :

optimum/intel/openvino/quantization.py

+2
Original file line numberDiff line numberDiff line change
@@ -1044,6 +1044,7 @@ def _weight_only_quantization(
10441044
f"by the ones given in _weight_only_quantization call kwargs: {kwargs_intersection}."
10451045
)
10461046
wc_kwargs.update(kwargs)
1047+
wc_kwargs.pop("weight_only", None)
10471048

10481049
compressed_model = nncf.compress_weights(
10491050
model,
@@ -1076,6 +1077,7 @@ def _full_quantization(
10761077
f"by the ones given in _full_quantization call kwargs: {kwargs_intersection}."
10771078
)
10781079
q_kwargs.update(kwargs)
1080+
q_kwargs.pop("weight_only", None)
10791081

10801082
quantized_model = nncf.quantize(model, calibration_dataset=calibration_dataset, **q_kwargs)
10811083

0 commit comments

Comments
 (0)