@@ -168,7 +168,7 @@ def _infer_ov_model(
168
168
return outputs
169
169
170
170
171
- def _prepare_compression_model_inputs (
171
+ def _prepare_quantization_model_inputs (
172
172
ov_model_params ,
173
173
weight_shape : Tuple ,
174
174
scale_shape : Optional [Tuple ],
@@ -196,7 +196,7 @@ def _prepare_compression_model_inputs(
196
196
return weight_shape , scale_shape , zero_point_shape
197
197
198
198
199
- def get_compress_weight_model (
199
+ def get_integer_quantization_model (
200
200
ov_model_params : OVModelParameters ,
201
201
config : WeightCompressionConfig ,
202
202
weight_shape : Tuple ,
@@ -219,11 +219,11 @@ def get_compress_weight_model(
219
219
:return: A model callable that compresses weights using the given configuration. Or a model as nodes, if
220
220
`return_nodes` is True.
221
221
"""
222
- weight_shape , scale_shape , zero_point_shape = _prepare_compression_model_inputs (
222
+ weight_shape , scale_shape , zero_point_shape = _prepare_quantization_model_inputs (
223
223
ov_model_params , weight_shape , scale_shape , zero_point_shape , reduction_axes
224
224
)
225
225
226
- return _build_compress_model (
226
+ return _build_integer_quantization_model (
227
227
config ,
228
228
ov_model_params ,
229
229
weight_shape ,
@@ -233,7 +233,7 @@ def get_compress_weight_model(
233
233
)
234
234
235
235
236
- def get_compress_decompress_weight_model (
236
+ def get_integer_quantize_dequantize_weight_model (
237
237
ov_model_params : OVModelParameters ,
238
238
config : WeightCompressionConfig ,
239
239
weight_shape : Tuple ,
@@ -259,11 +259,11 @@ def get_compress_decompress_weight_model(
259
259
:return: A model callable that returns a decompressed weight, and optionally compressed weight, scale,
260
260
(and zero point) if `return_compressed_weight` is True.
261
261
"""
262
- weight_shape , scale_shape , zero_point_shape = _prepare_compression_model_inputs (
262
+ weight_shape , scale_shape , zero_point_shape = _prepare_quantization_model_inputs (
263
263
ov_model_params , weight_shape , scale_shape , zero_point_shape , reduction_axes
264
264
)
265
265
266
- return _build_compress_decompress_model (
266
+ return _build_integer_quantize_dequantize_weight_model (
267
267
config ,
268
268
ov_model_params ,
269
269
weight_shape ,
@@ -274,7 +274,7 @@ def get_compress_decompress_weight_model(
274
274
)
275
275
276
276
277
- def get_quantization_error_model (
277
+ def get_integer_quantization_error_model (
278
278
ov_model_params : OVModelParameters ,
279
279
config : WeightCompressionConfig ,
280
280
original_weight_shape : Tuple ,
@@ -296,15 +296,15 @@ def get_quantization_error_model(
296
296
:param reduction_axes: Axes to reduce the weight tensor.
297
297
:return: A model callable that returns the quantization error.
298
298
"""
299
- weight_shape , _ , _ = _prepare_compression_model_inputs (ov_model_params , weight_shape , None , None , reduction_axes )
299
+ weight_shape , _ , _ = _prepare_quantization_model_inputs (ov_model_params , weight_shape , None , None , reduction_axes )
300
300
301
- return _build_quantization_error_model (
301
+ return _build_integer_quantization_error_model (
302
302
config , ov_model_params , original_weight_shape , weight_shape , original_reduction_axes , reduction_axes
303
303
)
304
304
305
305
306
306
@cache_results (OV_MODEL_CACHE )
307
- def _build_compress_model (
307
+ def _build_integer_quantization_model (
308
308
config : WeightCompressionConfig ,
309
309
ov_model_params : OVModelParameters ,
310
310
weight_shape : Tuple ,
@@ -454,7 +454,7 @@ def _build_compress_model(
454
454
455
455
456
456
@cache_results (OV_MODEL_CACHE )
457
- def _build_compress_decompress_model (
457
+ def _build_integer_quantize_dequantize_weight_model (
458
458
config : WeightCompressionConfig ,
459
459
ov_model_params : OVModelParameters ,
460
460
weight_shape : Tuple ,
@@ -477,7 +477,7 @@ def _build_compress_decompress_model(
477
477
raise ValueError (msg )
478
478
479
479
# Get compression model as input/result nodes and potentially modified ov model parameters
480
- ov_parameters , ov_results , ov_model_params = _build_compress_model (
480
+ ov_parameters , ov_results , ov_model_params = _build_integer_quantization_model (
481
481
config , ov_model_params , weight_shape , scale_shape , zero_point_shape , reduction_axes , return_nodes = True
482
482
)
483
483
@@ -514,15 +514,15 @@ def _build_compress_decompress_model(
514
514
515
515
516
516
@cache_results (OV_MODEL_CACHE )
517
- def _build_quantization_error_model (
517
+ def _build_integer_quantization_error_model (
518
518
config : WeightCompressionConfig ,
519
519
ov_model_params : OVModelParameters ,
520
520
original_weight_shape : Tuple ,
521
521
weight_shape : Tuple ,
522
522
original_reduction_axes : ReductionAxes ,
523
523
reduction_axes : ReductionAxes ,
524
524
) -> ModelCallable :
525
- ov_parameters , ov_results , ov_model_params = _build_compress_decompress_model (
525
+ ov_parameters , ov_results , ov_model_params = _build_integer_quantize_dequantize_weight_model (
526
526
config ,
527
527
ov_model_params ,
528
528
weight_shape ,
0 commit comments