Sample List

Table 1 Sample list

Framework

Features

How to Obtain

PyTorch

Accuracy-based Automatic Quantization

Click Gitee to obtain the sample code. Perform operations by referring to README.

Uniform quantization

Click Gitee to obtain the sample code. Perform operations by referring to README.

Non-Uniform Quantization

Click Gitee to obtain the sample code. Perform operations by referring to README.

Performs quantization aware training.

Click Gitee to obtain the sample code. Perform operations by referring to README.

Auto channel pruning search

Click Gitee to obtain the sample code. Perform operations by referring to README.

Filter-Level Sparsity

Click Gitee to obtain the sample code. Perform operations by referring to README.

2:4 structured sparsity

Click Gitee to obtain the sample code. Perform operations by referring to README.

Compression combination

Click Gitee to obtain the sample code. Perform operations by referring to README.

Tensor Decomposition

Click Gitee to obtain the sample code. Perform operations by referring to README.

QAT in single-operator mode

Click Gitee to obtain the sample code. Perform operations by referring to README.

Layer-wise Distillation

Click Gitee to obtain the sample code. Perform operations by referring to README.

KV Cache Quantization

Click Gitee to obtain the sample code. Perform operations by referring to README.

ONNX

CLI-based quantization

  • PTQ using the CLI
  • QAT model adaptation to CANN format using the CLI

Click Gitee to obtain the sample. For details, see README.

Accuracy-based Automatic Quantization

Click Gitee to obtain the sample and see README to perform accuracy-based automatic quantization.

Uniform quantization

Click Gitee to obtain the sample. For details, see README.

Non-Uniform Quantization

Click Gitee to obtain the sample. For details, see README.

QAT Model Adaptation to CANN Format

Click Gitee to obtain the sample and convert the QAT model into a CANN model by referring to README.

TensorFlow

CLI-based quantization

  • PTQ using the CLI
  • QAT model adaptation to CANN format using the CLI

Click Gitee to obtain the sample code. Perform operations by referring to README.

Accuracy-based Automatic Quantization

Click Gitee to obtain the sample code. Perform operations by referring to README.

Uniform quantization

Click Gitee to obtain the sample code. Perform operations by referring to README.

Non-Uniform Quantization

Click Gitee to obtain the sample code. Perform operations by referring to README.

Performs quantization aware training.

Click Gitee to obtain the sample code. Perform operations by referring to README.

Auto channel pruning search

Click Gitee to obtain the sample code. Perform operations by referring to README.

Filter-level sparsity (manual sparsity)

Click Gitee to obtain the sample code. Perform operations by referring to README.

2:4 structured sparsity

Click Gitee to obtain the sample code. Perform operations by referring to README.

Compression combination

Click Gitee to obtain the sample code. Perform operations by referring to README.

Tensor Decomposition

Click Gitee to obtain the sample code. Perform operations by referring to README.

Model adaptation using convert_model API

Click Gitee to obtain the sample code. Perform operations by referring to README.

QAT Model Adaptation to CANN Format

Click Gitee to obtain the sample code. Perform operations by referring to README.

Caffe

CLI-based quantization

Click Gitee to obtain the sample code. Perform operations by referring to README.

Accuracy-based Automatic Quantization

Click Gitee to obtain the sample code. Perform operations by referring to README.

Uniform quantization

Click Gitee to obtain the sample code. Perform operations by referring to README.

Non-Uniform Quantization

  • Automatic non-uniform quantization: Click Gitee to obtain the sample, and perform related operations by referring to README.
  • Static non-uniform quantization: Click Gitee to obtain the sample, and perform related operations by referring to README.

Performs quantization aware training.

Click Gitee to obtain the sample code. Perform operations by referring to README.

Tensor Decomposition

Click Gitee to obtain the sample code. Perform operations by referring to README.

Model Adaptation

Click Gitee to obtain the sample code. Perform operations by referring to README.

TensorFlow,Ascend

mobilenetV2

Click Gitee, find the sample in the mobilenetv2 directory, and perform related operations by referring to the README file.

yolov3

Click Gitee, find the sample in the yolov3 directory, and perform related operations by referring to the README file.