|
5 | 5 | 1. [Why does the size of the quantized model remain the same as the original model size?](#1-why-does-the-size-of-the-quantized-model-remain-the-same-as-the-original-model-size) |
6 | 6 | 2. [Why does loading a quantized exported model from a file fail?](#2-why-does-loading-a-quantized-exported-model-from-a-file-fail) |
7 | 7 | 3. [Why am I getting a torch.fx error?](#3-why-am-i-getting-a-torchfx-error) |
8 | | - |
| 8 | +4. [Does MCT support both per-tensor and per-channel quantization?](#4-does-mct-support-both-per-tensor-and-per-channel-quantization) |
9 | 9 |
|
10 | 10 | ### 1. Why does the size of the quantized model remain the same as the original model size? |
11 | 11 |
|
@@ -57,23 +57,19 @@ Check the `torch.fx` error, and search for an identical replacement. Some exampl |
57 | 57 |
|
58 | 58 | ### 4. Does MCT support both per-tensor and per-channel quantization? |
59 | 59 |
|
60 | | -MCT supports both per-tensor and per-channel quantization, as [defined in TPC](https://sonysemiconductorsolutions.github.io/mct-model-optimization/api/api_docs/modules/target_platform_capabilities.html#ug-target-platform-capabilities) |
61 | | - |
62 | | -#model_compression_toolkit.target_platform_capabilities.schema.mct_current_schema.AttributeQuantizationConfig.weights_per_channel_threshold). |
63 | | -To change this, please set the following parameters. |
| 60 | +MCT supports both per-tensor and per-channel quantization, as [defined in TPC](https://sonysemiconductorsolutions.github.io/mct-model-optimization/api/api_docs/modules/target_platform_capabilities.html#model_compression_toolkit.target_platform_capabilities.schema.mct_current_schema.AttributeQuantizationConfig.weights_per_channel_threshold). To change this, please set the following parameters. |
64 | 61 |
|
65 | | -Solution: |
66 | | -You can switch between per-tensor quantization and per-channel quantization by switching the parameter (weights_per_channel_threshold) as shown below. |
| 62 | +**Solution**: You can switch between per-tensor quantization and per-channel quantization by switching the parameter (weights_per_channel_threshold) as shown below. |
67 | 63 |
|
68 | | -In the object that configures the quantizer below: |
69 | | -・model_compression_toolkit.target_platform_capabilities.schema.mct_current_schema.AttributeQuantizationConfig() |
70 | | -Set the following parameters: |
71 | | -・weights_per_channel_threshold(bool) - Indicates whether to quantize the weights per-channel or per-tensor. |
72 | | -For more details, please refer to [this](https://sonysemiconductorsolutions.github.io/mct-model-optimization/api/api_docs/modules/target_platform_capabilities.html#model_compression_toolkit.target_platform_capabilities.schema.mct_current_schema.AttributeQuantizationConfig.weights_per_channel_threshold) page. |
| 64 | +In the object that configures the quantizer below: |
| 65 | +* model_compression_toolkit.target_platform_capabilities.schema.mct_current_schema.AttributeQuantizationConfig() |
| 66 | +Set the following parameter: |
| 67 | +* weights_per_channel_threshold(bool) - Indicates whether to quantize the weights per-channel or per-tensor. |
| 68 | +For more details, please refer to [this page](https://sonysemiconductorsolutions.github.io/mct-model-optimization/api/api_docs/modules/target_platform_capabilities.html#model_compression_toolkit.target_platform_capabilities.schema.mct_current_schema.AttributeQuantizationConfig.weights_per_channel_threshold). |
73 | 69 |
|
74 | 70 |
|
75 | | -In QAT, the following object is used to set up a weight-learnable quantizer: |
76 | | -・model_compression_toolkit.trainable_infrastructure.TrainableQuantizerWeightsConfig() |
77 | | -Set the following parameters: |
78 | | -・weights_per_channel_threshold (bool) – Whether to quantize the weights per-channel or not (per-tensor). |
79 | | -For more details, please refer to [this](https://sonysemiconductorsolutions.github.io/mct-model-optimization/api/api_docs/modules/trainable_infrastructure.html#trainablequantizerweightsconfig) page. |
| 71 | +In QAT, the following object is used to set up a weight-learnable quantizer: |
| 72 | +* model_compression_toolkit.trainable_infrastructure.TrainableQuantizerWeightsConfig() |
| 73 | +Set the following parameter: |
| 74 | +* weights_per_channel_threshold (bool) – Whether to quantize the weights per-channel or not (per-tensor). |
| 75 | +For more details, please refer to [this page](https://sonysemiconductorsolutions.github.io/mct-model-optimization/api/api_docs/modules/trainable_infrastructure.html#trainablequantizerweightsconfig). |
0 commit comments