mlx-community/LFM2-700M-4bit
Run locally on Apple devices with Mirai
- Type
- local
- From
- LiquidAI
- Quantization
- MLX 4-bit
- Parameters
- 700M
- Size
- 403.2 MB
A 4-bit quantized version of LiquidAI's LFM2-700M, converted to Apple's MLX format for efficient on-device inference on Apple Silicon hardware. This community conversion was produced using `mlx-lm` v0.26.0.
Origin & Architecture
LFM2-700M is part of Liquid AI's second-generation Liquid Foundation Model family, designed specifically for edge deployment. At 700 million parameters, the model sits in the compact tier — well-suited for resource-constrained environments — while still delivering capable text generation. The 4-bit quantization further reduces memory footprint and accelerates inference on Mac devices without requiring a discrete GPU.
Multilingual Support
Despite its small size, LFM2-700M supports eight languages: English, Arabic, Chinese, French, German, Japanese, Korean, and Spanish — making it a versatile choice for multilingual edge applications.
Key Highlights
- Architecture: Liquid Foundation Model v2 (LFM2), a proprietary architecture from Liquid AI
- Quantization: 4-bit, optimized for Apple MLX runtime
- Task: General-purpose text generation with chat template support
- Base model: LiquidAI/LFM2-700M
Best For
This model is ideal for developers building on-device AI experiences on Apple Silicon Macs — chatbots, writing assistants, local language tools, or any scenario where low latency and privacy matter. Its small parameter count and aggressive quantization make it one of the lightest options available for local multilingual text generation via the MLX ecosystem.
Licensing
LFM2-700M-4bit is released under Liquid AI's LFM 1.0 license. Users should review the license terms for permitted use cases.
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: "mlx-community/LFM2-700M-4bit") 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 | } |