litert-lm-web-runtime is an open-weight model from Jess Fan, released under Apache License 2.0. Its published files total 1.2 GB.
WebAssembly + WebGPU runtime binaries and the matching @litert-lm/core TypeScript SDK for running Gemma 4 (E2B, E4B, 12B, 26B-A4B, 31B) in the browser with: - Text decode with shared-KV neural Multi-Token Prediction (MTP) speculative decoding (GPUARTISAN…
Model Card
By Jess Fan, published under apache-2.0, revision 0b1476c2e64a.
WebAssembly + WebGPU runtime binaries and the matching @litert-lm/core TypeScript SDK for running Gemma 4 (E2B, E4B, 12B, 26B-A4B, 31B) in the browser with: - Text decode with shared-KV neural Multi-Token Prediction (MTP) speculative decoding (GPUARTISAN backend, gamma 1-3, greedy token-for-token equivalence with standard decode). - Multimodal vision (SigLIP encoder on WebGPU, 70 / 140 / 280 / 560 / 1120 token budgets, zero-copy RGBA8 ImageData preprocessing, per-budget executor memory release). - Multimodal audio (Conformer encoder, streaming markers, zero-copy audio ingestion). - Streamed model loading for 2-20 GB.litertlm bundles under wasm32 (MAXIMUMMEMORY=4GB), with section filtering…
Read Jess Fan's full model card
LiteRT-LM Web Runtime (@litert-lm/core 0.18.1)
WebAssembly + WebGPU runtime binaries and the matching @litert-lm/core TypeScript SDK
for running Gemma 4 (E2B, E4B, 12B, 26B-A4B, 31B) in the browser with:
- Text decode with shared-KV neural Multi-Token Prediction (MTP) speculative decoding (
GPU_ARTISANbackend, gamma 1-3, greedy token-for-token equivalence with standard decode). - Multimodal vision (SigLIP encoder on WebGPU, 70 / 140 / 280 / 560 / 1120 token budgets, zero-copy RGBA8
ImageDatapreprocessing, per-budget executor memory release). - Multimodal audio (Conformer encoder, streaming markers, zero-copy audio ingestion).
- Streamed model loading for 2-20 GB
.litertlmbundles underwasm32(MAXIMUM_MEMORY=4GB), with section filtering and inter-section padding discard. - Bounded-in-flight WebGPU prefill command buffers (
RunPendingCommandswith $\le 2$ command buffers in flight and group-size-scaled command batchingmin(128, (16 * 1024) / group_size)) so long text and multimodal prefills yield cleanly to the browser compositor and respond to mid-prefill cancellation within ~100 ms. - Decode telemetry on the console log for measurement tooling:
[MTP_TELEMETRY] cycles=<N> accepted=<M> cbs/cycle=.. gather_cycles=.. ple_fallbacks=.. step=<T> win_cycles=<k> win_tok_per_cycle=<x> win_cycle_ms=<y> win_draft_ms=.. win_score_ms=.. win_readback_ms=..(32-cycle window) and[DECODE_TELEMETRY] step=<T> win_tokens=32 win_ms_per_token=<z>for standard decode.
Repository layout
Exactly one runtime set is kept on main. Every release is also addressable by commit SHA
(.../resolve/<commit>/wasm/), and older releases remain available through their commits.
| Path | Contents |
|---|---|
wasm/ |
-c opt Emscripten builds of the four runtime variants, under both the internal names used by the SDK loader (litertlm_wasm_internal, litertlm_wasm_compat_internal, litertlm_wasm_asyncify_internal, litertlm_wasm_compat_asyncify_internal) and the feature aliases (threaded_simd, threaded_nosimd, simd, nosimd); litertlm_wasm.{js,wasm} / litertlm_wasm_compat.{js,wasm} alias the JSPI threaded builds. litertlm_wasm_internal.js.symbols is the symbol map for trap symbolication. |
packages/litert-lm-core-0.18.1.tgz |
The @litert-lm/core npm package (ES modules + typings + the same wasm/ binaries) produced from the same source revision. |
Variant selection: internal = JSPI + threads + SIMD (Chrome 137+), compat_internal = JSPI + threads without SIMD,
asyncify_internal / compat_asyncify_internal = Asyncify fallbacks for browsers without JSPI.
Usage
import {loadLiteRtLm, Backend} from '@litert-lm/core';
const WASM_BASE =
'https://huggingface.co/jfan/litert-lm-web-runtime/resolve/main/wasm/';
const litertlm = await loadLiteRtLm(WASM_BASE);
const engine = await litertlm.createEngine({
modelPath: 'https://huggingface.co/jfan/gemma-4-e4b-web-mtp-vision-litert-lm/resolve/main/gemma-4-E4B-it-web-mtp-vision-audio.litertlm',
backend: Backend.GPU_ARTISAN,
speculativeDraftTokens: 3, // MTP gamma; omit for standard decode
});
Pin a commit SHA instead of main in production so the binaries and the SDK stay in lock-step.
Model bundles
jfan/gemma-4-e2b-web-mtp-vision-litert-lm,jfan/gemma-4-e4b-web-mtp-vision-litert-lm(text / +vision / +audio / +vision+audio, with theeeveeMTP drafter and centroid head)jfan/gemma-4-12b-web-mtp-vision-litert-lm,jfan/gemma-4-26b-web-mtp-vision-litert-lm,jfan/gemma-4-31b-web-mtp-vision-litert-lm
Release notes
0.18.1 (2026-10-15, this commit)
- Bounded in-flight WebGPU prefill command buffers (
RunPendingCommands, $\le 2$ command buffers in flight,command_batch_size = min(128, (16 * 1024) / group_size)) on Emscripten to eliminate browser compositor frame starvation and support mid-prefill cancellation. - Dual
Engine.createLegacyEngine/Engine.createStreamingEmbind and TypeScript SDK compatibility acrossp4headCL 999856454. - Dynamic per-budget vision executor memory release (
280/560/1120tokens) and pre-reserved sequence lengths (qwtzvnkm,putwztvn,mszqroqq). - Repository cleaned to a single runtime set (
wasm/) and a single package tarball (packages/), removing temporarywasm_dev_jank_v*sweep directories.
Earlier 0.18.1 builds (2026-10-09 .. 2026-10-14)
- Windowed
[MTP_TELEMETRY]/[DECODE_TELEMETRY]decode telemetry, 26B/31B standardized vision adapter support, trailing<end_of_image>causal mask fix. - Minijinja
Chainableundefined-lookup fix and empty-messagesguard in the Gemma 4 chat templates. - Non-blocking thinking-channel KV refill, SWA ring-eviction rewind fallback, MTP token accounting, native GPU profiler.
- Host-parity shader pipeline drain / warm-up at initialization, fused residual norms, in-place ringed uint8 KV reads, batched prefill
ConvGenericwith local-memory dequantization, 4x4 GEMM spatial tiling.
0.18.0 / 0.17.x
- Shared-KV MTP drafter on WebGPU / OpenCL / Metal, centroid decoding, zero-readback draft chaining; multimodal vision (1120-token budget) and audio; streamed loading of >4 GB bundles.
Identity and Version
- Repository
- jfan/litert-lm-web-runtime
- Publisher
- Jess Fan
- Task
- Not stated by the source
- Modality
- Other
- Library
- litert
- Parameters
- Not stated by the source
- Languages
- mtp
- Revision
- 0b1476c2e64a409d96e5611036215d22aebc4574
- First published
- 2026-09-22
- Last updated
- 2026-10-17
Files and Weights
83 files, 1.2 GB in total.
Every file
| File | Type | Size | SHA-256 |
|---|---|---|---|
| README.md | Documentation | 5.3 KB | — |
| packages/litert-lm-core-0.18.1.tgz | Other | 36.5 MB | e3b35c7e34ab |
| wasm/litertlm_wasm.js | Other | 295.2 KB | — |
| wasm/litertlm_wasm.wasm | Other | 23.8 MB | d82c15f119d6 |
| wasm/litertlm_wasm_asyncify_internal.js | Other | 303.0 KB | — |
| wasm/litertlm_wasm_asyncify_internal.wasm | Other | 36.9 MB | 882a7c937a1e |
| wasm/litertlm_wasm_compat.js | Other | 295.5 KB | — |
| wasm/litertlm_wasm_compat.wasm | Other | 23.6 MB | 6de08bf51019 |
| wasm/litertlm_wasm_compat_asyncify_internal.js | Other | 303.2 KB | — |
| wasm/litertlm_wasm_compat_asyncify_internal.wasm | Other | 36.7 MB | 758426fbbeb7 |
| wasm/litertlm_wasm_compat_internal.js | Other | 295.5 KB | — |
| wasm/litertlm_wasm_compat_internal.wasm | Other | 23.6 MB | 6de08bf51019 |
| wasm/litertlm_wasm_internal.js | Other | 295.2 KB | — |
| wasm/litertlm_wasm_internal.wasm | Other | 23.8 MB | d82c15f119d6 |
| wasm/litertlm_wasm_nosimd.js | Other | 303.2 KB | — |
| wasm/litertlm_wasm_nosimd.wasm | Other | 36.7 MB | 758426fbbeb7 |
| wasm/litertlm_wasm_simd.js | Other | 303.0 KB | — |
| wasm/litertlm_wasm_simd.wasm | Other | 36.9 MB | 882a7c937a1e |
| wasm/litertlm_wasm_threaded_nosimd.js | Other | 295.5 KB | — |
| wasm/litertlm_wasm_threaded_nosimd.wasm | Other | 23.6 MB | 6de08bf51019 |
| wasm/litertlm_wasm_threaded_simd.js | Other | 295.2 KB | — |
| wasm/litertlm_wasm_threaded_simd.wasm | Other | 23.8 MB | d82c15f119d6 |
| wasm_dev_flash/litertlm_wasm.js | Other | 295.2 KB | — |
| wasm_dev_flash/litertlm_wasm.wasm | Other | 23.9 MB | 67502a8ab0b9 |
| wasm_dev_flash/litertlm_wasm_asyncify_internal.js | Other | 303.0 KB | — |
| wasm_dev_flash/litertlm_wasm_asyncify_internal.wasm | Other | 37.0 MB | 9c06c4442d84 |
| wasm_dev_flash/litertlm_wasm_compat.js | Other | 295.5 KB | — |
| wasm_dev_flash/litertlm_wasm_compat.wasm | Other | 23.7 MB | b71d40c14783 |
| wasm_dev_flash/litertlm_wasm_compat_asyncify_internal.js | Other | 303.2 KB | — |
| wasm_dev_flash/litertlm_wasm_compat_asyncify_internal.wasm | Other | 36.8 MB | 2ecd647147f2 |
| wasm_dev_flash/litertlm_wasm_compat_internal.js | Other | 295.5 KB | — |
| wasm_dev_flash/litertlm_wasm_compat_internal.wasm | Other | 23.7 MB | b71d40c14783 |
| wasm_dev_flash/litertlm_wasm_internal.js | Other | 295.2 KB | — |
| wasm_dev_flash/litertlm_wasm_internal.wasm | Other | 23.9 MB | 67502a8ab0b9 |
| wasm_dev_flash/litertlm_wasm_nosimd.js | Other | 303.2 KB | — |
| wasm_dev_flash/litertlm_wasm_nosimd.wasm | Other | 36.8 MB | 2ecd647147f2 |
| wasm_dev_flash/litertlm_wasm_simd.js | Other | 303.0 KB | — |
| wasm_dev_flash/litertlm_wasm_simd.wasm | Other | 37.0 MB | 9c06c4442d84 |
| wasm_dev_flash/litertlm_wasm_threaded_nosimd.js | Other | 295.5 KB | — |
| wasm_dev_flash/litertlm_wasm_threaded_nosimd.wasm | Other | 23.7 MB | b71d40c14783 |
| wasm_dev_flash/litertlm_wasm_threaded_simd.js | Other | 295.2 KB | — |
| wasm_dev_flash/litertlm_wasm_threaded_simd.wasm | Other | 23.9 MB | 67502a8ab0b9 |
| wasm_dev_flash_lazy/litertlm_wasm.js | Other | 295.2 KB | — |
| wasm_dev_flash_lazy/litertlm_wasm.wasm | Other | 23.9 MB | 27b06cc20f08 |
| wasm_dev_flash_lazy/litertlm_wasm_asyncify_internal.js | Other | 303.0 KB | — |
| wasm_dev_flash_lazy/litertlm_wasm_asyncify_internal.wasm | Other | 37.0 MB | 95b2c61223cb |
| wasm_dev_flash_lazy/litertlm_wasm_compat.js | Other | 295.5 KB | — |
| wasm_dev_flash_lazy/litertlm_wasm_compat.wasm | Other | 23.7 MB | e5c91e3dbf9e |
| wasm_dev_flash_lazy/litertlm_wasm_compat_asyncify_internal.js | Other | 303.2 KB | — |
| wasm_dev_flash_lazy/litertlm_wasm_compat_asyncify_internal.wasm | Other | 36.8 MB | 8107a27a10df |
| wasm_dev_flash_lazy/litertlm_wasm_compat_internal.js | Other | 295.5 KB | — |
| wasm_dev_flash_lazy/litertlm_wasm_compat_internal.wasm | Other | 23.7 MB | e5c91e3dbf9e |
| wasm_dev_flash_lazy/litertlm_wasm_internal.js | Other | 295.2 KB | — |
| wasm_dev_flash_lazy/litertlm_wasm_internal.wasm | Other | 23.9 MB | 27b06cc20f08 |
| wasm_dev_flash_lazy/litertlm_wasm_nosimd.js | Other | 303.2 KB | — |
| wasm_dev_flash_lazy/litertlm_wasm_nosimd.wasm | Other | 36.8 MB | 8107a27a10df |
| wasm_dev_flash_lazy/litertlm_wasm_simd.js | Other | 303.0 KB | — |
| wasm_dev_flash_lazy/litertlm_wasm_simd.wasm | Other | 37.0 MB | 95b2c61223cb |
| wasm_dev_flash_lazy/litertlm_wasm_threaded_nosimd.js | Other | 295.5 KB | — |
| wasm_dev_flash_lazy/litertlm_wasm_threaded_nosimd.wasm | Other | 23.7 MB | e5c91e3dbf9e |
| wasm_dev_flash_lazy/litertlm_wasm_threaded_simd.js | Other | 295.2 KB | — |
| wasm_dev_flash_lazy/litertlm_wasm_threaded_simd.wasm | Other | 23.9 MB | 27b06cc20f08 |
| wasm_dev_flash_rows2/litertlm_wasm.js | Other | 295.2 KB | — |
| wasm_dev_flash_rows2/litertlm_wasm.wasm | Other | 23.9 MB | fd48d3e29a89 |
| wasm_dev_flash_rows2/litertlm_wasm_asyncify_internal.js | Other | 303.0 KB | — |
| wasm_dev_flash_rows2/litertlm_wasm_asyncify_internal.wasm | Other | 37.0 MB | 54ffe45a4168 |
| wasm_dev_flash_rows2/litertlm_wasm_compat.js | Other | 295.5 KB | — |
| wasm_dev_flash_rows2/litertlm_wasm_compat.wasm | Other | 23.7 MB | 8d86be8810ef |
| wasm_dev_flash_rows2/litertlm_wasm_compat_asyncify_internal.js | Other | 303.2 KB | — |
| wasm_dev_flash_rows2/litertlm_wasm_compat_asyncify_internal.wasm | Other | 36.8 MB | 6c9f283aafaa |
| wasm_dev_flash_rows2/litertlm_wasm_compat_internal.js | Other | 295.5 KB | — |
| wasm_dev_flash_rows2/litertlm_wasm_compat_internal.wasm | Other | 23.7 MB | 8d86be8810ef |
| wasm_dev_flash_rows2/litertlm_wasm_internal.js | Other | 295.2 KB | — |
| wasm_dev_flash_rows2/litertlm_wasm_internal.wasm | Other | 23.9 MB | fd48d3e29a89 |
| wasm_dev_flash_rows2/litertlm_wasm_nosimd.js | Other | 303.2 KB | — |
| wasm_dev_flash_rows2/litertlm_wasm_nosimd.wasm | Other | 36.8 MB | 6c9f283aafaa |
| wasm_dev_flash_rows2/litertlm_wasm_simd.js | Other | 303.0 KB | — |
| wasm_dev_flash_rows2/litertlm_wasm_simd.wasm | Other | 37.0 MB | 54ffe45a4168 |
| wasm_dev_flash_rows2/litertlm_wasm_threaded_nosimd.js | Other | 295.5 KB | — |
| wasm_dev_flash_rows2/litertlm_wasm_threaded_nosimd.wasm | Other | 23.7 MB | 8d86be8810ef |
| wasm_dev_flash_rows2/litertlm_wasm_threaded_simd.js | Other | 295.2 KB | — |
| wasm_dev_flash_rows2/litertlm_wasm_threaded_simd.wasm | Other | 23.9 MB | fd48d3e29a89 |
| .gitattributes | Repository | 1.5 KB | — |
License and Download
- License
- apache-2.0
- Access
- Open weights, no gate
Released by Jess Fan through its official repository on Hugging Face. Read the license.
Questions About litert-lm-web-runtime
Can I use litert-lm-web-runtime commercially?
Yes. litert-lm-web-runtime is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.