Skip to content

Commit e3f9389

Browse files
daisydenftian1
authored andcommitted
documentation update
1 parent 123a001 commit e3f9389

File tree

3 files changed

+152
-54
lines changed

3 files changed

+152
-54
lines changed

README.md

Lines changed: 64 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Intel® Low Precision Optimization Tool
33

44
Intel® Low Precision Optimization Tool is an open-source python library which is intended to deliver a unified low-precision inference interface cross multiple Intel optimized DL frameworks on both CPU and GPU. It supports automatic accuracy-driven tuning strategies, along with additional objectives like performance, model size, or memory footprint. It also provides the easy extension capability for new backends, tuning strategies, metrics and objectives.
55

6+
67
> **WARNING**
78
>
89
> GPU support is under development.
@@ -16,13 +17,19 @@ Currently supported tuning strategies are:
1617
* [Basic](docs/introduction.md#basic-strategy)
1718
* [Bayesian](docs/introduction.md#bayesian-strategy)
1819
* [MSE](docs/introduction.md#mse-strategy)
20+
* [Exhaustive](docs/introduction.md#exhaustive-strategy)
21+
* [Random](docs/introduction.md#random-strategy)
22+
1923

24+
# Introduction
2025

21-
# Documentation
26+
[Introduction](docs/introduction.md) explains Intel® Low Precision Optimization Tool infrastructure, design philosophy, supported functionality, details of tuning strategy implementations and tuning result on popular models.
2227

23-
* [Introduction](docs/introduction.md) explains Intel® Low Precision Optimization Tool infrastructure, design philosophy, supported functionality, details of tuning strategy implementations and tuning result on popular models.
24-
* [Tutorial](docs/tutorial.md) provides
25-
comprehensive step-by-step instructions of how to enable Intel® Low Precision Optimization Tool on sample models.
28+
# Tutorials
29+
* [Hello World](examples/helloworld/README.md) demonstrates the simple steps to utilize Intel® Low Precision Optimization Tool for quanitzation, which can help you quick start with the tool.
30+
* [Tutorials](docs/README.md) provides
31+
comprehensive instructions of how to utilize diffrennt features of Intel® Low Precision Optimization Tool.
32+
* [Examples](examples) is a tuning zoo to demonstrate the usage of Intel® Low Precision Optimization Tool in TensorFlow, PyTorch and MxNet for industry models of diffrent categories.
2633

2734
# Install from source
2835

@@ -57,21 +64,59 @@ Intel® Low Precision Optimization Tool requires to install Intel optimized fram
5764

5865
The followings are the examples integrated with Intel® Low Precision Optimization Tool for auto tuning.
5966

60-
| Model | Framework | Model | Framework | Model | Framework |
61-
|---------------------------------------------------------------------|------------|--------------------------------------------------------------------|-----------|----------------------------------------------------------------------|------------|
62-
| [ResNet50 V1](examples/mxnet/image_recognition/README.md) | MXNet | [BERT-Large RTE](examples/pytorch/language_translation/README.md) | PyTorch | [ResNet18](examples/pytorch/image_recognition/imagenet/README.md) | PyTorch |
63-
| [MobileNet V1](examples/mxnet/image_recognition/README.md) | MXNet | [BERT-Large QNLI](examples/pytorch/language_translation/README.md) | PyTorch | [ResNet50 V1](examples/tensorflow/image_recognition/README.md) | TensorFlow |
64-
| [MobileNet V2](examples/mxnet/image_recognition/README.md) | MXNet | [BERT-Large CoLA](examples/pytorch/language_translation/README.md) | PyTorch | [ResNet50 V1.5](examples/tensorflow/image_recognition/README.md) | TensorFlow |
65-
| [SSD-ResNet50](examples/mxnet/object_detection/README.md) | MXNet | [BERT-Base SST-2](examples/pytorch/language_translation/README.md) | PyTorch | [ResNet101](examples/tensorflow/image_recognition/README.md) | TensorFlow |
66-
| [SqueezeNet V1](examples/mxnet/image_recognition/README.md) | MXNet | [BERT-Base RTE](examples/pytorch/language_translation/README.md) | PyTorch | [Inception V1](examples/tensorflow/image_recognition/README.md) | TensorFlow |
67-
| [ResNet18](examples/mxnet/image_recognition/README.md) | MXNet | [BERT-Base STS-B](examples/pytorch/language_translation/README.md) | PyTorch | [Inception V2](examples/tensorflow/image_recognition/README.md) | TensorFlow |
68-
| [Inception V3](examples/mxnet/image_recognition/README.md) | MXNet | [BERT-Base CoLA](examples/pytorch/language_translation/README.md) | PyTorch | [Inception V3](examples/tensorflow/image_recognition/README.md) | TensorFlow |
69-
| [DLRM](examples/pytorch/recommendation/README.md) | PyTorch | [BERT-Base MRPC](examples/pytorch/language_translation/README.md) | PyTorch | [Inception V4](examples/tensorflow/image_recognition/README.md) | TensorFlow |
70-
| [BERT-Large MRPC](examples/pytorch/language_translation/README.md) | PyTorch | [ResNext101_32x8d](examples/pytorch/image_recognition/imagenet/README.md) | PyTorch | [Inception ResNet V2](examples/tensorflow/image_recognition/README.md)| TensorFlow |
71-
| [BERT-Large SQUAD](examples/pytorch/language_translation/README.md) | PyTorch | [ResNet50 V1.5](examples/pytorch/image_recognition/imagenet/README.md) | PyTorch | [SSD ResNet50 V1](examples/tensorflow/object_detection/README.md) | TensorFlow |
72-
| [ResNet50 V1.5 QAT](examples/pytorch/image_recognition/imagenet_qat/README.md) |PyTorch | [Inception V3](examples/pytorch/image_recognition/imagenet/README.md) | PyTorch | [Efficientnet_b0](examples/pytorch/image_recognition/efficientnet/README.md) | PyTorch |
73-
[Mobilenet_v3](examples/pytorch/image_recognition/efficientnet/README.md) | PyTorch | [Mobilenet_v2](examples/pytorch/image_recognition/imagenet/README.md) | PyTorch | [Peleenet](examples/pytorch/image_recognition/peleenet/README.md) | PyTorch |
74-
[ResNest50](examples/pytorch/image_recognition/resnest/README.md) | PyTorch | [SE_ResNext50_32x4d](examples/pytorch/image_recognition/se_resnext/README.md) | PyTorch |
67+
| TensorFlow Model | Category |
68+
|---------------------------------------------------------------------|------------|
69+
|[ResNet50 V1](examples/tensorflow/image_recognition/README.md) | Image Recognition |
70+
|[ResNet50 V1.5](examples/tensorflow/image_recognition/README.md) | Image Recognition |
71+
|[ResNet101](examples/tensorflow/image_recognition/README.md) | Image Recognition |
72+
|[Inception V1](examples/tensorflow/image_recognition/README.md) | Image Recognition |
73+
|[Inception V2](examples/tensorflow/image_recognition/README.md) | Image Recognition |
74+
|[Inception V3](examples/tensorflow/image_recognition/README.md) | Image Recognition |
75+
|[Inception V4](examples/tensorflow/image_recognition/README.md) | Image Recognition |
76+
|[ResNetV2_50](examples/tensorflow/image_recognition/README.md) | Image Recognition |
77+
|[ResNetV2_101](examples/tensorflow/image_recognition/README.md) | Image Recognition |
78+
|[ResNetV2_152](examples/tensorflow/image_recognition/README.md) | Image Recognition |
79+
|[Inception ResNet V2](examples/tensorflow/image_recognition/README.md)| Image Recognition |
80+
|[SSD ResNet50 V1](examples/tensorflow/object_detection/README.md) | Object Detection |
81+
|[Wide & Deep](examples/tensorflow/recommendation/wide_deep_large_ds/WND_README.md) | Recommendation |
82+
|[VGG16](examples/tensorflow/image_recognition/README.md) | Image Recognition |
83+
|[VGG19](examples/tensorflow/image_recognition/README.md) | Image Recognition |
84+
|[Style_transfer](examples/tensorflow/style_transfer/README.md) | Style Transfer |
85+
86+
87+
| PyTorch Model | Category |
88+
|---------------------------------------------------------------------|------------|
89+
|[BERT-Large RTE](examples/pytorch/language_translation/README.md) | Language Translation |
90+
|[BERT-Large QNLI](examples/pytorch/language_translation/README.md) | Language Translation |
91+
|[BERT-Large CoLA](examples/pytorch/language_translation/README.md) | Language Translation |
92+
|[BERT-Base SST-2](examples/pytorch/language_translation/README.md) | Language Translation |
93+
|[BERT-Base RTE](examples/pytorch/language_translation/README.md) | Language Translation |
94+
|[BERT-Base STS-B](examples/pytorch/language_translation/README.md) | Language Translation |
95+
|[BERT-Base CoLA](examples/pytorch/language_translation/README.md) | Language Translation |
96+
|[BERT-Base MRPC](examples/pytorch/language_translation/README.md) | Language Translation |
97+
|[DLRM](examples/pytorch/recommendation/README.md) | Recommendation |
98+
|[BERT-Large MRPC](examples/pytorch/language_translation/README.md) | Language Translation |
99+
|[ResNext101_32x8d](examples/pytorch/image_recognition/imagenet/README.md) | Image Recognition |
100+
|[BERT-Large SQUAD](examples/pytorch/language_translation/README.md) | Language Translation |
101+
|[ResNet50 V1.5](examples/pytorch/image_recognition/imagenet/README.md) | Image Recognition |
102+
|[ResNet18](examples/pytorch/image_recognition/imagenet/README.md) | Image Recognition |
103+
|[Inception V3](examples/pytorch/image_recognition/imagenet/README.md) | Image Recognition |
104+
|[YOLO V3](examples/pytorch/object_detection/yolo_v3/README.md) | Object Detection |
105+
|[Peleenet](examples/pytorch/image_recognition/peleenet/README.md) | Image Recognition |
106+
|[ResNest50](examples/pytorch/image_recognition/resnest/README.md) | Image Recognition |
107+
|[SE_ResNext50_32x4d](examples/pytorch/image_recognition/se_resnext/README.md) | Image Recognition |
108+
|[ResNet50 V1.5 QAT](examples/pytorch/image_recognition/imagenet_qat/README.md) | Image Recognition |
109+
|[ResNet18 QAT](examples/pytorch/image_recognition/imagenet_qat/README.md) | Image Recognition |
110+
111+
| MxNet Model | Category |
112+
|---------------------------------------------------------------------|------------|
113+
|[ResNet50 V1](examples/mxnet/image_recognition/README.md) | Image Recognition |
114+
|[MobileNet V1](examples/mxnet/image_recognition/README.md) | Image Recognition |
115+
|[MobileNet V2](examples/mxnet/image_recognition/README.md) | Image Recognition |
116+
|[SSD-ResNet50](examples/mxnet/object_detection/README.md) | Object Detection |
117+
|[SqueezeNet V1](examples/mxnet/image_recognition/README.md) | Image Recognition |
118+
|[ResNet18](examples/mxnet/image_recognition/README.md) | Image Recognition |
119+
|[Inception V3](examples/mxnet/image_recognition/README.md) | Image Recognition |
75120

76121

77122
# Known Issues

docs/introduction.md

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,38 @@ Intel® Low Precision Optimization Tool is an open source python library to help
2222

2323
The tuning config and model-specific information are controlled by user config yaml file. As for the format of yaml file, please refer to [template.yaml](../examples/template.yaml)
2424

25-
Intel® Low Precision Optimization Tool supports two usages:
25+
Intel® Low Precision Optimization Tool supports three usages:
2626

27-
a) User specifies fp32 "model", calibration dataset "q_dataloader", evaluation dataset "eval_dataloader" and accuracy metrics in tuning.metric field of the yaml config file.
27+
a) Fully yaml configuration: User specifies all the info through yaml, including dataloaders used in calibration and evaluation
28+
phases and quantization tuning settings.
29+
30+
For this usage, only model parameter is mandotory.
31+
32+
b) Partial yaml configuration: User specifies dataloaders used in calibration and evaluation phase by code.
33+
The tool provides built-in dataloaders and evaluators, user just need provide a dataset implemented __iter__ or
34+
__getitem__ methods and invoke dataloader() with dataset as input parameter before calling tune().
35+
36+
After that, User specifies fp32 "model", calibration dataset "q_dataloader" and evaluation dataset "eval_dataloader".
37+
The calibrated and quantized model is evaluated with "eval_dataloader" with evaluation metrics specified
38+
in the configuration file. The evaluation tells the tuner whether the quantized model meets
39+
the accuracy criteria. If not, the tuner starts a new calibration and tuning flow.
40+
41+
For this usage, model, q_dataloader and eval_dataloader parameters are mandotory.
42+
43+
c) Partial yaml configuration: User specifies dataloaders used in calibration phase by code.
44+
This usage is quite similar with b), just user specifies a custom "eval_func" which encapsulates
45+
the evaluation dataset by itself.
46+
The calibrated and quantized model is evaluated with "eval_func". The "eval_func" tells the
47+
tuner whether the quantized model meets the accuracy criteria. If not, the Tuner starts a new
48+
calibration and tuning flow.
49+
50+
For this usage, model, q_dataloader and eval_func parameters are mandotory
2851

