Developers

I have
with
1

Run a recommended model on your Mac

Qwen 3.8 27B Mirai-M

Best fit
trymirai/Qwen3.8-27B-M
Size
15.6 GB
Memory
15.7 GB
Output
106 tok/s
Run it in Terminal
brew install miraimirai --model trymirai/Qwen3.8-27B-M
2

Compare uzu with other engines for this model

106 tok/s

higher is better ↑

1259 tok/s

higher is better ↑

15.66 GB

lower is better ↓

Speculative decodingQwen 3.8 27B · Mirai-M · Apple M5 Max 128GBHow it works ↗
benchmarks-mixture
106 tok/s
61 tok/s
43 tok/s
116 tok/s
uzuMTPLXoMLXSplash
Quantization qualityQwen 3.8 27BLearn more ↗
Mirai-M
MiraiUnsloth / llama.cppMLXMTPLX↑ KL divergence, log · → checkpoint size, GB
Mirai-M · 4-bitMirai-L · 8-bit, below the noise floor of this test
3

Integrate this model with SDK

1 · Choose a framework
2 · Install
https://github.com/trymirai/uzu
3 · Download the model and stream a reply
import Foundationimport Uzu public func runChat() async throws {    let engineConfig = EngineConfig.create()    let engine = try await Engine.create(config: engineConfig)        guard let model = try await engine.model(identifier: "trymirai/Qwen3.8-27B-M") else {        return    }    for try await update in try await engine.download(model: model).iterator() {        print(String(format: "\r\u{001B}[2KDownload progress: %.2f%%", update.progress() * 100), terminator: "")        fflush(stdout)    }    print()        let messages = [        ChatMessage.system().withText(text: "You are a helpful assistant"),        ChatMessage.user().withText(text: "Tell me a short, funny story about a robot")    ]    let session = try await engine.chat(model: model, config: .create())    let stream = await session.replyWithStream(input: messages, config: .create())    var message: ChatMessage? = nil    for try await update in stream.iterator() {        switch update {        case .replies(let replies):            let reply = replies.last            message = reply?.message            print("Generated tokens: \(reply?.stats.tokensCountOutput ?? 0)")        case .error(let error):            print("Error: \(error)")        case .toolResults:            break        }    }    print("Reasoning: \(message?.reasoning() ?? "empty")")    print("Text: \(message?.text() ?? "empty")")} 
4

Try this model in the Mac app

New chat
Mirai for Mac
Chat, agents and models. Everything runs on your Mac.
v0.6.7macOS 26+Apple siliconCLI included
Download for Mac
orbrew install mirai
Mirai for Mac preview
5

Run a coding agent on this model

1 · Start the server
mirai server --model trymirai/Qwen3.8-27B-M# OpenAI-compatible API on http://127.0.0.1:8000/v1
POST /v1/chat/completionsGET /v1/modelsno API keyChange host or port with --host and --port.
2 · Point your agent at it
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
~/.pi/agent/models.json
{  "providers": {    "mirai": {      "baseUrl": "http://127.0.0.1:8000/v1",      "api": "openai-completions",      "apiKey": "none",      "compat": { "supportsDeveloperRole": false, "supportsReasoningEffort": false },      "models": [        { "id": "trymirai/Qwen3.8-27B-M", "name": "Qwen3.8-27B-M (local)", "reasoning": true, "contextWindow": 32768, "maxTokens": 8192 }      ]    }  }}
3 · Start it
pi --provider mirai --model trymirai/Qwen3.8-27B-M

Any agent that speaks the OpenAI API works the same way: base URL, any key, the model id above.

6

More from Mirai Labs

7

Talk to us