LiquidONNX
LiquidONNX is the official tool for exporting LFM models to ONNX and running inference.Installation
Supported Models
Export
Inference
Pre-exported Models
Many LFM models are available as pre-exported ONNX packages from LiquidAI and the onnx-community. Check the Model Library for a complete list of available formats.Quantization Options
Each ONNX export includes multiple precision levels. Q4 is recommended for most deployments and supports WebGPU, CPU, and GPU. FP16 offers higher quality and works on WebGPU and GPU. Q8 provides a quality/size balance but is server-only (CPU/GPU). FP32 is the full precision baseline.Hugging Face Spaces
These are fully deployed examples of WebGPU and ONNX inference with LFM models.LFM2 WebGPU Chat
Run LFM2 text models directly in your browser with WebGPU acceleration.
LFM2.5 Audio
Speech-to-text and text-to-speech with LFM2.5 Audio in the browser.
LFM2.5 Vision
Vision-language inference with LFM2.5-VL in the browser.
WebGPU Inference
ONNX models run in browsers via Transformers.js with WebGPU acceleration. This enables fully client-side inference without server infrastructure.Setup
- Install Transformers.js:
- Enable WebGPU in your browser:
- Chrome/Edge: Navigate to
chrome://flags/#enable-unsafe-webgpu, enable, and restart - Verify: Check
chrome://gpufor WebGPU status
- Chrome/Edge: Navigate to
Usage
WebGPU supports Q4 and FP16 precision. Q8 quantization is not available in browser environments.
Python Inference
Install with pip:Full Python example with KV cache
Full Python example with KV cache