Recommended Reading Order
This section helps you choose the next reading path after you have already identified your current task, including:
-
Which path is more suitable for me to start with now.
-
Where I should stop in this round of reading.
-
When I should switch to the next path.
If you already know that your current goal is quick validation, accuracy tuning, deployment troubleshooting, or platform selection, you can directly start from the corresponding path in this section.
How to Use This Section
It is recommended that you first choose one main path based on your current task, rather than trying to read every topic at the beginning.
For each path, it is better to stop at a stage milestone first, and then decide what to read next based on the result:
-
Quick Validation Path: in most cases, it is enough to read until you complete one round of basic
quantized.bc / hbmvalidation. -
Accuracy Tuning and Quantization Training Path: in most cases, it is enough to read until you can tell which stage the problem is mainly concentrated in.
-
Export, Fixed-Point Conversion, and Deployment Troubleshooting Path: in most cases, it is enough to read until you can tell which stage the issue is more likely to come from.
If you are currently deciding both the platform strategy and the model path, it is better to read the following two sections first before entering a specific path:
-
Platform Differences: first confirm the differences in quantization strategy, output precision, input and output handling, and deployment capability on the current platform.
-
Overview: first determine whether it is more suitable to start from the
ONNXpath or thePyTorchpath.
Quick Validation Path
The focus of this path is to run through the main workflow of model quantization, compilation, and basic validation as quickly as possible.
Already Have an ONNX Model
If you already have an ONNX model, we recommend starting with the PTQ workflow. The suggested reading order is as follows:
-
Platform Differences: first understand the more suitable quantization starting point and deployment validation focus for the current platform.
-
Overview: first understand where the
ONNXpath fits in the overall toolchain. -
ONNX Model Quick Start: first run through a minimal closed loop and build an intuitive understanding of the overall flow and key artifacts.
-
ONNX Model Quantization Principle and Process: then return to the main process page and systematically understand the standard
PTQworkflow. -
PTQ basic workflow pages: continue reading Prepare Floating-point Model, Model Checking, Data Preparation, Model Quantization and Compilation, Model Performance Evaluation, and Model Accuracy Evaluation as needed, so that you can fill in the details of model preparation, model checking, data preparation, quantization and compilation, as well as accuracy and performance evaluation.
-
ONNX Model Deployment Consistency Analysis: if you have already entered the result comparison stage, continue with this section to understand staged artifacts and consistency validation methods.
-
Board Evaluation or Model Inference Application Development Guide: after completing
quantized.bc / hbmvalidation, continue to board-side validation and deployment adaptation.
At this stage, it is usually enough to stop after you have obtained quantized.bc / hbm and completed one round of basic accuracy or performance validation.
If the accuracy still does not meet your requirement at this point, it is recommended that you first read Model Accuracy Tuning and try the tuning methods.
Already Have a PyTorch Model and Training Code
If you already have a PyTorch model and training code, it is recommended that you start from the minimal closed loop first, confirm that the Prepare, Calibration, export, fixed-point conversion, and compilation flow can run through smoothly, and read in the following order:
-
Platform Differences: first determine the more suitable starting precision configuration and deployment validation approach for the current platform.
-
Overview: first understand where the
PyTorchpath sits in the overall workflow. -
PyTorch Model Quick Start: first run through one minimal executable path.
-
QAT Conversion Introduction: then understand what scenarios this path is suitable for and what problems it is intended to solve.
-
PyTorch Model Quantization Basic Process: build a complete understanding of the main flow from floating-point model adaptation to final validation.
-
Build QConfig: first determine the quantization configuration template that fits the current platform and model.
-
Prepare Description: confirm whether graph capture, operator replacement, and inspection artifacts are generally as expected.
-
Model Calibration: focus on understanding where
Calibrationsits in the flow and how it relates to later export and deployment validation. -
Convert to Fixed-Point Model: continue to understand the relation among export, convert, and
quantized.bc. -
Model Compilation and Performance Evaluation: finally continue to compile, performance evaluation, and pre-deployment validation.
The milestone of this path is to complete one minimal closed loop of Prepare -> Calibration -> Export / Convert -> Compile -> quantized.bc / hbm.
If the accuracy after Calibration already meets your requirement, you can continue directly to deployment validation.
If the accuracy after Calibration still does not meet your requirement, it is usually better to continue with the accuracy tuning path below while carrying a clearer question.
Accuracy Tuning Path
If your current goal is no longer just to run through the flow, but to further improve quantization accuracy, it is better to choose the next reading path based on the model source.
The ONNX path mainly covers accuracy tuning within PTQ, while the PyTorch path is more suitable when you need deeper Calibration analysis, mixed precision configuration, or QAT training.
ONNX Path
If you have already completed the PTQ basic process but the result is still below expectation in the accuracy evaluation stage, it is recommended that you continue reading in the following order:
-
Platform Differences: first confirm the differences in quantization strategy and computation precision on the current platform, so that you do not start tuning from an unsuitable platform strategy.
-
ONNX Model Quantization Principle and Process: review the staged artifacts and full
PTQworkflow before narrowing the issue. -
Model Accuracy Evaluation: first confirm whether the current accuracy drop is stable and reproducible, and at which evaluation stage it becomes visible.
-
Model Accuracy Tuning: continue narrowing the issue through calibration method selection, quantization parameter search, independent quantization, and precision configuration.
-
ONNX Model Deployment Consistency Analysis: if you suspect that the issue is not only about quantization loss but also about inconsistency between staged artifacts, continue here.
-
ONNX Model Quantization FAQ and Common Failure Resolutions: if explicit errors, configuration problems, or runtime abnormalities have already appeared, continue from these sections.
If the requirement still cannot be met after PTQ tuning, then continue to evaluate whether you need to move on to quantization aware training.
PyTorch Path
If you are already on the Prepare / Calibration / QAT main path, or have already determined that you need mixed precision and QAT to keep improving the result, it is recommended that you continue reading in the following order:
-
Platform Differences: first determine which kind of precision configuration is a better starting point for the current platform.
-
QAT Conversion Introduction: clarify what this path is intended to solve and how it differs from
PTQ. -
PyTorch Model Quantization Basic Process: first read through the stage relationships and staged artifacts in the full workflow.
-
Build Floating-point Model: check whether the model structure itself is quantization-friendly.
-
Build QConfig: determine the more suitable quantization configuration template for the current platform and model.
-
Prepare Description: confirm whether graph capture, operator replacement, and inspection artifacts are generally as expected.
-
Model Calibration: first determine whether the issue has already appeared at the
Calibrationstage. -
Quantized Awareness Training: if
Calibrationstill cannot meet the requirement, continue into theQATstage. -
Precision Tuning Guide: continue narrowing the scope through stepwise quantization, histogram analysis, sensitivity analysis, and mixed precision configuration.
-
Deployment Consistency Analysis: if you have already entered the export and fixed-point conversion stages, continue here to confirm whether the issue has shifted to consistency.
-
Debug Artifacts Guide: if you have already started looking at
model_check_result.txt,fx_graph.txt,qconfig_dtypes.pt, or per-layer comparison outputs, continue with this section to better judge the stage where the issue belongs.
The focus of this path is to decide whether the issue is still in model structure, quantization configuration, or Calibration, or whether it has already moved into the QAT and mixed precision stage.
In most cases, once you can clearly tell which stage the accuracy issue is mainly concentrated in, this round of reading has already achieved its purpose.
Consistency Analysis and Deployment Troubleshooting Path
If the current issue is no longer “how to keep tuning the accuracy,” but “why the results become inconsistent across stages” or “why the fixed-point or board-side result becomes abnormal,” it is better to enter the corresponding consistency analysis and deployment troubleshooting sections based on the model path.
ONNX Path
If you are currently using the ONNX model quantization path, it is recommended that you read the following sections in order:
-
ONNX Model Deployment Consistency Analysis: first understand the relation among
xxx_original_float_model.onnx,xxx_optimized_float_model.onnx,xxx_calibrated_model.onnx,xxx_ptq_model.onnx, andxxx_quantized_model.bc. -
Board Evaluation or Model Inference Application Development Guide: if the
bcresult is already generally normal but the board-side result is still abnormal, continue with board-side validation and application-side troubleshooting. -
ONNX Model Quantization FAQ: if the issue looks more like configuration, model support, or tool usage, start here to narrow it down.
-
Common Failure Resolutions: if explicit errors, abnormal logs, or runtime failures have already appeared, continue here.
Along this path, it is usually better to judge the following situations first:
-
If the issue is already obvious at the
xxx_calibrated_model.onnxorxxx_ptq_model.onnxstage, the focus is usually not deployment. In that case, it is better to go back to Model Accuracy Evaluation and Model Accuracy Tuning. -
If
xxx_quantized_model.bcis abnormal while the previousonnx-stage results are still generally normal, focus first on the conversion and consistency analysis stage. -
If
xxx_quantized_model.bcis generally normal but the board-side result is abnormal, focus first on board evaluation, pre- and post-processing, and deployment adaptation.
PyTorch Path
If you are using the PyTorch model quantization path, it is recommended that you read the following sections in order:
-
Convert to Fixed-Point Model: first understand the relation among
qat.pt / qat model,qat.export.pt,qat.bc, andquantized.bc. -
Deployment Consistency Analysis: then understand the troubleshooting order across export, convert, and compile / deployment.
-
Debug Artifacts Guide: if you are already checking
model_check_result.txt,fx_graph.txt,qconfig_dtypes.pt, orcompare_per_layer_out.txt, continue with this section together. -
Model Compilation and Performance Evaluation: if the issue has already entered the compile stage,
quantized.bcvalidation, orhbmvalidation, continue here. -
Board Evaluation or Model Inference Application Development Guide: if
quantized.bcis already generally normal buthbmor board-side results are still abnormal, continue with board-side validation and deployment adaptation. -
PyTorch Model Quantization FAQ and Common Failure Resolutions: if explicit errors, configuration failures, or training / export abnormalities have already appeared, continue here together with the earlier sections.
Along this path, it is usually better to judge the following situations first:
-
If
qat.pt / qat modelis already abnormal at theCalibrationorQATstage, the focus is usually not export, convert, or compile. In that case, go back first to Model Calibration, Quantized Awareness Training, and Precision Tuning Guide. -
If
qat.pt / qat modelis normal butqat.bcis abnormal, focus first on the export stage. -
If
qat.bcis normal butquantized.bcis abnormal, focus first on the convert stage. -
If
quantized.bcis normal buthbmor board-side results are abnormal, focus first on the compile, board evaluation, and deployment adaptation stages.
In most cases, once you can stably tell which stage the issue is more likely to belong to, this round of reading has already produced clear value.
Entry by Role
If you prefer to decide the starting point by your current role, you may also use the simplified entries below.
Beginners
It is recommended that you first read Platform Differences and Overview to build an overall understanding. Then choose either ONNX Model Quick Start or PyTorch Model Quick Start based on the model you currently have, and then continue to the corresponding basic process sections.
Algorithm Engineers
It is recommended that you enter from the PyTorch model quantization main path first, and prioritize QAT Conversion Introduction, PyTorch Model Quantization Basic Process, Build Floating-point Model, Build QConfig, Prepare Description, Model Calibration, Quantized Awareness Training, and Precision Tuning Guide.
Deployment Engineers
It is recommended that you enter from the export, fixed-point conversion, and deployment validation path first, and prioritize the corresponding basic process sections, Convert to Fixed-Point Model, Model Compilation and Performance Evaluation, PyTorch Model Deployment Consistency Analysis or ONNX Model Deployment Consistency Analysis, Board Evaluation, and Model Inference Application Development Guide.
