Skip to main content

Model Compiler API Reference

The Model Compiler exposes the afe Python package, which the SiMa.ai Neat toolchain uses to import, quantize, simulate, and compile models into the MPK format consumed by the runtime. The pages below are auto-generated from the afe.apis source via griffe; each module page lists the classes, functions, and constants it exports along with their signatures.

Compilation

Drive a compilation job end-to-end, from a calibrated network to MPK artifacts.

  • afe.apis.compilation_job1 class, 1 function The API for controlling a compilation job. This API is intended for use in a user-defined module that is passed to the command-line interface.
  • afe.apis.compilation_job_base3 constants Shared data type definitions related to compilation jobs.
  • afe.apis.compile1 function Load a YAML file and use the JSON and npz file that are referred in the YAML to load the pre-calibrated AwesomeNet, quantize it, and generate MLC files.

Model Lifecycle

Load, save, execute, and quantize models in AFE's internal representation.

Versioned Public APIs

Stable and pre-release surfaces for importing, quantizing, executing, and simulating models. New integrations should target the release API and migrate forward; the pre-release API exposes experimental capabilities ahead of stabilization.

  • afe.apis.release_v13 functions This is the development API for AFE. It supports importing models, loading and storing AFE's internal format, quantizing, executing, and simulating.
  • afe.apis.prerelease_v113 functions This is the pre-release API for AFE. It supports importing models, loading and storing AFE's internal format, quantizing, executing, and simulating.

Execution & Analysis

Simulate compiled models and analyze tensor statistics.

  • afe.apis.simulate1 function Load a YAML file and use the MLC files referred in the YAML to generate the trace files.
  • afe.apis.statistic6 functions, 1 constant Analysis of statistics on tensors.

Transforms

Pre- and post-processing tensor transformations that can be attached to a model's inputs or outputs.

  • afe.apis.transform1 class, 21 functions Tensor transformations that can be applied to a model's input or output.

Types & Error Handling

Shared type definitions, error-handling controls, and internal exception sanitization used across the AFE APIs.