LiquidAI/LFM2-350M
Run locally on Apple devices with Mirai
- Type
- local
- From
- LiquidAI
- Quantization
- No
- Parameters
- 350M
- Size
- 680.8 MB

LFM2-350M
LFM2-350M is the smallest model in Liquid AI's second-generation LFM2 family, a series of hybrid language models purpose-built for edge AI and on-device deployment. With roughly 354 million parameters, it delivers a compelling balance of quality, speed, and memory efficiency for resource-constrained environments.
Architecture & Training
LFM2-350M introduces a novel hybrid architecture combining multiplicative gates and short convolutions — specifically 10 double-gated short-range LIV convolution blocks and 6 grouped query attention (GQA) blocks across 16 layers. It supports a 32,768-token context window with a 65,536-token vocabulary in bfloat16 precision.
The model was trained on 10 trillion tokens (approximately 75% English, 20% multilingual, 5% code) using knowledge distillation from LFM1-7B, large-scale supervised fine-tuning, custom DPO with length normalization, and iterative model merging. It supports eight languages: English, Arabic, Chinese, French, German, Japanese, Korean, and Spanish.
Performance
LFM2 models outperform similarly sized competitors across knowledge, math, instruction following, and multilingual benchmarks. The family also achieves up to 2× faster decode and prefill on CPU compared to Qwen3.



Inference throughput comparisons demonstrate strong performance across CPU runtimes:


Best Use Cases
Due to its compact size, Liquid AI recommends fine-tuning LFM2-350M on narrow tasks for best results. It is well suited for agentic workflows, data extraction, RAG pipelines, creative writing, and multi-turn conversations. It also supports structured tool use via JSON function definitions. Deployment is flexible across CPU, GPU, and NPU hardware — ideal for smartphones, laptops, and vehicles.
Compatible with Hugging Face Transformers (v4.55+), vLLM, and llama.cpp via GGUF. Licensed under LFM Open License v1.0.
spm https://github.com/trymirai/uzu.git
| 1 | import Uzu |
| 2 | |
| 3 | public func runChat() async throws { |
| 4 | let engineConfig = EngineConfig.create() |
| 5 | let engine = try await Engine.create(config: engineConfig) |
| 6 | |
| 7 | guard let model = try await engine.model(identifier: "LiquidAI/LFM2-350M") else { |
| 8 | return |
| 9 | } |
| 10 | for try await update in try await engine.download(model: model).iterator() { |
| 11 | print("Download progress: \(update.progress())") |
| 12 | } |
| 13 | |
| 14 | let messages = [ |
| 15 | ChatMessage.system().withText(text: "You are a helpful assistant"), |
| 16 | ChatMessage.user().withText(text: "Tell me a short, funny story about a robot") |
| 17 | ] |
| 18 | let session = try await engine.chat(model: model, config: .create()) |
| 19 | let stream = await session.replyWithStream(input: messages, config: .create()) |
| 20 | var message: ChatMessage? = nil |
| 21 | for try await update in stream.iterator() { |
| 22 | switch update { |
| 23 | case .replies(let replies): |
| 24 | message = replies.last?.message |
| 25 | case .error(let error): |
| 26 | print("Error: \(error)") |
| 27 | } |
| 28 | } |
| 29 | print("Text: \(message?.text() ?? "empty")") |
| 30 | } |