AIModel
A specialized model for running inference on a device.
Declaration
struct AIModelMentioned in
Overview
An AIModel represents a specialized .aimodel asset, optimized for the current device’s hardware. You create one by loading the asset from disk:
let model = try await AIModel(contentsOf: modelURL)Use functionDescriptor(for:) to inspect a function’s inputs and outputs, then load an InferenceFunction to run inference.