Skip to content
Andrew Voirol
WorkLogAboutContact
HomeWorkLog

AboutContact

✦ Just one prompt away from figuring it all out.

Work → Edge AI Lab
On-device AILive

Edge AI Lab

Research-grade on-device Gemma 4 inference for macOS and iOS — three backends, custom eval framework, and not a single byte to the cloud.

Gemma 4 family · macOS & iOS · 3 inference backends · 0 cloud

Started Jun 8, 2026·Updated Jul 22, 2026
View Source
Edge AI Lab welcome screen with model sidebar, 200+ conversations, HuggingFace community model browser, and quick-start actions

Model gallery, HuggingFace search, 200+ conversation threads, and quick-start actions — a research instrument that happens to look good.


Performance Dashboard showing decode speed trends across 12+ model variants over 5 weeks, with 169 benchmark runs and memory usage timeline
Evaluation Runner with 9 built-in suites including Math, Reasoning, Tool Calling, Code Generation, and Long Context, showing 92 past runs

A fully-featured macOS and iOS app that runs Google's Gemma 4 model family entirely on-device — from the 2B MoE to the 12B Dense — using three inference backends: LiteRT-LM, MLX, and llama.cpp. No API keys, no cloud round-trips, no demo mode. E2B Standard hits 100.7 tok/s on M4 Max. The 12B Dense runs at 0.57 tok/s, and that number is in the export because Edge AI Lab doesn't hide unflattering results.

Why this exists

LM Studio, Ollama, and Jan all answer "can I run LLMs locally?" with gray terminal windows and opaque settings. Edge AI Lab asks a sharper question: how well does Gemma 4 run on your specific hardware, with settings you can reproduce? And it answers with an app that treats on-device AI as a first-class platform citizen — a curated "Dark Forest" design system, per-capability iconography, accessibility-first animation tokens, and benchmark cards you can share like GeekBench scores.

What it does

FeatureDescription
Three inference backendsLiteRT-LM, MLX (Metal-native), and GGUF (llama.cpp) behind a unified protocol
Eval framework4 built-in suites (Math, Tool Calling, Reasoning, Multimodal), custom suite editor, batch "Run All" with time estimation
Tool calling6 on-device tools (calculator, date/time, device info, unit converter, text analyzer, system health) the model invokes autonomously
Agent modeFuzzy termination, retry logic, structured error classification — the model as an instrument, not just a chatbot
Paste & Go importsPaste a HuggingFace or Kaggle URL → app infers capabilities → downloads → inference. ⌘I on macOS
Deep benchmarkingPer-token latency distributions, P95 metrics, TTFT, memory deltas, thermal state tracking
MCP server supportConnect external tool servers via stdio JSON-RPC
iOS parityFull-featured iOS app: conversation history, eval export, model hub with pause/resume downloads

The numbers

Measured on MacBook Pro (M4 Max, 36 GB RAM), macOS 26.0:

ModelBackendDecode SpeedTTFTP95 Latency
E2B StandardGPU (Metal)100.7 tok/s0.143s16.7 ms
E4B WebGPU (Metal)53.5 tok/s1.403s16.1 ms
12B DenseGPU (Metal)0.57 tok/s9.351s1716.7 ms

Under the hood

102 Swift source files. 123 test files. 2,000+ tests. 4 CI jobs. The protocol-based engine architecture (InstrumentedEngineProtocol) means the entire test suite runs against mock engines — no real model needed for CI. Swift 6 concurrency throughout: @Observable, async/await, Sendable, @MainActor.

iOSLiteRT-LMGemma 4Apple SiliconDesignBenchmarks

Related Threads

Edge AI Lab: On-Device Gemma from Zero to Three Engines

Building a research-grade macOS and iOS app for on-device Gemma 4 inference — three backends (LiteRT-LM, MLX, llama.cpp), a custom eval framework, tool calling, and a design system that refuses to look like every other local AI app.


Andrew Voirol

Builder, hacker, shipper. Currently leaving localhost.

Navigate

WorkBuilder’s LogAboutContactRSS Feed

Connect

X / TwitterGitHubLinkedIn

© 2026 Andrew Voirol✦Just one prompt away from figuring it all out.