mct-nightly 2.3.0.20250424.534__py3-none-any.whl → 2.3.0.20250425.557__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.3.0.20250424.534.dist-info → mct_nightly-2.3.0.20250425.557.dist-info}/METADATA +1 -1
- {mct_nightly-2.3.0.20250424.534.dist-info → mct_nightly-2.3.0.20250425.557.dist-info}/RECORD +8 -8
- model_compression_toolkit/__init__.py +1 -1
- model_compression_toolkit/core/common/quantization/set_node_quantization_config.py +10 -5
- model_compression_toolkit/core/common/substitutions/shift_negative_activation.py +7 -7
- {mct_nightly-2.3.0.20250424.534.dist-info → mct_nightly-2.3.0.20250425.557.dist-info}/WHEEL +0 -0
- {mct_nightly-2.3.0.20250424.534.dist-info → mct_nightly-2.3.0.20250425.557.dist-info}/licenses/LICENSE.md +0 -0
- {mct_nightly-2.3.0.20250424.534.dist-info → mct_nightly-2.3.0.20250425.557.dist-info}/top_level.txt +0 -0
{mct_nightly-2.3.0.20250424.534.dist-info → mct_nightly-2.3.0.20250425.557.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: mct-nightly
|
3
|
-
Version: 2.3.0.
|
3
|
+
Version: 2.3.0.20250425.557
|
4
4
|
Summary: A Model Compression Toolkit for neural networks
|
5
5
|
Classifier: Programming Language :: Python :: 3
|
6
6
|
Classifier: License :: OSI Approved :: Apache Software License
|
{mct_nightly-2.3.0.20250424.534.dist-info → mct_nightly-2.3.0.20250425.557.dist-info}/RECORD
RENAMED
@@ -1,5 +1,5 @@
|
|
1
|
-
mct_nightly-2.3.0.
|
2
|
-
model_compression_toolkit/__init__.py,sha256=
|
1
|
+
mct_nightly-2.3.0.20250425.557.dist-info/licenses/LICENSE.md,sha256=aYSSIb-5AFPeITTvXm1UAoe0uYBiMmSS8flvXaaFUks,10174
|
2
|
+
model_compression_toolkit/__init__.py,sha256=kXjmCqsExE8DYRx8JTVs4AhVXF1GF94SPL9EcfyLeks,1557
|
3
3
|
model_compression_toolkit/constants.py,sha256=iJ6vfTjC2oFIZWt8wvHoxEw5YJi3yl0Hd4q30_8q0Zc,3958
|
4
4
|
model_compression_toolkit/defaultdict.py,sha256=LSc-sbZYXENMCw3U9F4GiXuv67IKpdn0Qm7Fr11jy-4,2277
|
5
5
|
model_compression_toolkit/logger.py,sha256=L3q7tn3Uht0i_7phnlOWMR2Te2zvzrt2HOz9vYEInts,4529
|
@@ -112,7 +112,7 @@ model_compression_toolkit/core/common/quantization/quantization_fn_selection.py,
|
|
112
112
|
model_compression_toolkit/core/common/quantization/quantization_params_fn_selection.py,sha256=7eG7dl1TcbdnHwgmvyjarxLs0o6Lw_9VAjXAm4rsiBk,3791
|
113
113
|
model_compression_toolkit/core/common/quantization/quantize_graph_weights.py,sha256=N005MSvx8UypVpa7XrxNrB2G732n2wHj3RmLyjTgd3I,2728
|
114
114
|
model_compression_toolkit/core/common/quantization/quantize_node.py,sha256=cdzGNWfT4MRogIU8ehs0tr3lVjnzAI-jeoS9b4TwVBo,2854
|
115
|
-
model_compression_toolkit/core/common/quantization/set_node_quantization_config.py,sha256=
|
115
|
+
model_compression_toolkit/core/common/quantization/set_node_quantization_config.py,sha256=76BjqZbeRz7zIblKxGp-AUkHOt-KZMlYjsXP8Ph-1jc,30943
|
116
116
|
model_compression_toolkit/core/common/quantization/quantization_params_generation/__init__.py,sha256=eCDGwsWYLU6z7qbEVb4TozMW_nd5VEP_iCJ6PcvyEPw,1486
|
117
117
|
model_compression_toolkit/core/common/quantization/quantization_params_generation/error_functions.py,sha256=_m-XkEMJMHf0gYwVIXAoHVjdRa2NXt_gYdwBlw76ZR8,24031
|
118
118
|
model_compression_toolkit/core/common/quantization/quantization_params_generation/lut_kmeans_params.py,sha256=RL-PklAjGyC-26anSt8fU07a6pB_LBQFQy9o4e9giN0,8739
|
@@ -145,7 +145,7 @@ model_compression_toolkit/core/common/substitutions/linear_collapsing_substituti
|
|
145
145
|
model_compression_toolkit/core/common/substitutions/remove_identity.py,sha256=TKU1TIU52UIkVnl0EZvWnDhLV9nIVZ4hqi-w1i4NXMk,2637
|
146
146
|
model_compression_toolkit/core/common/substitutions/residual_collapsing.py,sha256=N82mso5j3EJQlKt9EMHjjEJ67FmdGQeCfN8U5grOFXo,4830
|
147
147
|
model_compression_toolkit/core/common/substitutions/scale_equalization.py,sha256=p57u25qdW2pimxzGwgMXEBV4S-LzXuTVAlIM7830WfU,10966
|
148
|
-
model_compression_toolkit/core/common/substitutions/shift_negative_activation.py,sha256=
|
148
|
+
model_compression_toolkit/core/common/substitutions/shift_negative_activation.py,sha256=zCkdyZHEkbxkORmd071_XWajkpIhnDq9D6FyeE4TQjc,30057
|
149
149
|
model_compression_toolkit/core/common/substitutions/softmax_shift.py,sha256=R-0ZqhYAuZLEFWHvB2UTPm52L6gWHGdRdEnwGxKSeGI,2625
|
150
150
|
model_compression_toolkit/core/common/substitutions/virtual_activation_weights_composition.py,sha256=w43dRmaG96a8SNECgghxoFCTSoZ-vUb33dXGm2PbomE,4251
|
151
151
|
model_compression_toolkit/core/common/substitutions/weights_activation_split.py,sha256=gt07lXRUvYunJKiwv_w20zfXhcplSW4oT2C1dqiNNXc,4719
|
@@ -528,7 +528,7 @@ model_compression_toolkit/xquant/pytorch/model_analyzer.py,sha256=b93o800yVB3Z-i
|
|
528
528
|
model_compression_toolkit/xquant/pytorch/pytorch_report_utils.py,sha256=UVN_S9ULHBEldBpShCOt8-soT8YTQ5oE362y96qF_FA,3950
|
529
529
|
model_compression_toolkit/xquant/pytorch/similarity_functions.py,sha256=CERxq5K8rqaiE-DlwhZBTUd9x69dtYJlkHOPLB54vm8,2354
|
530
530
|
model_compression_toolkit/xquant/pytorch/tensorboard_utils.py,sha256=mkoEktLFFHtEKzzFRn_jCnxjhJolK12TZ5AQeDHzUO8,9767
|
531
|
-
mct_nightly-2.3.0.
|
532
|
-
mct_nightly-2.3.0.
|
533
|
-
mct_nightly-2.3.0.
|
534
|
-
mct_nightly-2.3.0.
|
531
|
+
mct_nightly-2.3.0.20250425.557.dist-info/METADATA,sha256=3W1evd1H2JL0wpqb1frzmmX5nz2fqHcMib1y3remRt8,25560
|
532
|
+
mct_nightly-2.3.0.20250425.557.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
|
533
|
+
mct_nightly-2.3.0.20250425.557.dist-info/top_level.txt,sha256=gsYA8juk0Z-ZmQRKULkb3JLGdOdz8jW_cMRjisn9ga4,26
|
534
|
+
mct_nightly-2.3.0.20250425.557.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.3.0.
|
30
|
+
__version__ = "2.3.0.20250425.000557"
|
@@ -119,11 +119,16 @@ def filter_node_qco_by_graph(node: BaseNode,
|
|
119
119
|
_next_nodes.extend(graph.get_next_nodes(n))
|
120
120
|
next_nodes.append(n)
|
121
121
|
|
122
|
-
if len(next_nodes):
|
123
|
-
|
124
|
-
|
122
|
+
if len(next_nodes) == 0:
|
123
|
+
return _base_config, _node_qc_options
|
124
|
+
next_nodes_qc_options = [_node.get_qco(fqc) for _node in next_nodes]
|
125
|
+
all_next_nodes_supported_input_bitwidth = [max_input_activation_n_bits(op_cfg)
|
125
126
|
for qc_opts in next_nodes_qc_options
|
126
|
-
for op_cfg in qc_opts.quantization_configurations
|
127
|
+
for op_cfg in qc_opts.quantization_configurations
|
128
|
+
if op_cfg.enable_activation_quantization or op_cfg.quantization_preserving
|
129
|
+
]
|
130
|
+
if len(all_next_nodes_supported_input_bitwidth):
|
131
|
+
next_nodes_supported_input_bitwidth = min(all_next_nodes_supported_input_bitwidth)
|
127
132
|
|
128
133
|
# Filter node's QC options that match next nodes input bit-width.
|
129
134
|
_node_qc_options = [_option for _option in _node_qc_options
|
@@ -205,7 +210,7 @@ def set_quantization_configs_to_node(node: BaseNode,
|
|
205
210
|
# Preserving the quantization of more than 1 previous node is ambiguous, so disable it.
|
206
211
|
Logger.info(f"Disabling Quantization-Preserving for node {node.name} because it has more than 1 input activations.")
|
207
212
|
candidate_qc.activation_quantization_cfg.quant_mode = ActivationQuantizationMode.NO_QUANT
|
208
|
-
elif not prev_nodes[0].is_quantization_preserving()
|
213
|
+
elif not prev_nodes[0].is_quantization_preserving() and not prev_nodes[0].is_activation_quantization_enabled():
|
209
214
|
# Preserving the quantization of an unquantized node isn't possible, so disable it.
|
210
215
|
Logger.info(f"Disabling Quantization-Preserving for node {node.name} because previous node activation quantization is disabled.")
|
211
216
|
candidate_qc.activation_quantization_cfg.quant_mode = ActivationQuantizationMode.NO_QUANT
|
@@ -343,6 +343,13 @@ def shift_negative_function(graph: Graph,
|
|
343
343
|
graph.set_out_stats_collector_to_node(add_node, add_node_stats_collector)
|
344
344
|
graph.shift_stats_collector(add_node, np.array(shift_value))
|
345
345
|
|
346
|
+
set_quantization_configs_to_node(fw_info=fw_info,
|
347
|
+
node=add_node,
|
348
|
+
graph=graph,
|
349
|
+
quant_config=core_config.quantization_config,
|
350
|
+
fqc=graph.fqc,
|
351
|
+
mixed_precision_enable=core_config.is_mixed_precision_enabled)
|
352
|
+
|
346
353
|
if padding is not None:
|
347
354
|
pad_node = create_pad_node(op2d_node.name,
|
348
355
|
add_node.name,
|
@@ -373,13 +380,6 @@ def shift_negative_function(graph: Graph,
|
|
373
380
|
|
374
381
|
op2d_node.input_shape = pad_node.output_shape
|
375
382
|
|
376
|
-
set_quantization_configs_to_node(fw_info=fw_info,
|
377
|
-
node=add_node,
|
378
|
-
graph=graph,
|
379
|
-
quant_config=core_config.quantization_config,
|
380
|
-
fqc=graph.fqc,
|
381
|
-
mixed_precision_enable=core_config.is_mixed_precision_enabled)
|
382
|
-
|
383
383
|
original_non_linear_activation_nbits = non_linear_node_cfg_candidate.activation_n_bits
|
384
384
|
# The non-linear node's output should be float, so we approximate it by using 16bits quantization.
|
385
385
|
for candidate_qc in non_linear_node.candidates_quantization_cfg:
|
File without changes
|
File without changes
|
{mct_nightly-2.3.0.20250424.534.dist-info → mct_nightly-2.3.0.20250425.557.dist-info}/top_level.txt
RENAMED
File without changes
|