1. Initialise LFM2.5-VL-450M locally
2. Choose an image, procedural scene, upload, or webcam frame
Active input: Évora Street (CC BY 2.0)
Initialise LFM2.5-VL-450M above, then ask a visual question.
See inside — hybrid Conv+GQA backbone & NaFlex vision tokens
Instead of a pure Transformer decoder, Lfm2VlForConditionalGeneration pairs a
SigLIP2 NaFlex 86M encoder (preserving native aspect ratios up to
512×512 with 2×2 pixel-unshuffle downsampling into 64–256 image tokens) with a 16-layer
LFM2.5-350M decoder mixing 10 gated short-convolution blocks and 6 grouped-query
full-attention layers (16 Q heads, 8 KV heads). On CPU WASM, keeping embed_tokens
at fp32 avoids an ONNX Runtime GatherBlockQuantized crash while
quantizing vision to q8 and the decoder to q4.
16-Layer LFM2.5-350M Decoder Topology (from config.json)
Applied ChatML Template
Run inference to inspect the exact LFM2.5-VL ChatML prompt sent to processor.apply_chat_template().
ONNX Weight Breakdown (CPU WASM vs WebGPU)
| Component | WASM (~642.1 MB) | WebGPU (~319.2 MB) |
|---|---|---|
| embed_tokens | fp32 · 268.44 MB | q4f16 · 38.80 MB |
| vision_encoder | q8 · 110.06 MB | q4f16 · 55.52 MB |
| decoder_model_merged | q4 · 260.27 MB | q4f16 · 221.60 MB |
| tokenizer + configs | 3.31 MB | 3.31 MB |
Use-case ladder — go deeper with LFM2.5-VL-450M
Visual Prompting & Task-Framing Lab
Compare Caption, OCR Readout, Structured JSON Extract, and Custom VQA on the same image with live token timings and code inspection.
PracticalWCAG Accessibility Alt-Text Studio
Batch-audit photos and uploads to draft concise ≤125-char alt text, long descriptions, visible-text notes, and export .md / .json reports.
WildProcedural Scene & Sign Interrogator
Customize live road signs, café receipts, bar charts, or hand-drawn doodles on Canvas 2D and run multi-turn visual Q&A with a live token sparkline.
Multi-modelSpoken Visual Audio Describer
Chain LFM2.5-VL-450M with Kokoro-82M TTS locally to turn any photograph or scene into playable, downloadable spoken audio description.
Model reference
| Upstream Model | LiquidAI/LFM2.5-VL-450M (license lfm1.0 — LiquidAI Open License) |
|---|---|
| Browser ONNX Repo | onnx-community/LFM2.5-VL-450M-ONNX |
| Task & Architecture | image-text-to-text · Lfm2VlForConditionalGeneration (SigLIP2 NaFlex 86M + LFM2.5-350M hybrid decoder, 32k context, 9 languages) |
| Runtime Pin | @huggingface/transformers@4.3.0 local escape hatch in worker.js |
| Backend & Quantization | WebGPU q4f16 (~319.2 MB, requires shader-f16) or CPU WASM embed:fp32 · vision:q8 · decoder:q4 (~642.1 MB) |