API ReferenceiOS
ZeticMLangeHFModel
API reference for loading Hugging Face models on iOS.
This page reflects ZeticMLange iOS 1.9.0.
ZeticMLangeHFModel loads compatible models directly from Hugging Face repositories.
Import
import ZeticMLangeInitializer
public init(
_ repoId: String,
userAccessToken: String? = nil,
index: Int = 0,
cacheHandlingPolicy: ModelCacheHandlingPolicy = .REMOVE_OVERLAPPING
) async throws| Parameter | Type | Default | Description |
|---|---|---|---|
repoId | String | - | Hugging Face repository ID. |
userAccessToken | String? | nil | Optional Hugging Face access token. |
index | Int | 0 | Model index when a repository contains multiple entries. |
cacheHandlingPolicy | ModelCacheHandlingPolicy | .REMOVE_OVERLAPPING | Managed artifact cache cleanup policy. |
let model = try await ZeticMLangeHFModel("zetic-ai/yolov11n")run(inputs:)
public func run(inputs: [Tensor] = []) throws -> [Tensor]Runs inference and returns output tensors.
Lifecycle
public private(set) var isClosed: Bool
public func close()Call close() when the model is no longer needed.