Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/cross_platform_validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -1655,7 +1655,7 @@ the `v0.19.1-5` Android runtime prepared in
that route created the engine and failed the first generation.

Set B, on the PR head `a9c83d50` ([#2006](https://github.com/leehack/llamadart/pull/2006),
clean bundles, LiteRT-LM `v0.19.1-5`, `libLiteRtLm.so` `9926197b…`), graded with
clean bundles for G1–G4, LiteRT-LM `v0.19.1-5`, `libLiteRtLm.so` `9926197b…`), graded with
the same verifier. Each OpenCL run logs one `Loaded OpenCL library with dlopen.`
record in the test process; W2c's app omits the `libOpenCL.so` declaration (a
diagnostic build with two local patches) and logs one Mali-G715 Vulkan
Expand Down
3 changes: 2 additions & 1 deletion lib/src/core/engine/engine.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3301,7 +3301,8 @@ class LlamaEngine implements LlamadartEngine<LlamaEngineCapabilities> {
/// On native llama.cpp, `tokenizer.ggml.bos_token` and
/// `tokenizer.ggml.eos_token` hold the vocabulary's BOS and EOS token text as
/// llama.cpp resolves it for a chat template (including its default ids for
/// a vocabulary that sets none), empty only when the id is negative.
/// a vocabulary that sets none), empty when the id is negative or has no
/// piece text.
///
/// On native LiteRT-LM, `tokenizer.chat_template` is the template the
/// runtime renders for text-only chats: the bundle's embedded template, or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schema_version": 1,
"description": "Source-derived obligation inventory only. Public LiteRT-LM C API 1.0 activation has compiled-fixture default-client/service/speech dispatch, cancellation and reload controls in litert_lm_v1_public_qualification_test.dart; actual public rows bind chat-litert-cpu and reviewed ASR inputs separately. These model-free controls do not qualify artifacts, devices or new capability families; adoption remains https://github.com/leehack/llamadart/issues/1677. Existing pack bindings do not assert execution, platform/backend qualification or completeness of every semantic branch. Exemptions remain open work. Native LiteRT-LM catalog 10 S01 records capability admission only; the maintained litert-lm-json-schema local scenario (and chat-app-litert-json-schema on Android devices) supplies per-model (Qwen3-0.6B, Gemma 4 E2B) CPU and GPU enforcement, schema-contract and Gemma 4 thinking evidence on each qualified host, now including Android arm64 CPU and GPU on a Galaxy S24 and a Pixel 9 Pro, run by chat-app-litert-json-schema. Linux x64 CPU and GPU are qualified on an NVIDIA L4 (driver 615.71, Vulkan), and Windows x64 CPU and GPU on an NVIDIA L4 (GRID 596.86, Direct3D 12); the Linux arm64 GPU stays unqualified. Validation-pack qualification of the widened contract and of non-macOS hosts remains https://github.com/leehack/llamadart/issues/174.",
"description": "Source-derived obligation inventory only. Public LiteRT-LM C API 1.0 activation has compiled-fixture default-client/service/speech dispatch, cancellation and reload controls in litert_lm_v1_public_qualification_test.dart; actual public rows bind chat-litert-cpu and reviewed ASR inputs separately. These model-free controls do not qualify artifacts, devices or new capability families; adoption remains https://github.com/leehack/llamadart/issues/1677. Existing pack bindings do not assert execution, platform/backend qualification or completeness of every semantic branch. Exemptions remain open work. Native LiteRT-LM catalog 10 S01 records capability admission only; the maintained litert-lm-json-schema local scenario (and chat-app-litert-json-schema on Android devices) supplies per-model (Qwen3-0.6B, Gemma 4 E2B) CPU and GPU enforcement, schema-contract and Gemma 4 thinking evidence on each qualified host, now including Android arm64 CPU and GPU on a Galaxy S24 and a Pixel 9 Pro. Linux x64 CPU and GPU are qualified on an NVIDIA L4 (driver 615.71, Vulkan), and Windows x64 CPU and GPU on an NVIDIA L4 (GRID 596.86, Direct3D 12); the Linux arm64 GPU stays unqualified. Validation-pack qualification of the widened contract and of non-macOS hosts remains https://github.com/leehack/llamadart/issues/174.",
"packs": [
{
"id": "batching",
Expand Down
4 changes: 2 additions & 2 deletions skills/llamadart-tool-calling/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@ description: >-
whitespace between the closers. A string cannot contain the literal `<|tool_call_end|>`; an unclosed one
holds no `<|`. Auto grammar
preserves copied bare text and balanced object/list spellings as strings only for one required
plain string argument. Copied path-like values may retain a trailing backslash
plain string argument (excluding `<` and `>` from unquoted copied spellings). Copied path-like values may retain a trailing backslash
or an unmatched opening quote, in a singleton list without a terminal comma.
Ambiguous spellings stay non-executable; other declarations retain their types
and strict quote boundaries. A schema-valid auto prefix closed with a foreign
XML tag can remain raw diagnostic text with no executable calls. A trailing
list comma cannot lead into this diagnostic form. Its argument bytes exclude
`<` and its tail excludes special markers; never execute these diagnostics. Required/force-JSON and `none` behavior is unchanged.
`<` and its tail excludes `<|` marker prefixes; never execute these diagnostics. Required/force-JSON and `none` behavior is unchanged.
For the one-string form, values that would continue a completed copied-path
call use the existing Python `tool(arguments={"field":"..."})` envelope with
JSON string escaping. The inner object follows the declared single-field
Expand Down
14 changes: 10 additions & 4 deletions test/e2e/webgpu/tool_choice_grammar_e2e_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,10 @@ void main() {
routeNotRun =
'legacy assets are ${assetFacts[assets]?['assetsTag']}, '
'not $_legacyAssetsTag';
} else if (!legacy &&
binding['coreVariant'] != 'wasm32' &&
binding['coreVariant'] != 'wasm64') {
routeNotRun = 'unexpected coreVariant: ${binding['coreVariant']}';
}
});

Expand All @@ -431,15 +435,17 @@ void main() {
}
if (notRunReason != null || routeNotRun != null) return;
final facts = assetFacts[assets];
final coreKey = binding['coreVariant'] == 'wasm64'
? 'coreWasm64Sha256'
: 'coreWasm32Sha256';
final coreKey = switch (binding['coreVariant']) {
'wasm64' => 'coreWasm64Sha256',
'wasm32' => 'coreWasm32Sha256',
_ => null,
};
final receipt = {
'route': route.name,
'results': results,
'binding': binding,
...?facts,
'coreWasmSha256': facts?[coreKey],
'coreWasmSha256': coreKey == null ? null : facts?[coreKey],
...modelFacts,
'penalty': recorder.calls.isEmpty
? null
Expand Down
6 changes: 3 additions & 3 deletions website/docs/guides/chat-template-and-parsing.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ stream rules of each format.
On native llama.cpp, `engine.getMetadata()` reports the vocabulary's BOS and
EOS token text as `tokenizer.ggml.bos_token` and `tokenizer.ggml.eos_token`,
resolved as llama.cpp resolves them (including its default ids for a
vocabulary that sets none; empty only when the id is negative), and templates
render them as `bos_token` and `eos_token`. GGUF files store only the token
ids.
vocabulary that sets none; empty when the id is negative or has no piece
text), and templates render them as `bos_token` and `eos_token`. GGUF files
store only the token ids.

### LiteRT-LM template registry

Expand Down
7 changes: 4 additions & 3 deletions website/docs/guides/tool-calling.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,16 +196,17 @@ For a string parameter, `value=False` remains the string `"False"`; copied
backslashes in Python-style string arguments remain literal. Ambiguous copied
text and escaped text are not globally unescaped. The existing JSON call form
keeps JSON string decoding. For a tool with one required plain string argument, auto grammar also preserves
parser-supported bare text and balanced object/list spellings as strings. Copied
parser-supported bare text and balanced object/list spellings as strings
(excluding `<` and `>` from unquoted copied spellings). Copied
path-like values may retain a trailing backslash or an unmatched opening quote,
in a singleton list without a terminal comma. Ambiguous copied spellings remain
non-executable; the grammar does not reinterpret them as a different value.
Other declarations and list forms retain their declared types and strict quotes.
An auto reply closed with a foreign XML tag such as `</function_call>` can remain
raw diagnostic text instead of being forced into an executable tool envelope.
This diagnostic form requires a schema-valid call prefix without a trailing
list comma, excludes `<` from its argument bytes, and excludes special markers
from its tail. It never yields an executable call. Required/force-JSON and `none` behavior is unchanged.
list comma, excludes `<` from its argument bytes, and excludes `<|` marker
prefixes from its tail. It never yields an executable call. Required/force-JSON and `none` behavior is unchanged.
For that one-string form, a direct string cannot continue a completed copied-path
call as argument data. Such values use the existing Python wrapper
`save_note(arguments={"text":"..."})`, whose JSON string encoding preserves the
Expand Down
2 changes: 1 addition & 1 deletion website/docs/platforms/webgpu-bridge.md
Original file line number Diff line number Diff line change
Expand Up @@ -472,5 +472,5 @@ probe, not the tag.
| `v0.1.75` | A draft context that does not fit throws `LlamaUnsupportedException` and the target stays usable | The draft leaks until the runtime aborts |
| `v0.1.76` | The projector copy behind the repeated wasm32 media batch abort is freed (repeated batches qualified on wasm32, measured on the pinned assets; memory64 recommended for headroom) | Repeated media batches can abort on wasm32 |
| `v0.1.79+` | A worker image or audio `embed` gets 10 minutes per input | Two minutes per request |
| `v0.1.85+` | A page without cross-origin isolation rejects the load at once (`CrossOriginIsolationError`); `gpu_unavailable:<reason>` runtime note; 0 GPU layers skip the WebGPU backend | Minutes of init timeout, then a generic error; no reason note; the WebGPU backend is created anyway |
| `v0.1.84+` | A thinking budget keeps a grammar that takes the thought applied (`thinkingBudgetPauseGrammar`) | That combination throws `LlamaUnsupportedException` |
| `v0.1.85+` | A page without cross-origin isolation rejects the load at once (`CrossOriginIsolationError`); `gpu_unavailable:<reason>` runtime note; 0 GPU layers skip the WebGPU backend | Minutes of init timeout, then a generic error; no reason note; the WebGPU backend is created anyway |
Loading