Vendor
Google
Parameters
4B
Size
7.3 GB
$ brew install mirai$ mirai --model google/gemma-3-4b-it

Benchmarks

0.74 s

How long until the model starts responding

lower is better

57 t/s

The speed at which text appears on screen

higher is better

7.83 GB

RAM the model uses while running

lower is better

uzu0.5.14MLX0.31.2llama.cpp0.3.23/1,343 input tokens/328 output tokens

Benchmarked 7 Aug 2026

Integrate with SDK

1
Choose framework
2
Run the following command to install Mirai SDK
https://github.com/trymirai/uzu-swift
3
Apply code
1import Foundation2import Uzu34public 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        return10    }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? = nil24    for try await update in stream.iterator() {25        switch update {26        case .replies(let replies):27            let reply = replies.last28            message = reply?.message29            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

Gemma 3 4B IT is a lightweight, instruction-tuned multimodal model from Google, part of the Gemma 3 family built on the same research and technology behind Google's Gemini models. Despite its compact 4-billion parameter size, it handles both text and image inputs and generates text output — making it a versatile choice for resource-constrained deployments.

Key Capabilities

This instruction-tuned variant is designed for interactive and task-oriented use cases, including:

  • Question answering and conversational AI
  • Summarization and content generation
  • Reasoning over text and images
  • Multilingual tasks across 140+ supported languages

Architecture Highlights

Gemma 3 4B IT features a generous 128K token context window, enabling it to process long documents, extended conversations, and detailed image-text interactions in a single pass. Its multimodal design accepts both text and image input natively, broadening its applicability beyond text-only models in the same size class.

Deployment & Accessibility

At 4 billion parameters, this model is specifically positioned for environments where compute is limited — laptops, desktops, edge devices, or modest cloud infrastructure. It brings state-of-the-art capabilities to settings where larger models would be impractical, making it an excellent option for developers and researchers seeking high-quality results without heavy hardware requirements.

Provenance

Gemma 3 4B IT is developed by Google and released with open weights. It is the instruction-tuned counterpart to the pre-trained Gemma 3 4B base model, fine-tuned to follow instructions and engage in structured dialogue out of the box.

Explore all local models