AIMET optimization, analysis, and deployment
Use this sub-skill when the user asks why accuracy dropped after quantization, how to use QuantAnalyzer or visualization outputs, how to choose mixed precision, how to use compression, or how to validate/export artifacts for target inference.
Read/run first
- Read API overview for compression, ONNX analysis, SeqMSE, AdaRound, and related signatures.
- Read workflows for the accuracy-debugging, compression, GenAILab, and deployment loops.
- Read backend compatibility to separate CPU-valid analysis from CUDA/provider, GenAILab, cluster, or target-runtime requirements.
- Read troubleshooting for accuracy, visualization, compression, GenAILab, credential, cluster, and export-artifact symptoms.
- Run inspect_export.py on an export directory before handing artifacts to target tooling.
- Route Qualcomm AI Hub, QAIRT, QNN, HTP, DLC, and SDK-command tasks to qualcomm-sdk-deployment.
Core workflow
- Establish baselines. Compare FP32, high-bit-width, and target-bit-width QuantSim behavior before choosing remedies.
- Separate weight and activation sensitivity. Raise one side's bit-width while holding the other side at target precision.
- Apply the right PTQ remedy. Use BatchNorm folding/Cross-Layer Equalization/per-channel quantization/AdaRound/SeqMSE for weight issues; use range-setting, higher activation precision, or mixed precision for activation issues.
- Analyze sensitive layers. Use QuantAnalyzer, per-layer sensitivity, histograms, and layer-output comparisons to identify the quantizer or op causing the drop.
- Use mixed precision deliberately. Lite/manual/automatic mixed precision should be driven by measured sensitivity and target latency/accuracy constraints.
- Compress when the target requires lower MACs or memory. Select compression ratios, apply Weight SVD/Spatial SVD/Channel Pruning, evaluate, then fine-tune if required.
- Validate export artifacts. Confirm the ONNX model and AIMET encodings match before QNN/QAIRT/AI Hub or other target handoff.
Deployment boundaries
AIMET produces simulation/export artifacts. It does not prove target-device correctness by itself. For Qualcomm AI Runtime, QNN, QAIRT, HTP, DLC, or AI Hub tasks, first validate the AIMET export pair and then use qualcomm-sdk-deployment for the local SDK or AI Hub workflow.
Data and runtime boundaries
- Compression and accuracy examples often assume ImageNet-style evaluators; replace them with a tiny evaluator while developing.
- Visualization needs compatible Bokeh/HoloViews/HVPlot dependencies.
- LLM/VLM GenAILab recipe benchmarks are now covered by genai-lab, but they still require explicit model/dataset/credential/budget approval before execution.
- On-target execution requires external SDKs/devices or AI Hub credentials; local export validation is not target proof.
Expected answer shape
When answering optimization/deployment tasks, include:
- the baseline comparison being made;
- which quantizers/layers are being isolated;
- the selected AIMET remedy and why it matches weight/activation sensitivity;
- the evaluator/calibration data requirements;
- compression or mixed-precision constraints;
- exported artifacts and validation steps;
- explicit backend or target-runtime assumptions.
1---2name: optimization-analysis-deployment3description: "Use AIMET analysis, mixed precision, compression, debugging,4 export validation, and deployment artifact workflows after core quantization5 setup."6metadata:7 source: https://skillmd.com/skills/vectorspacelab/optimization-analysis-deployment8 disco-role: operating9disable-model-invocation: true10license: BSD 3-Clause11---1213# AIMET optimization, analysis, and deployment1415Use this sub-skill when the user asks why accuracy dropped after quantization, how to use QuantAnalyzer or visualization outputs, how to choose mixed precision, how to use compression, or how to validate/export artifacts for target inference.1617## Read/run first1819- Read [API overview](../../references/api-overview.md) for compression, ONNX analysis, SeqMSE, AdaRound, and related signatures.20- Read [workflows](../../references/workflows.md) for the accuracy-debugging, compression, GenAILab, and deployment loops.21- Read [backend compatibility](../../references/backend-compatibility.md) to separate CPU-valid analysis from CUDA/provider, GenAILab, cluster, or target-runtime requirements.22- Read [troubleshooting](../../references/troubleshooting.md) for accuracy, visualization, compression, GenAILab, credential, cluster, and export-artifact symptoms.23- Run [inspect_export.py](../../scripts/inspect_export.py) on an export directory before handing artifacts to target tooling.24- Route Qualcomm AI Hub, QAIRT, QNN, HTP, DLC, and SDK-command tasks to [qualcomm-sdk-deployment](../qualcomm-sdk-deployment/SKILL.md).2526## Core workflow27281. **Establish baselines.** Compare FP32, high-bit-width, and target-bit-width QuantSim behavior before choosing remedies.292. **Separate weight and activation sensitivity.** Raise one side's bit-width while holding the other side at target precision.303. **Apply the right PTQ remedy.** Use BatchNorm folding/Cross-Layer Equalization/per-channel quantization/AdaRound/SeqMSE for weight issues; use range-setting, higher activation precision, or mixed precision for activation issues.314. **Analyze sensitive layers.** Use QuantAnalyzer, per-layer sensitivity, histograms, and layer-output comparisons to identify the quantizer or op causing the drop.325. **Use mixed precision deliberately.** Lite/manual/automatic mixed precision should be driven by measured sensitivity and target latency/accuracy constraints.336. **Compress when the target requires lower MACs or memory.** Select compression ratios, apply Weight SVD/Spatial SVD/Channel Pruning, evaluate, then fine-tune if required.347. **Validate export artifacts.** Confirm the ONNX model and AIMET encodings match before QNN/QAIRT/AI Hub or other target handoff.3536## Deployment boundaries3738AIMET produces simulation/export artifacts. It does not prove target-device correctness by itself. For Qualcomm AI Runtime, QNN, QAIRT, HTP, DLC, or AI Hub tasks, first validate the AIMET export pair and then use [qualcomm-sdk-deployment](../qualcomm-sdk-deployment/SKILL.md) for the local SDK or AI Hub workflow.3940## Data and runtime boundaries4142- Compression and accuracy examples often assume ImageNet-style evaluators; replace them with a tiny evaluator while developing.43- Visualization needs compatible Bokeh/HoloViews/HVPlot dependencies.44- LLM/VLM GenAILab recipe benchmarks are now covered by [genai-lab](../genai-lab/SKILL.md), but they still require explicit model/dataset/credential/budget approval before execution.45- On-target execution requires external SDKs/devices or AI Hub credentials; local export validation is not target proof.4647## Expected answer shape4849When answering optimization/deployment tasks, include:5051- the baseline comparison being made;52- which quantizers/layers are being isolated;53- the selected AIMET remedy and why it matches weight/activation sensitivity;54- the evaluator/calibration data requirements;55- compression or mixed-precision constraints;56- exported artifacts and validation steps;57- explicit backend or target-runtime assumptions.