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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

- Add LFM3-Audio and Soprano speech output on native llama.cpp (`Lfm3AudioTtsAdapter`, `SopranoTtsAdapter`) and predefined voice selection (`TextToSpeechRequest.voice`, `TextToSpeechCapabilities.voices`); runtimes before llamadart-native v0.8.0 refuse them with `LlamaUnsupportedException` ([#1615](https://github.com/leehack/llamadart/issues/1615)).
- Add Chatterbox Turbo, Chatterbox Multilingual and Pocket TTS speech output on native llama.cpp (`ChatterboxTtsAdapter`, `PocketTtsAdapter`) with listed predefined voices and speaker-reference cloning; they need llamadart-native v0.9.0 ([#1783](https://github.com/leehack/llamadart/issues/1783)).
- Update the default llama.cpp native runtime to `leehack/llamadart-native@v0.9.0` (llama.cpp `v0.9.0`). On ARM64 CPUs, F16 dot products of large values no longer overflow to inf or NaN ([llamadart-native#174](https://github.com/leehack/llamadart-native/issues/174)), and Qwen3-TTS sampling applies the GGUF's suppress tokens. Flutter Apple apps get it from `llamadart_llama_cpp_flutter` `0.19.0`, released with this core. Web keeps llama.cpp `v0.8.0` until a later bridge repin.
- Update the default llama.cpp native runtime to `leehack/llamadart-native@v0.9.0` (llama.cpp `v0.9.0`). On ARM64 CPUs, F16 dot products of large values no longer overflow to inf or NaN ([llamadart-native#174](https://github.com/leehack/llamadart-native/issues/174)), and Qwen3-TTS sampling applies the GGUF's suppress tokens. Flutter Apple apps get it from `llamadart_llama_cpp_flutter` `0.19.0`, released with this core.
- Aligned the default WebGPU bridge assets to `v0.1.83`: native llama.cpp `v0.9.0` and Web now both use upstream `v0.9.0@cd959bae99ff4bed22bef2604f45241c09bbb8c8`, and Web Qwen3-TTS applies the GGUF's suppress tokens ([llama-web-bridge#211](https://github.com/leehack/llama-web-bridge/pull/211)). Manifest SHA-256: `ae6f488408672f9ba28d8f9e664a2b85f4e12048f290e259e18dd0b750c038e5`.
- Fix LiteRT-LM text-only or audio-only turns that failed with "Image history requires a vision encoder." after an image turn on the same engine ([#1781](https://github.com/leehack/llamadart/issues/1781)).
- Move Web LiteRT-LM to `@litert-lm/core@0.19.0`; WebGPU loads keep the runtime's default backend, so standard `.litertlm` bundles can load there. Web embeddings, tool loops, media and custom templates stay unsupported.
- Update the default LiteRT-LM native runtime to `leehack/litert-lm-native@v0.19.1` (upstream LiteRT-LM `v0.19.1`); the C API is unchanged. Flutter Apple apps get it from `llamadart_litert_lm_flutter` `0.19.0`, released with this core.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Current default runtime pins:
| --- | --- |
| Native llama.cpp / GGUF | `leehack/llamadart-native@v0.9.0` |
| Native LiteRT-LM / `.litertlm` | `leehack/litert-lm-native@v0.19.1` |
| Web llama.cpp / GGUF | `leehack/llama-web-bridge-assets@v0.1.82` |
| Web llama.cpp / GGUF | `leehack/llama-web-bridge-assets@v0.1.83` |
| Web LiteRT-LM / `.litertlm` | `@litert-lm/core@0.19.0` |

Native LiteRT-LM uses a lazy ABI-aware client for direct calls, services and
Expand Down
4 changes: 2 additions & 2 deletions doc/multimodal_embeddings_web.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ Bridge source contract inspected read-only at
restore and structured-clone ownership; those are bridge responsibilities.

Qualification target: EmbeddingGemma-2 BF16 with its matching
mmproj and pinned assets `v0.1.82` on Chrome CPU wasm memory64
mmproj and pinned assets `v0.1.83` on Chrome CPU wasm memory64
(`gpuLayers: 0`). The scenario below checks the bridge's production worker
budget against references from the matching native `v0.8.0`.
budget against references from the matching native `v0.9.0`.
The table below retains the original `v0.1.66` lineage
([PR 1205](https://github.com/leehack/llamadart/pull/1205)); qualification of the
previous `v0.1.79` pin stayed within its gates (minimum cosine 0.99997,
Expand Down
27 changes: 14 additions & 13 deletions doc/webgpu_bridge.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ an earlier `<script>`:

## Pinned assets

Default pinned tag in the example is `v0.1.82`.
Default pinned tag in the example is `v0.1.83`.
Vendor the pinned assets into the chat app with:

```bash
WEBGPU_BRIDGE_ASSETS_TAG=v0.1.82 ./scripts/fetch_webgpu_bridge_assets.sh
WEBGPU_BRIDGE_ASSETS_TAG=v0.1.83 ./scripts/fetch_webgpu_bridge_assets.sh
```

`WEBGPU_BRIDGE_OUT_DIR` changes the destination. The script verifies
Expand All @@ -90,20 +90,17 @@ the chat app, set the bootstrap globals before the bootstrap runs:
```html
<script>
window.__llamadartBridgeAssetsRepo = 'leehack/llama-web-bridge-assets';
window.__llamadartBridgeAssetsTag = 'v0.1.82';
window.__llamadartBridgeAssetsTag = 'v0.1.83';
</script>
```

That release embeds llama.cpp `v0.8.0`, behind the `hook/build.dart` native pin
(`v0.9.0`; the bridge is built from upstream llama.cpp `v0.8.0@8642541b255bfb5dc39cd351a178be09013a55d6`)
even though the bridge asset tag `v0.1.82` differs from the native runtime tag
`v0.9.0`. Provenance for this immutable consumer artifact: release `432258348`,
tag commit `33c782f2acdae78860ad1197344240f60290cecb`, bridge source
`e57b9f68fb38d1471af7b94443229993f777df97`, and manifest SHA-256
`fda19e047aba5a511020854437cc89e2f53e2f67f5f6cf5fec336faef3a6c362`. The bridge
manifest records native `v0.8.0-1`. Web and native share no ABI, so this skew
is supported, but changes new in llama.cpp `v0.9.0` reach Web only with a
later bridge repin.
That release embeds llama.cpp `v0.9.0`, matching the `hook/build.dart` native pin
(`v0.9.0`, both built from upstream llama.cpp `v0.9.0@cd959bae99ff4bed22bef2604f45241c09bbb8c8`)
even though the bridge asset tag `v0.1.83` differs from the native runtime tag
`v0.9.0`. Provenance for this immutable consumer artifact: release `438242670`,
tag commit `44aa84a8a51701dc9c4f82c21e6ee3e774919c20`, bridge source
`cb6383fbe7e903764a89f5c80c7f81c219f99769`, and manifest SHA-256
`ae6f488408672f9ba28d8f9e664a2b85f4e12048f290e259e18dd0b750c038e5`.
They expose the API-version-1 media embedding contract. State and extraction
qualification covers wasm32 and memory64 through direct and worker runtimes. Existing decision,
scoring, sampling, LoRA, speculative decoding and speech APIs remain available.
Expand Down Expand Up @@ -204,6 +201,10 @@ physical playback, intelligibility or speaker-reference fidelity.
`embedBatch` restarts it after each finished input, so the budget bounds one
input rather than the batch. `workerRequestTimeoutMs` still overrides it
([llama-web-bridge#203](https://github.com/leehack/llama-web-bridge/pull/203)).
- `v0.1.83+`: llama.cpp `v0.9.0`. The TTS talker sampler applies the GGUF's
suppress tokens, so Qwen3-TTS no longer fails with `code out of range` when it
samples a codec control token
([llama-web-bridge#211](https://github.com/leehack/llama-web-bridge/pull/211)).

### Media embeddings

Expand Down
4 changes: 2 additions & 2 deletions example/chat_app/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@
typeof configuredRepo === 'string' && configuredRepo.length > 0
? configuredRepo
: 'leehack/llama-web-bridge-assets';
const defaultBridgeAssetsTag = 'v0.1.82';
const defaultBridgeLlamaCppTag = 'v0.8.0';
const defaultBridgeAssetsTag = 'v0.1.83';
const defaultBridgeLlamaCppTag = 'v0.9.0';
const bridgeAssetsTag =
typeof configuredTag === 'string' && configuredTag.length > 0
? configuredTag
Expand Down
4 changes: 2 additions & 2 deletions lib/src/web_setup/web_bridge_setup.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ import '../core/exceptions.dart';
const String webBridgeAssetsRepository = 'leehack/llama-web-bridge-assets';

/// The bridge asset release this llamadart version is qualified against.
const String webBridgeAssetsTag = 'v0.1.82';
const String webBridgeAssetsTag = 'v0.1.83';

/// SHA-256 of the exact approved `manifest.json` of [webBridgeAssetsTag].
///
/// The manifest lists the SHA-256 and size of every asset, so pinning its
/// bytes pins every file the tool writes.
const String webBridgeManifestSha256 =
'fda19e047aba5a511020854437cc89e2f53e2f67f5f6cf5fec336faef3a6c362';
'ae6f488408672f9ba28d8f9e664a2b85f4e12048f290e259e18dd0b750c038e5';

/// Directory under the app's `web/` directory that receives the assets.
const String webBridgeAssetsDirName = 'webgpu_bridge';
Expand Down
6 changes: 3 additions & 3 deletions scripts/fetch_webgpu_bridge_assets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -euo pipefail
ROOT_DIR="$(git rev-parse --show-toplevel)"
OUT_DIR="${WEBGPU_BRIDGE_OUT_DIR:-$ROOT_DIR/example/chat_app/web/webgpu_bridge}"
ASSETS_REPO="${WEBGPU_BRIDGE_ASSETS_REPO:-leehack/llama-web-bridge-assets}"
ASSETS_TAG="${WEBGPU_BRIDGE_ASSETS_TAG:-v0.1.82}"
ASSETS_TAG="${WEBGPU_BRIDGE_ASSETS_TAG:-v0.1.83}"
CDN_BASE="${WEBGPU_BRIDGE_CDN_BASE:-https://cdn.jsdelivr.net/gh/${ASSETS_REPO}@${ASSETS_TAG}}"
CURL_DOWNLOAD_ARGS=(
--connect-timeout 15
Expand All @@ -19,7 +19,7 @@ if [[ "${1:-}" == "--help" || "${1:-}" == "-h" ]]; then
Downloads prebuilt WebGPU bridge assets into the chat_app web directory.

Default source:
https://cdn.jsdelivr.net/gh/leehack/llama-web-bridge-assets@v0.1.82
https://cdn.jsdelivr.net/gh/leehack/llama-web-bridge-assets@v0.1.83

Environment variables:
WEBGPU_BRIDGE_ASSETS_REPO Asset repo in owner/repo format
Expand All @@ -31,7 +31,7 @@ Usage:
./scripts/fetch_webgpu_bridge_assets.sh

Examples:
WEBGPU_BRIDGE_ASSETS_TAG=v0.1.82 ./scripts/fetch_webgpu_bridge_assets.sh
WEBGPU_BRIDGE_ASSETS_TAG=v0.1.83 ./scripts/fetch_webgpu_bridge_assets.sh
WEBGPU_BRIDGE_ASSETS_REPO=acme/llama-web-bridge-assets WEBGPU_BRIDGE_ASSETS_TAG=v2 ./scripts/fetch_webgpu_bridge_assets.sh
USAGE
exit 0
Expand Down
78 changes: 41 additions & 37 deletions test/unit/tooling/check_webgpu_bridge_tag_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ Directory _fakeRuntimeRepo({
'example/chat_app/web/index.html':
" const defaultBridgeLlamaCppTag = '$bridgeTag';\n",
'doc/webgpu_bridge.md': parityWording
? 'That release embeds llama.cpp `$bridgeTag`, behind the '
? 'That release embeds llama.cpp `$bridgeTag`, matching the '
'`hook/build.dart` native pin\n'
: 'That release embeds llama.cpp `$bridgeTag`, which now trails the '
'`hook/build.dart`\n',
'website/docs/platforms/webgpu-bridge.md': parityWording
? '- The pinned `v1.2.3` bridge assets embed llama.cpp `$bridgeTag`, behind '
? '- The pinned `v1.2.3` bridge assets embed llama.cpp `$bridgeTag`, matching '
'the native runtime\n'
: '- The pinned `v1.2.3` bridge assets embed llama.cpp `$bridgeTag`, which now '
'trails the\n',
Expand Down Expand Up @@ -80,25 +80,25 @@ const String _approvedManifestJson = '''
"size_bytes": 257
},
"llama_webgpu_core.js": {
"sha256": "d693784e27432485fc9732891c03ce113099b32aeb4bd8e0a0ba3d0320f52bc9",
"sha256": "58b74b403eabfde0703e1f53cdbb9fd34e5eee480bcd0443b32cf97ba48448c0",
"size_bytes": 123402
},
"llama_webgpu_core.wasm": {
"sha256": "70012bfeaf65eb8f024021fd08372139b6f993cdf0c36041b6e757d0fd2151dd",
"size_bytes": 10645409
"sha256": "f20057d88b90de59da5ad35adb8aa49fa4ef5156c9e64e2957d25f8cafe38bdd",
"size_bytes": 11099140
},
"llama_webgpu_core_mem64.js": {
"sha256": "282d0934ec2090b13f527e1f01d5740374bdfcc1e75c1f46f9148e7007976a0b",
"size_bytes": 147159
},
"llama_webgpu_core_mem64.wasm": {
"sha256": "e098eb4627b543408d553ad66227f8747001b4c1ce5455909e1fc4b0ed8f7f31",
"size_bytes": 10926659
"sha256": "c2d6548505893b6d89e2a61d6b00a2c502ff03ac8e691c6328c048bbdd4f643a",
"size_bytes": 11390403
}
},
"assets_repository": "leehack/llama-web-bridge-assets",
"bridge_assets_tag": "v0.1.82",
"bridge_commit": "e57b9f68fb38d1471af7b94443229993f777df97",
"bridge_assets_tag": "v0.1.83",
"bridge_commit": "cb6383fbe7e903764a89f5c80c7f81c219f99769",
"bridge_repository": "leehack/llama-web-bridge",
"capabilities": {
"memory64": true,
Expand Down Expand Up @@ -141,31 +141,31 @@ const String _approvedManifestJson = '''
"size_bytes": 257
},
"llama_webgpu_core.js": {
"sha256": "d693784e27432485fc9732891c03ce113099b32aeb4bd8e0a0ba3d0320f52bc9",
"sha256": "58b74b403eabfde0703e1f53cdbb9fd34e5eee480bcd0443b32cf97ba48448c0",
"size_bytes": 123402
},
"llama_webgpu_core.wasm": {
"sha256": "70012bfeaf65eb8f024021fd08372139b6f993cdf0c36041b6e757d0fd2151dd",
"size_bytes": 10645409
"sha256": "f20057d88b90de59da5ad35adb8aa49fa4ef5156c9e64e2957d25f8cafe38bdd",
"size_bytes": 11099140
},
"llama_webgpu_core_mem64.js": {
"sha256": "282d0934ec2090b13f527e1f01d5740374bdfcc1e75c1f46f9148e7007976a0b",
"size_bytes": 147159
},
"llama_webgpu_core_mem64.wasm": {
"sha256": "e098eb4627b543408d553ad66227f8747001b4c1ce5455909e1fc4b0ed8f7f31",
"size_bytes": 10926659
"sha256": "c2d6548505893b6d89e2a61d6b00a2c502ff03ac8e691c6328c048bbdd4f643a",
"size_bytes": 11390403
}
},
"github_run_id": "41569122786",
"github_run_url": "https://github.com/leehack/llama-web-bridge/actions/runs/41569122786",
"llama_cpp_commit": "8642541b255bfb5dc39cd351a178be09013a55d6",
"llama_cpp_tag": "v0.8.0",
"native_commit": "f950319714bbc5e81e73b39c455dcdc91382f2d1",
"native_manifest_sha256": "a546800ba1717f8140c2c4318980240b3416f220831940566be1dc060cfb07f6",
"native_release_tag": "v0.8.0-1",
"github_run_id": "42479331139",
"github_run_url": "https://github.com/leehack/llama-web-bridge/actions/runs/42479331139",
"llama_cpp_commit": "cd959bae99ff4bed22bef2604f45241c09bbb8c8",
"llama_cpp_tag": "v0.9.0",
"native_commit": "a604639131105c42a25a3e7384ca10314d385f80",
"native_manifest_sha256": "0d2119cdcf34d347a96a996423094498de3393026efb6ad1a96ba286b621c39e",
"native_release_tag": "v0.9.0",
"native_repository": "leehack/llamadart-native",
"orchestrator_correlation_id": "auto-stable-v0.8.0-1-a546800ba1717f81-build-e57b9f68fb38d147",
"orchestrator_correlation_id": "manual-v0.1.83",
"qualification_gates": {
"multimodal": "passed",
"speech_to_text": "required-automated-qualification",
Expand All @@ -174,9 +174,9 @@ const String _approvedManifestJson = '''
},
"release_channel": "stable",
"release_rebuild": 0,
"release_tag": "v0.1.82",
"release_tag": "v0.1.83",
"schema_version": 2,
"source_commit": "e57b9f68fb38d1471af7b94443229993f777df97",
"source_commit": "cb6383fbe7e903764a89f5c80c7f81c219f99769",
"source_repository": "leehack/llama-web-bridge",
"unproven_capabilities": {
"hardware_gpu_acceleration": "unavailable-on-hosted-runners",
Expand All @@ -185,9 +185,9 @@ const String _approvedManifestJson = '''
"speaker_reference_fidelity": "unproven",
"wasm32_text_to_speech": "unsupported"
},
"upstream_commit": "8642541b255bfb5dc39cd351a178be09013a55d6",
"upstream_commit": "cd959bae99ff4bed22bef2604f45241c09bbb8c8",
"upstream_repository": "ggml-org/llama.cpp",
"upstream_tag": "v0.8.0"
"upstream_tag": "v0.9.0"
}
''';

Expand All @@ -197,7 +197,7 @@ Future<List<String>> _verifyManifestJson(
}) {
final bytes = utf8.encode(manifestJson);
return verifyManifest(
expectedTag: 'v0.1.82',
expectedTag: 'v0.1.83',
expectedLlamaCppTag: bridgeLlamaCppTag,
expectedLlamaCppCommit: bridgeLlamaCppCommit,
expectedBridgeCommit: bridgeSourceCommit,
Expand All @@ -223,13 +223,14 @@ String _currentReleaseNotes(String path) {

void main() {
test('default assets include the qualified media embedding API', () {
expect(readPinnedBridgeTag(Directory.current), 'v0.1.82');
expect(bridgeNativeReleaseTag, 'v0.8.0-1');
expect(readPinnedBridgeTag(Directory.current), 'v0.1.83');
expect(bridgeNativeReleaseTag, 'v0.9.0');
expect(bridgeApprovedNativePin, 'v0.9.0');
expect(
normalizeNativeLlamaCppTag(bridgeApprovedNativePin),
bridgeApprovedNativeUpstreamAhead,
bridgeLlamaCppTag,
);
expect(bridgeApprovedNativeUpstreamAhead, bridgeLlamaCppTag);
});

test(
Expand Down Expand Up @@ -284,7 +285,7 @@ void main() {
'website/docs/changelog/recent-releases.md',
]) {
final current = _currentReleaseNotes(path);
expect(current, contains('`v0.1.82`'), reason: path);
expect(current, contains('`v0.1.83`'), reason: path);
expect(current, contains(bridgeManifestSha256), reason: path);
expect(
current,
Expand All @@ -303,7 +304,7 @@ void main() {
),
reason: path,
);
expect(current, contains('@litert-lm/core@0.18.0'), reason: path);
expect(current, contains('@litert-lm/core@0.19.0'), reason: path);
}

expect(
Expand Down Expand Up @@ -1048,14 +1049,17 @@ void main() {
// bridgeNativeReleaseTag is a constant, so drive the mismatch from the
// other side: a tree whose bridge and native pins agree on a family the
// checked-in anchor does not belong to.
final root = _fakeRuntimeRepo(bridgeTag: 'v0.9.0', nativeTag: 'v0.9.0');
final root = _fakeRuntimeRepo(
bridgeTag: 'v0.10.0',
nativeTag: 'v0.10.0',
);

expect(
findBridgeRuntimeDrift(root, 'v0.9.0'),
findBridgeRuntimeDrift(root, 'v0.10.0'),
contains(
contains(
'bridgeNativeReleaseTag $bridgeNativeReleaseTag does not belong to '
'the recorded upstream llama.cpp release v0.9.0',
'the recorded upstream llama.cpp release v0.10.0',
),
),
);
Expand All @@ -1069,8 +1073,8 @@ void main() {
});

test('immutable release identity stays pinned to the approved release', () {
expect(bridgeAssetsReleaseId, '432258348');
expect(bridgeAssetsTagCommit, '33c782f2acdae78860ad1197344240f60290cecb');
expect(bridgeAssetsReleaseId, '438242670');
expect(bridgeAssetsTagCommit, '44aa84a8a51701dc9c4f82c21e6ee3e774919c20');
});

test('accepts equivalent CRLF documentation passages', () {
Expand Down
Loading
Loading