LFM 2.5-350M β 4-bit (Q4_0) for the pure-WASM engine
A 4-bit quantized build of LiquidAI's LFM 2.5-350M text model, packaged for the lfm-wasm inference engine β a pure WebAssembly runtime with no native code, no server, and no network at inference time. Everything runs in the browser.
β οΈ Custom format. These files are not GGUF, safetensors, or PyTorch weights. They are consumed directly by the companion
lfm-wasmengine in this repo. Do not load them withtransformers/llama.cpp.π Live demo: https://celsowm.github.io/lfm-wasm/ β the model runs entirely in your browser (fetched from this repo at runtime).
Files
| File | Size | Description |
|---|---|---|
model_q4_0.bin |
~272 MB | Quantized weights + model header, Q4_0 (4-bit) packed. |
vocab.json |
~0.7 MB | Byte-level BPE vocabulary: a JSON array of token strings. |
merges.json |
~1.1 MB | BPE merge rules: a JSON array of [left, right] pairs. |
README.md |
β | This card. |
Using it
The files are fetched by the web playground at runtime:
const [model, vocab, merges] = await Promise.all([
fetch("/model_q4_0.bin"),
fetch("/vocab.json"),
fetch("/merges.json"),
]);
const engine = new LFM2Engine(
new Uint8Array(await model.arrayBuffer()),
await vocab.text(),
await merges.text()
);
Weights are Q4_0 (4-bit block quantization, 32-fp16-scale per 32 weights) with Q8_0 attention projections; inference uses WASM SIMD gemm/gemv kernels. See the source repo for the full engine, tokenizer, and ChatML prompt template.
Provenance
- Base model: LFM 2.5-350M by LiquidAI.
- Quantized locally with the repo's
quantizetool (cargo run --bin quantize) from the original bf16 checkpoint. - No fine-tuning or weight modification beyond quantization.
License
Inherited from the base LFM 2.5 release. See LiquidAI's license terms for LFM 2.5 before use in production.