mlx-community/LFM2-1.2B-8bit

Run locally on Apple devices with Mirai

Type
local
From
LiquidAI
Quantization
MLX 8-bit
Parameters
1.2B
Size
1.2 GB
Source
Hugging Face

An 8-bit quantized version of LiquidAI's LFM2-1.2B, converted to Apple's MLX format for efficient on-device inference on Apple Silicon hardware. This community conversion makes it straightforward to run a capable small language model locally on Mac devices with minimal memory overhead.

Origin & Architecture

LFM2-1.2B is developed by Liquid AI as part of their LFM2 model family, designed specifically for edge deployment. The model sits at 1.2 billion parameters — compact enough for resource-constrained environments while still delivering solid text generation quality. The 8-bit quantization further reduces the memory footprint, making it well-suited for local inference without a dedicated GPU server.

Multilingual Support

Despite its small size, LFM2-1.2B supports eight languages: English, Arabic, Chinese, French, German, Japanese, Korean, and Spanish — offering broad multilingual text generation capabilities in an edge-friendly package.

Key Highlights

  • MLX-native: Converted using `mlx-lm` v0.26.0, optimized for Apple's MLX framework and Apple Silicon (M1/M2/M3/M4)
  • 8-bit quantization: Reduced precision for faster inference and lower memory usage with minimal quality loss
  • Edge-focused: Designed by Liquid AI for deployment scenarios where compute and memory are limited
  • Chat-ready: Includes a chat template, enabling conversational use out of the box via `mlx-lm`

Use Cases

This model is a strong fit for local chatbots, on-device assistants, multilingual text generation, and prototyping applications where privacy, latency, or offline capability matter. Its small size and quantized format make it one of the more accessible options for developers building directly on Mac hardware.

Base model: LiquidAI/LFM2-1.2B License: LFM 1.0 (custom)

Explore all local models
1
Choose framework
2
Run the following command to install Mirai SDK
spm https://github.com/trymirai/uzu.git
3
Apply code
1import Uzu23public func runChat() async throws {4    let engineConfig = EngineConfig.create()5    let engine = try await Engine.create(config: engineConfig)67    guard let model = try await engine.model(identifier: "mlx-community/LFM2-1.2B-8bit") else {8        return9    }10    for try await update in try await engine.download(model: model).iterator() {11        print("Download progress: \(update.progress())")12    }1314    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? = nil21    for try await update in stream.iterator() {22        switch update {23        case .replies(let replies):24            message = replies.last?.message25        case .error(let error):26            print("Error: \(error)")27        }28    }29    print("Text: \(message?.text() ?? "empty")")30}

Other local models from LiquidAI