29-
b) User specifies fp32 "model", calibration dataset "q_dataloader" and a custom "eval_func" which encapsulates the evaluation dataset and accuracy metrics by itself.
52+
The first usage is designed for minimal code changes when integrating with Intel® Low Precision Optimization Tool. All calibration and evaluation process is constructed by ilit upon yaml configuration.
3053

31-
The first usage is designed for seamless enablement of DL model tuning with Intel® Low Precision Optimization Tool, leveraging the pre-defined accuracy metrics supported by this tool. We expect this is the most common usage. Now it works well for most image classification models and we are improving the tool to support more.
54+
The second usage is designed for concise yaml configuration and constructing calibration and evaluation dataloaders by code. ilit provides built-in dataloaders and evaluators, user just need provide a dataset implemented __iter__ or __getitem__ methods to tuner.dataloader() function.
3255

33-
The second usage is designed for ease of tuning enablement for models with custom metric evaluation or metrics not supported by Intel® Low Precision Optimization Tool yet. Currently this usage model works for object detection and NLP networks.
56+
The third usage is designed for ease of tuning enablement for models with custom metric evaluation or metrics not supported by Intel® Low Precision Optimization Tool yet. Currently this usage model works for object detection and NLP networks.
3457

3558
2. Framework Adaptation API
3659

@@ -60,6 +83,14 @@ Bayesian optimization is a sequential design strategy for global optimization of
6083

6184
This strategy is very similar to the basic strategy. It needs to get the tensors for each Operator of raw FP32 models and the quantized model based on best model-wise tuning configuration. And then calculate the MSE (Mean Squared Error) for each operator, sort those operators according to the MSE value, finally do the op-wise fallback in this order.
6285

86+
### Random Strategy
87+
88+
This strategy is used to randomly choose tuning configuration from the tuning space.
89+
90+
### Exhaustive Strategy
91+
92+
This strategy is used to sequentially traverse all the possible tuning configurations in tuning space.
93+
6394
# Objectives
6495

6596
Intel® Low Precision Optimization Tool supports below 3 build-in objectives. All objectives are optimized and driven by accuracy metrics.

0 commit comments

Comments
 (0)