diff --git a/model_compression_toolkit/target_platform_capabilities/README.md b/model_compression_toolkit/target_platform_capabilities/README.md index 560e99b58..2deda75a5 100644 --- a/model_compression_toolkit/target_platform_capabilities/README.md +++ b/model_compression_toolkit/target_platform_capabilities/README.md @@ -13,7 +13,7 @@ in some operator for its weights/activations, fusing patterns, etc.) ## Supported Target Platform Models Currently, MCT contains three target-platform models -(new models can be created and used by users as demonstrated [here](https://sony.github.io/model_optimization/api/api_docs/modules/target_platform.html#targetplatformmodel-code-example)): +(new models can be created and used by users as demonstrated [here](https://github.com/sony/model_optimization/blob/main/model_compression_toolkit/target_platform_capabilities/tpc_models/imx500_tpc/v1/tpc.py)): - [IMX500](https://developer.sony.com/develop/imx500/) - [TFLite](https://www.tensorflow.org/lite/performance/quantization_spec) - [QNNPACK](https://github.com/pytorch/QNNPACK) @@ -50,4 +50,4 @@ quantized_model, quantization_info = mct.ptq.keras_post_training_quantization(Mo Similarly, you can retrieve IMX500, TFLite and QNNPACK target-platform models for Keras and PyTorch frameworks. -For more information and examples, we highly recommend you to visit our [project website](https://sony.github.io/model_optimization/api/api_docs/modules/target_platform.html#ug-target-platform). \ No newline at end of file +For more information and examples, we highly recommend you to visit our [project website](https://sony.github.io/model_optimization/api/api_docs/modules/target_platform_capabilities.html#ug-target-platform-capabilities). diff --git a/tutorials/notebooks/mct_features_notebooks/keras/example_keras_activation_threshold_search.ipynb b/tutorials/notebooks/mct_features_notebooks/keras/example_keras_activation_threshold_search.ipynb index 25d3850e0..8aaf4191a 100644 --- a/tutorials/notebooks/mct_features_notebooks/keras/example_keras_activation_threshold_search.ipynb +++ b/tutorials/notebooks/mct_features_notebooks/keras/example_keras_activation_threshold_search.ipynb @@ -276,7 +276,7 @@ "cell_type": "markdown", "source": [ "## Target Platform Capabilities\n", - "MCT optimizes the model for dedicated hardware. This is done using TPC (for more details, please visit our [documentation](https://sony.github.io/model_optimization/api/api_docs/modules/target_platform.html)). Here, we use the default Tensorflow TPC:" + "MCT optimizes the model for dedicated hardware. This is done using TPC (for more details, please visit our [documentation](https://sony.github.io/model_optimization/api/api_docs/modules/target_platform_capabilities.html)). Here, we use the default Tensorflow TPC:" ], "metadata": { "collapsed": false diff --git a/tutorials/notebooks/mct_features_notebooks/keras/example_keras_activation_z_score_threshold.ipynb b/tutorials/notebooks/mct_features_notebooks/keras/example_keras_activation_z_score_threshold.ipynb index 562f4fce1..879b7012e 100644 --- a/tutorials/notebooks/mct_features_notebooks/keras/example_keras_activation_z_score_threshold.ipynb +++ b/tutorials/notebooks/mct_features_notebooks/keras/example_keras_activation_z_score_threshold.ipynb @@ -260,7 +260,7 @@ "cell_type": "markdown", "source": [ "## Target Platform Capabilities\n", - "MCT optimizes the model for dedicated hardware. This is done using TPC (for more details, please visit our [documentation](https://sony.github.io/model_optimization/api/api_docs/modules/target_platform.html)). Here, we use the default Tensorflow TPC:" + "MCT optimizes the model for dedicated hardware. This is done using TPC (for more details, please visit our [documentation](https://sony.github.io/model_optimization/api/api_docs/modules/target_platform_capabilities.html)). Here, we use the default Tensorflow TPC:" ], "metadata": { "collapsed": false diff --git a/tutorials/notebooks/mct_features_notebooks/keras/example_keras_mobilenet_mixed_precision.ipynb b/tutorials/notebooks/mct_features_notebooks/keras/example_keras_mobilenet_mixed_precision.ipynb index df9c90c86..3a2d4154c 100644 --- a/tutorials/notebooks/mct_features_notebooks/keras/example_keras_mobilenet_mixed_precision.ipynb +++ b/tutorials/notebooks/mct_features_notebooks/keras/example_keras_mobilenet_mixed_precision.ipynb @@ -243,7 +243,7 @@ "source": [ "## Target Platform Capabilities (TPC)\n", "In addition, MCT optimizes models for dedicated hardware platforms using Target Platform Capabilities (TPC). \n", - "**Note:** To apply mixed-precision quantization to specific layers, the TPC must define different bit-width options for those layers. For more details, please refer to our [documentation](https://sony.github.io/model_optimization/api/api_docs/modules/target_platform.html). In this example, we use the default Tensorflow TPC, which supports 2, 4, and 8-bit options for convolution and linear layers" + "**Note:** To apply mixed-precision quantization to specific layers, the TPC must define different bit-width options for those layers. For more details, please refer to our [documentation](https://sony.github.io/model_optimization/api/api_docs/modules/target_platform_capabilities.html). In this example, we use the default Tensorflow TPC, which supports 2, 4, and 8-bit options for convolution and linear layers" ], "metadata": { "collapsed": false diff --git a/tutorials/notebooks/mct_features_notebooks/keras/example_keras_post-training_quantization.ipynb b/tutorials/notebooks/mct_features_notebooks/keras/example_keras_post-training_quantization.ipynb index 2d1464025..f9ee69f94 100644 --- a/tutorials/notebooks/mct_features_notebooks/keras/example_keras_post-training_quantization.ipynb +++ b/tutorials/notebooks/mct_features_notebooks/keras/example_keras_post-training_quantization.ipynb @@ -237,7 +237,7 @@ "cell_type": "markdown", "source": [ "## Target Platform Capabilities\n", - "MCT optimizes the model for dedicated hardware. This is done using TPC (for more details, please visit our [documentation](https://sony.github.io/model_optimization/api/api_docs/modules/target_platform.html)). Here, we use the default Tensorflow TPC:" + "MCT optimizes the model for dedicated hardware. This is done using TPC (for more details, please visit our [documentation](https://sony.github.io/model_optimization/api/api_docs/modules/target_platform_capabilities.html)). Here, we use the default Tensorflow TPC:" ], "metadata": { "collapsed": false diff --git a/tutorials/notebooks/mct_features_notebooks/keras/example_keras_pruning_mnist.ipynb b/tutorials/notebooks/mct_features_notebooks/keras/example_keras_pruning_mnist.ipynb index 2f2bf0793..17ed0b942 100644 --- a/tutorials/notebooks/mct_features_notebooks/keras/example_keras_pruning_mnist.ipynb +++ b/tutorials/notebooks/mct_features_notebooks/keras/example_keras_pruning_mnist.ipynb @@ -204,7 +204,7 @@ "## MCT Structured Pruning\n", "\n", "### Target Platform Capabilities (TPC)\n", - "MCT optimizes models for dedicated hardware using Target Platform Capabilities (TPC). For more details, please refer to our [documentation](https://sony.github.io/model_optimization/api/api_docs/modules/target_platform.html)). First, we'll configure the TPC to define each layer's SIMD (Single Instruction, Multiple Data) size.\n", + "MCT optimizes models for dedicated hardware using Target Platform Capabilities (TPC). For more details, please refer to our [documentation](https://sony.github.io/model_optimization/api/api_docs/modules/target_platform_capabilities.html)). First, we'll configure the TPC to define each layer's SIMD (Single Instruction, Multiple Data) size.\n", "\n", "In MCT, SIMD plays a key role in channel grouping, influencing the pruning process by considering channel importance within each SIMD group.\n", "\n", diff --git a/tutorials/notebooks/mct_features_notebooks/keras/example_keras_qat.ipynb b/tutorials/notebooks/mct_features_notebooks/keras/example_keras_qat.ipynb index df20b9b51..200d6d5b7 100644 --- a/tutorials/notebooks/mct_features_notebooks/keras/example_keras_qat.ipynb +++ b/tutorials/notebooks/mct_features_notebooks/keras/example_keras_qat.ipynb @@ -171,7 +171,7 @@ "source": [ "## Preparing the Model for Hardware-Friendly Quantization Aware Training with MCT\n", "## Target Platform Capabilities\n", - "MCT optimizes the model for dedicated hardware. This is done using TPC (for more details, please visit our [documentation](https://sony.github.io/model_optimization/api/api_docs/modules/target_platform.html)). In this tutorial, we use a TPC configuration that applies 2-bit quantization for weights and 3-bit quantization for activations.\n", + "MCT optimizes the model for dedicated hardware. This is done using TPC (for more details, please visit our [documentation](https://sony.github.io/model_optimization/api/api_docs/modules/target_platform_capabilities.html)). In this tutorial, we use a TPC configuration that applies 2-bit quantization for weights and 3-bit quantization for activations.\n", "\n", "If desired, you can skip this step and directly use the pre-configured [`get_target_platform_capabilities`](https://sony.github.io/model_optimization/api/api_docs/methods/get_target_platform_capabilities.html) function to obtain an initialized TPC." ], diff --git a/tutorials/notebooks/mct_features_notebooks/pytorch/example_pytorch_activation_threshold_search.ipynb b/tutorials/notebooks/mct_features_notebooks/pytorch/example_pytorch_activation_threshold_search.ipynb index 7720601ff..e9edaadf8 100644 --- a/tutorials/notebooks/mct_features_notebooks/pytorch/example_pytorch_activation_threshold_search.ipynb +++ b/tutorials/notebooks/mct_features_notebooks/pytorch/example_pytorch_activation_threshold_search.ipynb @@ -219,7 +219,7 @@ }, "source": [ "## Target Platform Capabilities\n", - "MCT optimizes the model for dedicated hardware. This is done using TPC (for more details, please visit our [documentation](https://sony.github.io/model_optimization/api/api_docs/modules/target_platform.html)). Here, we use the default Tensorflow TPC:" + "MCT optimizes the model for dedicated hardware. This is done using TPC (for more details, please visit our [documentation](https://sony.github.io/model_optimization/api/api_docs/modules/target_platform_capabilities.html)). Here, we use the default Tensorflow TPC:" ] }, { diff --git a/tutorials/notebooks/mct_features_notebooks/pytorch/example_pytorch_data_generation.ipynb b/tutorials/notebooks/mct_features_notebooks/pytorch/example_pytorch_data_generation.ipynb index 76640a314..5c40cf331 100644 --- a/tutorials/notebooks/mct_features_notebooks/pytorch/example_pytorch_data_generation.ipynb +++ b/tutorials/notebooks/mct_features_notebooks/pytorch/example_pytorch_data_generation.ipynb @@ -216,7 +216,7 @@ "In order to evaulate our generated images, we will use them to quantize the model using MCT's PTQ.This is referred to as **\"Zero-Shot Quantization (ZSQ)\"** or **\"Data-Free Quantization\"** because no real data is used in the quantization process. Next we will define configurations for MCT's PTQ.\n", "\n", "### Target Platform Capabilities (TPC)\n", - "MCT optimizes the model for dedicated hardware platforms. This is done using TPC (for more details, please visit our [documentation](https://sony.github.io/model_optimization/api/api_docs/modules/target_platform.html)). Here, we use the default Pytorch TPC:" + "MCT optimizes the model for dedicated hardware platforms. This is done using TPC (for more details, please visit our [documentation](https://sony.github.io/model_optimization/api/api_docs/modules/target_platform_capabilities.html)). Here, we use the default Pytorch TPC:" ], "metadata": { "collapsed": false diff --git a/tutorials/notebooks/mct_features_notebooks/pytorch/example_pytorch_mixed_precision_ptq.ipynb b/tutorials/notebooks/mct_features_notebooks/pytorch/example_pytorch_mixed_precision_ptq.ipynb index e5d17edf2..6853531a4 100644 --- a/tutorials/notebooks/mct_features_notebooks/pytorch/example_pytorch_mixed_precision_ptq.ipynb +++ b/tutorials/notebooks/mct_features_notebooks/pytorch/example_pytorch_mixed_precision_ptq.ipynb @@ -181,7 +181,7 @@ "source": [ "## Target Platform Capabilities (TPC)\n", "In addition, MCT optimizes models for dedicated hardware platforms using Target Platform Capabilities (TPC). \n", - "**Note:** To apply mixed-precision quantization to specific layers, the TPC must define different bit-width options for those layers. For more details, please refer to our [documentation](https://sony.github.io/model_optimization/api/api_docs/modules/target_platform.html). In this example, we use the default PyTorch TPC, which supports 2, 4, and 8-bit options for convolution and linear layers." + "**Note:** To apply mixed-precision quantization to specific layers, the TPC must define different bit-width options for those layers. For more details, please refer to our [documentation](https://sony.github.io/model_optimization/api/api_docs/modules/target_platform_capabilities.html). In this example, we use the default PyTorch TPC, which supports 2, 4, and 8-bit options for convolution and linear layers." ], "metadata": { "collapsed": false diff --git a/tutorials/notebooks/mct_features_notebooks/pytorch/example_pytorch_post_training_quantization.ipynb b/tutorials/notebooks/mct_features_notebooks/pytorch/example_pytorch_post_training_quantization.ipynb index 5df268d1f..7a27d7bf2 100644 --- a/tutorials/notebooks/mct_features_notebooks/pytorch/example_pytorch_post_training_quantization.ipynb +++ b/tutorials/notebooks/mct_features_notebooks/pytorch/example_pytorch_post_training_quantization.ipynb @@ -180,7 +180,7 @@ "cell_type": "markdown", "source": [ "## Target Platform Capabilities (TPC)\n", - "In addition, MCT optimizes the model for dedicated hardware platforms. This is done using TPC (for more details, please visit our [documentation](https://sony.github.io/model_optimization/api/api_docs/modules/target_platform.html)). Here, we use the default Pytorch TPC:" + "In addition, MCT optimizes the model for dedicated hardware platforms. This is done using TPC (for more details, please visit our [documentation](https://sony.github.io/model_optimization/api/api_docs/modules/target_platform_capabilities.html)). Here, we use the default Pytorch TPC:" ], "metadata": { "collapsed": false