Skip to main content

Features

The Arm AI Model Optimizer command-line interface (CLI) uses a modular optimization pipeline. Each module handles a specific stage of the workflow, including model extraction, graph optimization, quantization, profiling, and evaluation.

Pipeline overview​

The pipeline processes models through the Graph Extractor (GE), Graph Optimizer (GO), and Graph Quantizer (GQ). For Hugging Face large language models (LLMs), the Advanced Quantizer (AQ) can optionally run first. You can use the measurement and inspection modules at individual stages or after optimization.

Module summary​

ModuleRoleUse case
Advanced QuantizerQuantizes model weights and activations at the PyTorch eager levelActivation-aware Weight Quantization (AWQ), AutoRound, Round-To-Nearest (RTN), SmoothQuant, GPTQ
Graph ExtractorConverts models to PyTorch 2 (PT2) format and traces the model structure during model registrationModel input, Bring Your Own Model (BYOM) registration
Graph OptimizerApplies pattern-based graph transformations to improve hardware efficiencyAll models
Graph QuantizerReduces precision at the intermediate representation (NPIR) level using calibration dataAll models
EvaluatorCompares the accuracy of model checkpointsQuality validation
ProfilerMeasures latency and memory use for an on-device run or a Machine Learning Inference Advisor (MLIA) static estimatePerformance measurement
VisualizerProvides browser-based graph inspection and checkpoint comparisonModel inspection, debugging
BYOM and BYOD formatsDefines the supported formats for bringing your own models and datasets into Arm AI Model OptimizerBYOM, Bring Your Own Data (BYOD)

Supported pipelines​

StepsPipeline
--steps go,gqGraph Optimize → Graph Quantize
--steps aq,go,gqAdvanced Quantize → Graph Optimize → Graph Quantize