Melange
API ReferenceFlutter

Enums and Constants

Flutter enum and support types for zetic_mlange.

This page reflects zetic_mlange 1.9.1.

General Model Types

TypeValues
ModelModerunAuto, runFp32, runQuantized, runSpeed, runAccuracy
QuantTypefp32, fp16, int
APTypecpu, gpu, npu, na
CacheHandlingPolicyremoveOverlapping, keepExisting

Target contains backend identifiers used by selected general-model artifacts. Most Flutter apps use ModelMode and optional APType filters.

LLM Types

TypeValues
LLMModelModerunAuto, runSpeed, runAccuracy
LLMTargetllamaCpp, litertLm, mllm
LLMQuantTypeGGUF quantization variants such as ggufQuantF16, ggufQuantQ4KM, and ggufQuantQ80
LLMKVCacheCleanupPolicycleanUpOnFull, doNotCleanUp

LLMInitOption

final class LLMInitOption {
  const LLMInitOption({
    this.kvCacheCleanupPolicy = LLMKVCacheCleanupPolicy.cleanUpOnFull,
    this.nCtx = 2048,
  });
}
FieldDefaultDescription
kvCacheCleanupPolicycleanUpOnFullIn-memory KV-cache behavior when context storage is full.
nCtx2048Requested context size. The runtime may normalize it.

Result and Error Types

TypePurpose
LLMRunResultResult from starting LLM generation.
LLMNextTokenResultToken result returned by waitForNextToken().
MlangeExceptionDart exception for validation and native SDK failures.
MlangeProgressCallbackDownload progress callback from 0.0 to 1.0.

On this page