StackMap
Subscribe
Explore / uzu
trymirai

uzu

Rust inference engine for on-device AI on Apple Silicon (Metal, unified memory) with Swift, Python and TS bindings, OpenAI-compatible server and a TypeSafe System One decision-model API.

3,223 221 Rust MITupdated yesterday
View on GitHubDispute this mapping →
Curator's take

Pick it when you are shipping an iOS/macOS app and want a local LLM embedded in-process — Swift Package, structured output, tool calls, and a cloud fallback through the same API. Not for NVIDIA/Linux serving (Metal and CPU only) or bring-your-own GGUF: models need its own format, converted with lalamo.

Mapped by ShipWithAI editors · links verified

Continue your stack

What teams reach for next — and why each earns a place beside uzu. Ranked by curator confidence.

alternativealternativealternativealternativealternativecoreai-modelsxybridstrands-deciderOllamaStratauzu
pairs wellalternativebuilt withpick a node for the why · open it from the panel
Weekly digest
README.md1 min read

Mirai

Discord Contact us Read docs License Build Python Package Python TypeScript Package Downloads Swift SPM Platforms Swift

uzu

A high-performance inference engine for AI models. It allows you to deploy AI directly in your app with zero latency, full data privacy, and no inference costs. Key features:

  • Simple, high-level API
  • Unified model configurations, making it easy to add support for new models
  • Traceable computations to ensure correctness against the source-of-truth implementation
  • Utilizes unified memory on Apple devices
  • Broad model support

Quick Start

Rust

Add the dependency:

[dependencies]
uzu = { git = "https://github.com/trymirai/uzu", branch = "main", package = "uzu" }

Run the code below:

use std::io::{self, Write};

use uzu::{
    engine::{Engine, EngineConfig},
    types::session::chat::{ChatConfig, ChatMessage, ChatReplyConfig},
};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let engine_config = EngineConfig::default();
    let engine = Engine::new(engine_config).await?;

    let model = engine.model("alibaba:qwen3.5:0.8b:mirai:mirai-m:4".to_string()).await?.ok_or("Model not found")?;
    let downloader = engine.download(&model).await?;
    while let Some(update) = downloader.next().await {
        print!("\r\u{001B}[2KDownload progress: {:.2}%", update.progress() * 100.0);
        io::stdout().flush()?;
    }
    println!();

    let session = engine.chat(model, ChatConfig::default()).await?;

    let messages = vec![
        ChatMessage::system().with_text("You are a helpful assistant".to_string()),
        ChatMessage::user().with_text("Tell me a short, funny story about a robot".to_string()),
    ];

    let replies = session.reply(messages, ChatReplyConfig::default()).await?;
    if let Some(reply) = replies.last() {
        println!("Reasoning: {}", reply.message.reasoning().unwrap_or_default());
        println!("Text: {}", reply.message.text().unwrap_or_default());
    }

    Ok(())
}
Python

Add the dependency:

uv add uzu==0.6.17

Run the code below:

import asyncio

from