Melange
API ReferenceiOS

Enums and Constants

iOS enum and support types for ZeticMLange.

This page reflects ZeticMLange iOS 1.9.0.

General Model Types

TypeValues
ModelMode.RUN_AUTO, .RUN_FP32, .RUN_QUANTIZED, .RUN_SPEED, .RUN_ACCURACY
QuantType.FP32, .FP16, .INT
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

TypeValues
LLMModelMode.RUN_AUTO, .RUN_SPEED, .RUN_ACCURACY
LLMTarget.LLAMA_CPP, .MLLM
LLMQuantTypeGGUF quantization variants such as .GGUF_QUANT_F16, .GGUF_QUANT_Q4_K_M, and .GGUF_QUANT_Q8_0
LLMKVCacheCleanupPolicy.CLEAN_UP_ON_FULL, .DO_NOT_CLEAN_UP
KVStateStatusStatus values returned by KV state persistence operations.
KVStateErrorError thrown when a KV state operation fails.

LLMInitOption

public struct LLMInitOption {
  public var kvCacheCleanupPolicy: LLMKVCacheCleanupPolicy
  public var nCtx: Int
  public var runConfigId: Int64
}
FieldDefaultDescription
kvCacheCleanupPolicy.CLEAN_UP_ON_FULLIn-memory KV-cache behavior when context storage is full.
nCtx2048Requested context size. The runtime may normalize it.
runConfigId0Run configuration id used by compatible LFM-VL packages.

Result Types

TypePurpose
LLMRunResultResult from starting LLM generation. Includes status and prompt token count.
LLMNextTokenResultToken result returned by waitForNextToken().
AllowedRunConfigDescribes available local LFM-VL run configurations. Not exposed in website examples.

On this page