API ReferenceiOS
Enums and Constants
iOS enum and support types for ZeticMLange.
This page describes the API planned for ZeticMLange iOS 1.13.0.
General Model Types
| Type | Values |
|---|---|
ModelMode | .RUN_AUTO, .RUN_FP32, .RUN_QUANTIZED, .RUN_SPEED, .RUN_ACCURACY |
APType | .CPU, .GPU, .NPU, .NA |
ModelCacheHandlingPolicy | .REMOVE_OVERLAPPING, .KEEP_EXISTING |
Target contains backend identifiers used by selected general-model artifacts. Most apps use ModelMode and let backend selection choose the target.
LLM Types
| Type | Values |
|---|---|
LLMModelMode | .RUN_AUTO, .RUN_SPEED, .RUN_ACCURACY |
LLMKVCacheCleanupPolicy | .CLEAN_UP_ON_FULL, .DO_NOT_CLEAN_UP |
KVStateStatus | Status carried by KVStateError when a KV state operation fails. |
KVStateError | Error thrown when a KV state operation fails. |
LLMInitOption
public struct LLMInitOption {
public let kvCacheCleanupPolicy: LLMKVCacheCleanupPolicy
public let nCtx: Int
}| Field | Default | Description |
|---|---|---|
kvCacheCleanupPolicy | .CLEAN_UP_ON_FULL | In-memory KV-cache behavior when context storage is full. |
nCtx | 2048 | Requested context size. This is the initializer's default; the selected model and backend determine the supported and effective context size. |
The runtime configuration is selected for the device and is not a public LLMInitOption field.
Result Types
| Type | Purpose |
|---|---|
LLMNextTokenResult | Token result returned by waitForNextToken(). |
Background Download Types
| Type | Values or purpose |
|---|---|
BackgroundDownloadHandle | Durable job identifier returned by downloadInBackground(...); retain it to query or stop the job. |
BackgroundDownloadState | .queued, .resolving, .downloading, .verifying, .installed, .failed, .stopped |
BackgroundDownloadStatus | Latest job snapshot: handle, state, downloaded bytes, optional total bytes, and optional error message. |
BackgroundDownloadStopResult | .stopped, .alreadyFinished, .notFound |
ModelRemovalResult | Removal outcome: removed, isInUse, deletedFiles, and deletedBytes. |
.installed, .failed, and .stopped are terminal states. If ModelRemovalResult.isInUse is true, close active model instances before retrying removal.