Arm AI Model Optimizer command-line client and Python API for ML model optimization
pip install arm-ai-model-optimizer Copy PIP instructions
This package installs the np command, a client that submits model optimization work to the Arm AI Model Optimizer service and displays the results. Model optimization is performed by the service. Profiling jobs can execute on target devices.
pip install arm-ai-model-optimizer If you received a wheel file, install that file instead. Replace the quoted placeholder below with the actual path to the supplied wheel:
python -m pip install " " Getting started 1. Sign in Issue a credential from the Arm AI Portal, then register it once on this machine:
np auth login np auth status The credential carries the address of the authentication server, so no further configuration is needed. np auth status reports the state of the stored token.
np health ready 3. Run an optimization np workspace init # create a workspace with a sample project np models ls # browse registered models np validate # check run.yaml against the backend np run # submit the run np status # follow progress np report # inspect the results Run np --help, or np --help, for the full reference.
Some commands may be unavailable depending on the features enabled for your deployment.
When using np profile, the target device connects to a broker to receive work and to S3 storage to retrieve models. This is a networked workflow.
The separately supplied executor_runner profiling binaries can also be invoked directly on a target device without a server connection or authentication. Their standalone, local-processing description applies to direct execution of those binaries, not to the full np profile workflow. See the README supplied with the profiling binaries for supported models, devices and direct-execution instructions.
The same package provides a Python API. Every command above has a counterpart, with the same behaviour: where the CLI exits non-zero, the call raises.
The example below refers to registered model, device and dataset identifiers. Replace these identifiers with resources available in your deployment.
from netspresso.api import NetsPresso client = NetsPresso() # same environment and stored credential as the CLI project = client.projects.create(name="resnet50-rpi5", model="resnet50_pt2_pytorch_static_fp32", device="raspberry_pi_5_16gb", runtime="executorch", backend="xnnpack", calibration_dataset="imagenet1k_calib_seed42_n1000", # required for quantization evaluation_dataset="imagenet1k_eval_seed42_n5000") experiment = client.experiments.create(project_path=project.project_path, steps="go,gq") client.run(experiment_path=experiment.experiment_path, wait=True) report = client.report(experiment_path=experiment.experiment_path) See the Python API reference in the documentation below for every call.
This software is licensed under the End User License Agreement for Arm AI Model Optimizer CLI, SDK and Related Software, provided in Arm AI Model Optimizer CLI SDK - EULA.txt. Read it before you install or use the software.
Third-party components are subject to their respective license terms, as identified in the accompanying third-party notices.
The software bill of materials (SBOM) is provided in CycloneDX and SPDX formats in sboms/.
In the source distribution, these paths are relative to the top level. In an installed package, the EULA and the licenses/ directory are under arm_ai_model_optimizer- .dist-info/licenses/, and the SBOM files are under arm_ai_model_optimizer- .dist-info/sboms/.
LicenseRef-Proprietary View SPDX License List
machine-learning ml model-optimization model-optimisation model-deployment inference profiling cli sdk
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.




