LFM2.5 is a new family of hybrid models designed for on-device deployment. It builds on the LFM2 architecture with extended pre-training and reinforcement learning.
Quantized embedding and q4 weights with FP16 runtime and caches
FP16
~2.1 GB
WebGPU, Server
Higher quality
Q8
~2.1 GB
Server only
Balance of quality and size
WebGPU: Use Q4, Q4F16, or FP16 (Q8 is not supported on WebGPU).
Server (CPU/GPU): All variants supported.
Q4 and Q4F16 use a quantized input embedding. Q4F16 uses FP16 runtime tensors and caches while quantizing the LM head and decoder linear weights to q4.
1from huggingface_hub import hf_hub_download
23model_id ="LiquidAI/LFM2.5-2.6B-ONNX"4# Q8 recommended for server CPU/GPU; use model_q4.onnx for WebGPU.5hf_hub_download(model_id,"onnx/model_q8.onnx")6hf_hub_download(model_id,"onnx/model_q8.onnx_data")
WebGPU (Transformers.js)
js
1import{ pipeline }from"@huggingface/transformers";23const generator =awaitpipeline("text-generation","LiquidAI/LFM2.5-2.6B-ONNX",{4device:"webgpu",5dtype:"q4",// or "q4f16" or "fp16"6});