- Vendor
- Quantization
- MLX 8-bit
- Parameters
- 4B
- Size
- 3.9 GB
$ brew install mirai$ mirai --model mlx-community/gemma-3-4b-it-8bitBenchmarks
Gemma-3
Apple M4 Max 128GB
0.78 s
lower is better ↓
Gemma-3
Apple M4 Max 128GB
92 t/s
higher is better ↑
Gemma-3
Apple M4 Max 128GB
4.42 GB
lower is better ↓
Benchmarked 7 Aug 2026
Integrate with SDK
https://github.com/trymirai/uzu-swift
| 1 | import Foundation |
| 2 | import Uzu |
| 3 | |
| 4 | public func runChat() async throws { |
| 5 | let engineConfig = EngineConfig.create() |
| 6 | let engine = try await Engine.create(config: engineConfig) |
| 7 | |
| 8 | guard let model = try await engine.model(identifier: "alibaba:qwen3.5:0.8b:mirai:mirai-m:4") else { |
| 9 | return |
| 10 | } |
| 11 | for try await update in try await engine.download(model: model).iterator() { |
| 12 | print(String(format: "\r\u{001B}[2KDownload progress: %.2f%%", update.progress() * 100), terminator: "") |
| 13 | fflush(stdout) |
| 14 | } |
| 15 | print() |
| 16 | |
| 17 | let messages = [ |
| 18 | ChatMessage.system().withText(text: "You are a helpful assistant"), |
| 19 | ChatMessage.user().withText(text: "Tell me a short, funny story about a robot") |
| 20 | ] |
| 21 | let session = try await engine.chat(model: model, config: .create()) |
| 22 | let stream = await session.replyWithStream(input: messages, config: .create()) |
| 23 | var message: ChatMessage? = nil |
| 24 | for try await update in stream.iterator() { |
| 25 | switch update { |
| 26 | case .replies(let replies): |
| 27 | let reply = replies.last |
| 28 | message = reply?.message |
| 29 | print("Generated tokens: \(reply?.stats.tokensCountOutput ?? 0)") |
| 30 | case .error(let error): |
| 31 | print("Error: \(error)") |
| 32 | } |
| 33 | } |
| 34 | print("Reasoning: \(message?.reasoning() ?? "empty")") |
| 35 | print("Text: \(message?.text() ?? "empty")") |
| 36 | } |
| 37 | |
Details
An 8-bit quantized version of Google's Gemma 3 4B Instruct model, converted to the MLX format for efficient inference on Apple Silicon hardware. This community conversion was produced using `mlx-vlm` and is based on the official `google/gemma-3-4b-it` release.
Overview
Gemma 3 4B IT is a compact, instruction-tuned language model from Google's Gemma family. It supports multimodal image-text-to-text tasks, meaning it can accept both images and text as input and generate text responses — making it suitable for visual question answering, image captioning, and general conversational use.
The MLX conversion brings this model natively to Apple's MLX framework, enabling fast on-device inference on Mac computers equipped with M-series chips. The 8-bit quantization reduces memory usage compared to the full-precision model while retaining strong output quality.
Key Details
- Base model: Google Gemma 3 4B PT (pretrained), instruction-tuned variant
- Architecture: Gemma 3 (transformer-based, multimodal)
- Quantization: 8-bit (MLX format)
- Pipeline: Image-text-to-text generation
- Framework: MLX / mlx-vlm
- License: Gemma (Google usage license, gated access required)
Use Cases
- Visual understanding: Describe, analyze, or answer questions about images
- Conversational AI: Lightweight instruction-following chat on local hardware
- Edge deployment: Run a capable multimodal model entirely on-device with Apple Silicon, no cloud dependency needed
Notes
This is a community-maintained conversion. For full model documentation, training details, and evaluation benchmarks, refer to the original Gemma 3 4B IT model card. Access requires agreeing to Google's Gemma usage license via Hugging Face.