mlx-community/LFM2-1.2B-4bit

Run locally on Apple devices with Mirai

Type
local
From
LiquidAI
Quantization
MLX 4-bit
Parameters
1.2B
Size
632.8 MB
Source
Hugging Face

A 4-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 was produced using `mlx-lm` v0.26.0.

Origin & Architecture

LFM2-1.2B is developed by Liquid AI as part of their LFM2 (Liquid Foundation Model 2) family. Designed specifically for edge deployment, the 1.2-billion-parameter model delivers capable text generation in a compact footprint. The 4-bit quantization further reduces memory requirements, making it well-suited for local inference on MacBooks and other Apple Silicon devices without requiring cloud resources.

Multilingual Support

The model supports eight languages out of the box: English, Arabic, Chinese, French, German, Japanese, Korean, and Spanish — giving it broad multilingual coverage despite its small size.

Key Highlights

  • Edge-optimized: Built from the ground up for low-resource environments, balancing quality and efficiency at 1.2B parameters.
  • 4-bit quantization: Significantly reduced memory usage compared to full-precision weights, enabling fast inference on consumer hardware.
  • MLX-native: Runs through the `mlx-lm` library, taking full advantage of Apple's MLX framework for unified memory and GPU acceleration on M-series chips.
  • Chat-ready: Includes a chat template, supporting conversational use cases directly.

Use Cases

LFM2-1.2B-4bit is a strong choice for developers building local AI-powered applications on macOS — including chatbots, writing assistants, multilingual text generation, and lightweight reasoning tasks — where privacy, latency, and offline capability matter more than peak benchmark performance.

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

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-4bit") 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