Repository navigation
v0.12.0
-
Pair this release with Apple companions
llamadart_llama_cpp_flutter
0.0.22,llamadart_litert_lm_flutter0.0.14and
llamadart_stable_diffusion_flutter0.0.3, which link native runtimes
v0.6.0-2,v0.18.0andv0.2.0-3, respectively. -
Behavior change: when the app, or any member of its pub workspace,
depends on llamadart together withflutter_edge_ai_llamaor
flutter_edge_ai_litertlm, the native build hook bundles llama.cpp only
unlessllamadart_native_runtimesnameslitert_lm, and fails the build
whenlitert_lmis named next toflutter_edge_ai_litertlm, which ships the
same libraries (Alongside Flutter Edge AI). -
On an iOS simulator,
GpuBackend.autonow runs llama.cpp on the CPU, because Metal returns incorrect output there (#950). An explicitGpuBackend.metalorComputeDevice.gpustill uses Metal and logs a warning; iOS devices and macOS are unchanged. -
Android validation builds can retain bounded, identity-checked reports in app-private storage.
-
Clarify that native KV-state restoration does not guarantee identical next-token scores or continuation.
-
Portable validation launchers can use captured native logs for required GPU qualification.
-
Adopt native runtime
v0.6.0-2and image runtimev0.2.0-3for cooperative application shutdown. -
Shut down the Linux chat app’s Flutter engines before process exit, including active model work.
-
Wait for llama.cpp and image-generation workers to exit before disposal completes, including concurrent disposal calls.
-
Exclude Android Adreno 750 driver
2150604839from llama.cpp Vulkan loads: automatic selection falls back to CPU with a warning, and an explicit GPU request throws instead of crashing or producing incorrect text. -
Update the default LiteRT-LM runtime to
leehack/litert-lm-native@v0.18.0(upstream LiteRT-LMv0.18.0). On the
macOS GPU backend the program cache of Qwen3 0.6B and Gemma 4 E2B no longer
grows on every engine create; Qwen3.5 0.8B's still does
(#552), and on the GPU
backend that bundle can still return the prompt instead of an answer on
later requests to one engine, as in 0.11
(#672). The Windows
bundle addswebgpu_dawn.dll, which the GPU accelerator now loads. -
Behavior change: with LiteRT-LM
v0.18.0, aModelParams.chatTemplate
on a Qwen 3.litertlmtext bundle receives each message'scontentas a
list of{"type": "text", "text": ...}parts instead of a string. A
template that concatenatescontentas a string fails the generation, and
one that interpolates it renders the list into the prompt; read both shapes
(Chat templates).
The built-in templates are unaffected. -
Qwen3 0.6B on the LiteRT-LM GPU of an Adreno 750 (Galaxy S24): with
v0.18.0GPU engine creation fails there, wherev0.17.0-8generated wrong
text. The first use throwsLlamaUnsupportedExceptionunder
ComputeDevice.gpuandLlamaModelExceptionunderauto. Load that model
withComputeDevice.cpu, which works on the device; Gemma 4 E2B runs on
that GPU (#553). -
Behavior change: a LiteRT-LM engine the runtime cannot create under
ComputeDevice.autoorComputeDevice.cpunow throwsLlamaModelException
on first use.LlamaEngine.create,generateandcompletethrew
LlamaInferenceExceptionthere, so acatchof that type no longer sees
this failure;ChatSession,tokenize,detokenize,getTokenCountand
chatTemplatewith a token count threw aStateError. Withv0.18.0that
includes aliteRtLmCacheDirthe runtime cannot write, on the CPU backend
too. -
Fix a LiteRT-LM bundle named without
.litertlmfailing engine creation
when the process cannot write the bundle's directory andliteRtLmCacheDir
is unset, as on Linux: it now runs without runtime caches
(#973). -
LiteRT-LM release sync accepts runtimes built on upstream
v0.17.1and
v0.18.0, and names the upstream version when its prebuilt-override table
is behind the runtime owner's
(#586). -
Move the documented Web LiteRT-LM default from
@litert-lm/core@0.15.0to
@litert-lm/core@0.18.0. An app still chooses the module through
window.__llamadartLiteRtLmModuleUrl; the chat app'sweb/index.htmland
the docs now name0.18.0. -
Adopt
leehack/stable-diffusion-native@v0.2.0-3for the opt-in
stable_diffusionimage runtime. -
Check the memory of Vulkan GPUs before loading an image model
(stable-diffusion-native#9).
On LinuxImageGenerationEngine.loadrefuses, withLlamaModelException,
only a model that does not fit the discrete GPUs plus system memory. A
model larger than the memory of the GPU that computes still loads, with
one warning, and runs slower; on Windows it is warned about and never
refused. Not validated on a physical Vulkan GPU yet;
ImageModelParams(checkMemory: false)skips the check and the warning. -
Quote the errors stable-diffusion.cpp logged in the
LlamaModelException
of an image model it cannot load, with files named by role
(stable-diffusion-native#3). -
Send the image runtime's messages to the
LlamaLogging.configurehandler
at the configured levels, after each load and generation. The runtime no
longer prints ggml's device messages to stderr: at the default level
noneit logs nothing. -
Update the default llama.cpp runtime to
leehack/llamadart-native@v0.6.0-2(llama.cppv0.6.0), and the
llamadart_llama_cpp_flutterApple SwiftPM pin with it. -
Behavior change: a llama.cpp state file saved by llamadart 0.11.x or
earlier no longer loads: llama.cppv0.6.0changed the session format.
On native,stateLoadFilethrowsLlamaStateExceptionnaming the file's
format version and the one the runtime reads; evaluate the prompt again and
save a new file (Save and restore prompt state). -
Fix a C++ exception inside llama.cpp ending the process on native. The
failed call now throws the typedLlamaExceptionof its operation with
llama.cpp's message, such asLlamaInferenceExceptionfromdetokenize
for a token outside the vocabulary, or from a lazy-grammar trigger pattern
that is not a regular expression. A context the failed call left undefined
then throwsLlamaStateExceptionuntil its model is loaded again
(llamadart-native#102). -
Android llama.cpp Vulkan: the 8-token text-prompt decode cap now applies
only on a GPU whose subgroup size llama.cppv0.6.0mis-tiles (16, or below
8) or cannot be read. Other GPUs decode a text prompt in full micro-batches
(#948). -
llama.cpp Vulkan needs Vulkan 1.2 from the loader and the GPU driver. When
the Vulkan GPU a load would run on reports less,ComputeDevice.gpunow
throwsLlamaUnsupportedExceptionnaming the GPU and both versions, and
ComputeDevice.autoloads the model on the CPU with a warning, instead of
starting a driver llama.cpp cannot use; a load with other usable GPUs
leaves that one out
(#782).
- Aligned the default WebGPU bridge assets to
v0.1.59: they embed llama.cpp
v0.6.0, are qualified against nativev0.6.0, and keep Web/native
llama.cppv0.6.0@d81235049384534c167caea52b85a694f6103d14parity; Web
LiteRT-LM is@litert-lm/core@0.18.0. Immutable Web asset manifest:
f823b10417b212ff1f66aa1c46bf78af7d9c393497dfcf0fa3a4f77adeb260eb.
- Behavior change: chat content keeps the whitespace that ends a reply,
as llama.cpp'sllama-serverdoes.LlamaEngine.create,ChatSessionand
ChatTemplateEngine.parsetrimmed it in every chat format except Gemma 4,
so the text before a caller stop sequence lost a trailing space or newline:
alphabefore the stopcedar17came back asalpha
(#951). A reply the model
ends with a newline now keeps it, as does a JSON-mode reply where the
grammar allows whitespace after the value (createStructuredJsonand
LlamaStructuredOutput.parsestill decode it); trim replies you compare
exactly.ChatSessionand its tool loop store assistant turns inhistory
without that whitespace, so the next prompt is unchanged. - Fix a process abort on an image with more tokens than the context's
micro-batch when the projector's images are decoded with non-causal
attention (Gemma 3 and Gemma 4 other than E2B and E4B, among others): the
prompt now throwsLlamaInferenceExceptionnaming the
ModelParams.microBatchSizeit needs. With default batch sizes that is an
image above 512 tokens. A context whose batch equals its micro-batch still
decodes such an image in several batches, and now logs a warning that this
can reduce accuracy
(#958). - Behavior change:
allinllamadart_native_runtimesnow includes the
opt-instable_diffusionimage runtime, sollamadart_native_runtimes: all
ships GGUF,.litertlmand image generation together. An app that already
setsall, or a list containing it, downloads 14.7 to 15.6 MB more per
target, or 25.8 to 27.8 MB for the Vulkan build Linux and Windows use by
default, and grows by about 37 MB as measured on macOS arm64 and Android
arm64. android-x64 and Windows arm64 publish no image runtime and skip it
with a warning. A Flutter iOS or macOS app skips it with a build warning
unlessllamadart_stable_diffusion_flutteris a dependency; a pub
workspace member, whose user-defines live in the workspace root pubspec, is
not recognised as one and bundles it. Leaving the key unset, or setting
both, still bundles onlyllama_cppandlitert_lm
(#856). - Behavior change: an image or audio part of a chat request to a GGUF
model takes the place it has in its message, as llama.cpp'sllama-server
renders it (#964). For
Qwen3.5 and Qwen2.5-Omni it was attached before the whole prompt, and for
GLM-OCR it was wrapped in the image start and end tokens twice, so prompts
for media turns of these models change. A chat template no longer writes
its own text for a media part: Qwen'sPicture N:underadd_vision_id,
the Kimi-K2 wrapper, Reka's run of image tokens and Cohere's
<|IMG_PATCH|>are gone, as onllama-server. A placeholder string that
a chat message quotes (<img>,<image>,[IMG],<__media__>) is text
instead of a part. Where the runtime would still read such a string as a
part, it reaches the model with a zero-width space (U+200B) after its
first character, which the model may repeat in its answer: a quoted
<__media__>increateon native; every placeholder the bridge
rewrites increateon Web; and every placeholdergeneratereads in the
promptchatTemplatereturns for messages with media and increateon
a custom backend withoutBackendChatPromptGeneration, which
package:llamadart/backend.dartnow exports. A prompt written for
generatekeeps its placeholders, andchatTemplateoutput for messages
without media is unchanged. - On native llama.cpp, image or audio input that the loaded projector has no
encoder for throwsLlamaUnsupportedExceptionnaming the encoder, where
createandgeneratethrewLlamaInferenceException. A chat template
that raises or has invalid syntax throwsLlamaInferenceExceptionwith the
template's message instead of a rawException
(#963). - Fix LiteRT-LM bundles whose own chat template reads message content as a
string, such asQwen3.5-0.8B_int8.litertlmbuilds from before September
2026. With LiteRT-LMv0.18.0a template that interpolates the content put
a serialized[{"text": ..., "type": "text"}]list into every prompt, so
repeated requests degraded sooner than withv0.17.0-8; one that
concatenates it failed every request; one that only handles a string
rendered empty messages. Native platforms now give such a template the text
again. Not covered: Web, and templates in the runtime's single-turn
is_appending_to_prefillform, for which a warning is logged
(#991, Chat templates).