Model compatibility
How llamadart recognizes model families from chat templates, what CI template tests vs runtime qualification prove, and format-specific exceptions.
On this page
llamadart has no model allowlist. Any GGUF that the pinned llama.cpp runtime
can load will generate text. What varies by family is how chat messages, tool
calls and reasoning are formatted and parsed, and that follows from the
model's chat template rather than a hardcoded model list.
How a family is recognized#
-
GGUF:
llamadartreads the chat template embedded in the file (tokenizer.chat_template, ortokenizer.chat_template.tool_usewhen tools are passed) and detects its format from marker strings, inllama.cpp's priority order. It does not look at the model name or architecture. -
.litertlm:llamadartpicks a template from the file name (gemma-4,gemma-3n,gemma-3/gemma-2,qwen3orqwen2.5) for format detection and output parsing. SetModelParams.chatTemplateto override it. On native LiteRT-LM,getMetadata()reports the template the runtime renders astokenizer.chat_template, and the parsing template, when it differs, asllamadart.chat_template.parsing. A bundle with no matching family and no override reports no template. -
No match: the template renders as-is, with no tool-call or reasoning
parsing. If you pass tools,
llamadartadds a generic JSON tool-call instruction instead.
To inspect what a loaded model will receive and which format was detected, call
engine.chatTemplate(...) and check await engine.capabilities; see
Chat templates and output parsing
and
Checking the loaded runtime.
For native .litertlm, the prompt comes from the template the runtime renders
for text-only requests: the file-name template for Qwen3 bundles, and the
bundle's embedded template for the others, such as Qwen3.5 and Gemma. Dart
renders it, so it shows what that template produces, not the runtime's exact
bytes; requests with media always use the embedded template. The other result
fields, such as format, still come from the parsing template.
Evidence levels#
llamadart separates template checks from executed runtime qualification:
-
Template-tested (CI): CI detects and renders published chat templates from
llama.cpp's template set and real GGUF fixtures, and parses recorded sample outputs. This verifies template detection, rendering and parsing in Dart, not model execution on a device. -
Runtime-qualified (run receipt): Verified by an executed run recorded in
the Support matrix and
Feature validation evidence
(including
local/device runs of
packages/llamadart_validationand platform scenarios). Having a validation profile mapping alone is not a qualifying run.
Chat families#
Rather than maintaining an allowlist, the Dart template engine implements
llama.cpp's published chat and tool-call formats (including Gemma 4,
Qwen3-Coder XML, Hermes, FunctionGemma, Llama 3, Ministral, DeepSeek, GLM,
Granite, LFM2, GPT-OSS, and others; see
Template engine internals).
For a compact onboarding example, Qwen3.5-0.8B GGUF
(hf://unsloth/Qwen3.5-0.8B-GGUF/Qwen3.5-0.8B-Q4_K_M.gguf) uses the
Qwen3-Coder XML format and is used in the
Basic app example. For runnable chat presets across
GGUF and .litertlm, see the Chat app example.
Key format-specific behavior and exceptions:
-
Generic JSON fallback: When a selected template has no recognized native
tool-call format (for example, Gemma 2/3/3n, Phi-3.5, or SmolLM3),
llamadartasks the model to answer with atool_callorresponseJSON object and parses that. This is an intentional extension tollama.cpp, not evidence of native tool support or reliable tool selection; templates can omit tool definitions even when a grammar constrains the output. See Generic JSON fallback. -
Reasoning markers: Where a format defines reasoning markers, such as
<think>, Gemma 4's thought channel, or Mistral's[THINK], the parser returns reasoning separately from the reply. See Text generation and streaming. -
Qwen3.5
.litertlmbundles: These bundles render their own embedded chat template (#1134), soModelParams.chatTemplateis ignored for them. TheQwen3.5-0.8B_int8,Qwen3.5-0.8B-VL_int8andQwen3.5-0.8B_int8_gpu_composite_v0190bundles (LiteRT-LM 0.19 and earlier) close an empty<think>block in the generation prompt and never readenable_thinking, soenableThinking: trueproduces no reasoning there. TheQwen3.5-0.8B_dynamic_wi8_afp32bundle readsenable_thinkingbut needs LiteRT-LM 0.20.0 or later, so it fails on the pinned 0.19.1 runtime. Use GGUF for Qwen3.5 thinking; Qwen3 and Gemma 4.litertlmbundles support thinking.
Vision and audio#
GGUF vision and audio models require a matching projector (mmproj) file loaded
alongside the text GGUF. .litertlm multimodal bundles package and process
media inputs internally. See Multimodal input
and the
Chat app example.
Speech, embeddings and decision models#
Specialized engines and task formats live in their own guides, with runnable demos in Basic app and Chat app, and scoped platform receipts in the Support matrix and Feature validation evidence:
-
Speech to text: Speech to text (GGUF
Qwen3-ASR,llama.cppmultimodal PCM streaming, and.litertlmASR adapters). - Text to speech: Text to speech (GGUF and companion/ONNX setups per TTS adapter).
-
Embeddings: Embeddings (
LlamaEnginetext embeddings with GGUF, and LiteRT-LM CPU multimodal embeddings with.litertlm). -
Decision models: Decision models
(
DecisionEnginepairing a GGUF backbone with a.safetensorshead). -
Image generation (Preview): Image generation
(
ImageGenerationEngineloading compatible GGUF,.safetensors, and explicit-role.ckpt/.pth/.ptweights — separate fromLlamaEngine).
If a family behaves oddly#
-
Render the prompt with
engine.chatTemplate(...)and compare it with the model card. - Check which format was detected:
ChatTemplateEngine.detectFormat(template). -
Inspect
await engine.capabilities, and check the Support matrix and Feature validation evidence for runtime-qualified combinations before debugging your own prompts. - Report the model repo and file in a GitHub issue.