API ReferenceFlutter
Enums and Constants
Flutter enum and support types for zetic_mlange.
This page reflects zetic_mlange 1.9.1.
General Model Types
| Type | Values |
|---|---|
ModelMode | runAuto, runFp32, runQuantized, runSpeed, runAccuracy |
QuantType | fp32, fp16, int |
APType | cpu, gpu, npu, na |
CacheHandlingPolicy | removeOverlapping, keepExisting |
Target contains backend identifiers used by selected general-model artifacts. Most Flutter apps use ModelMode and optional APType filters.
LLM Types
| Type | Values |
|---|---|
LLMModelMode | runAuto, runSpeed, runAccuracy |
LLMTarget | llamaCpp, litertLm, mllm |
LLMQuantType | GGUF quantization variants such as ggufQuantF16, ggufQuantQ4KM, and ggufQuantQ80 |
LLMKVCacheCleanupPolicy | cleanUpOnFull, doNotCleanUp |
LLMInitOption
final class LLMInitOption {
const LLMInitOption({
this.kvCacheCleanupPolicy = LLMKVCacheCleanupPolicy.cleanUpOnFull,
this.nCtx = 2048,
});
}| Field | Default | Description |
|---|---|---|
kvCacheCleanupPolicy | cleanUpOnFull | In-memory KV-cache behavior when context storage is full. |
nCtx | 2048 | Requested context size. The runtime may normalize it. |
Result and Error Types
| Type | Purpose |
|---|---|
LLMRunResult | Result from starting LLM generation. |
LLMNextTokenResult | Token result returned by waitForNextToken(). |
MlangeException | Dart exception for validation and native SDK failures. |
MlangeProgressCallback | Download progress callback from 0.0 to 1.0. |