In development

Elix Apple-Native Inference Engine

A Mac-native on-device inference engine — built on MLX and tuned by MacPaw Research with custom speculative decoding, KV-cache strategies, and quantization.

  • Mac-native
  • MLX-based
  • Speculative decoding
  • On-device

How Elix works

Four pieces that make the Mac a first-class place to run a model.

Built for speed

On-device intelligence only wins if it feels instant. Elix is engineered so every interaction stays snappy — fast is the feature.

The gap Elix fills

Three families of tools power AI on the Mac today. Each one leaves a real gap in efficiency, control, or both.

Composable pipelines

Define AI pipelines the way you write SwiftUI — declarative, native Swift. The compiler lowers your intent into a parallelized execution graph.

struct ChatTurn: Pipeline {
    typealias Output = String

    @State var message: String
    @State var context: String = ""

    var body: some Pipeline {
        Guardrail(rules: [.politics, .pii])
        $context.set {
            Model(instructions: "Summarize history", input: $message)
        }
        Model(instructions: "Reply using context", input: $context)
    }
}

// Compile once, then run on the engine.
let graph = PipelineCompiler(optimizations: [.parallelize])
    .compile(ChatTurn(message: "hello").pipelineGraph)
let reply = try await engine.run(graph: graph)
  • Intent, not infrastructure

    Swift structs with @State and native control flow, composing Model, Guardrail, ForEach, and ClientTask — no YAML, no wiring.

  • Parallel by construction

    The compiler analyses @State reads and writes and batches independent branches automatically — concurrency for free.

  • Compile once, run anywhere

    The Codable graph runs in-process on iOS, across XPC on macOS, or in a test simulator — same pipeline, every target.

Four stages, one pipeline

Every pipeline travels the same path — Swift source to executed graph. A Codable AST is the transport boundary, so the same code runs anywhere.

  1. 01

    DSL

    Swift authoring with @PipelineBuilder, @State, Model, and Guardrail.

  2. 02

    AST

    A Codable PipelineGraph — the transport boundary across XPC.

  3. 03

    Compiler

    Hazard analysis parallelizes independent branches.

  4. 04

    Executor

    Deterministic walk, parallel batching, prefix-skip on re-runs.

Tuned for the Mac

Elix doesn't just run on Apple silicon — it's tuned for it. Every layer of the engine is optimized per chip, and every gain is verified on real Macs.

Custom kernels — decode speedup vs. stock MLX
Stock MLX +10% +20% +30%
M2 89 → 106 tok/s +19%
M2 Pro 156 → 183 tok/s +17%
M3 Ultra 406 → 521 tok/s +28%
M4 Pro 222 → 285 tok/s +28%

Custom Metal kernels — one of Elix's optimization tracks. LFM2.5-1.2B (4-bit), averaged over 1k–16k contexts, each chip vs. its own stock baseline.

  • Metal kernels Custom GPU kernels for Apple silicon
  • Speculative decoding Faster generation, identical output
  • Quantization 4-bit weights and caches, near-full quality
  • MoE optimization Efficient expert dispatch on Apple GPUs
  • LoRA adapters Merged and retrieved on demand
  • Cache reuse Attention caches persist across turns
  • Per-chip tuning The fastest configuration for each Mac

The client/runtime boundary

The runtime never opens files, holds secrets, or calls your APIs. Every side effect runs in a ClientTask on the client — same shape on macOS and iOS.

// Pipelines declare intent; ClientTasks own the outside world.
ClientTask(
    input: query,
    action: { encodedQuery in
        // Runs in the client process — full access to
        // keychain, entitlements, UI, file system, network.
        let token  = try Keychain.read("calendar-api-token")
        let result = try await CalendarAPI(token: token).search(encodedQuery)
        return try JSONEncoder().encode(result)
    }
)
  • Permissions stay with the app

    Keychain, file access, entitlements, OAuth — all in the client process. The macOS agent holds no secrets.

  • Out-of-process on macOS

    One launch agent (ElixAgent) serves many client apps over XPC — clients send a graph; it compiles, runs, and calls back.

  • Embedded on iOS

    On iOS the same runtime embeds in-process — identical pipeline code, no platform branches or conditional compilation.

Adapter Store

A growing library of LoRA-style adapters that turns one base model into many. Drop them in by hand, or let Elix dynamically fuse the best-fit set for each query at inference time.

+ many more, with new ones shipped continuously

Compared with the alternatives

Elix sits in the gap between "ship to a remote API" and "wire up your own runtime." It's built to complement Apple Foundation Models — not replace them — adding Mac-tuned inference, adapters, and composable pipelines on top.

ElixCloud LLM APIsGeneric on-deviceApple Foundation Models
Stays on device by default
Mac-native (MLX)
Tuned inference (spec. decoding, KV-cache)
Bespoke partner models
Adapter store / fine-tuning
Composable pipelines (SDK)
Production packaging for Mac apps
Cost per query at scale$0$$$0$0
Open / extensible

What you can build with Elix

Patterns Elix is built for.

Whitepaper

Read the full architecture

Composable AI Pipelines: Write Intent, Not Infrastructure — by Maksym Kotliar. Covers the DSL, the PipelineGraph AST, the compiler's hazard analysis, epoch-based re-execution, the XPC contract, and the open-source plan.

Read the whitepaper

Build with Elix

Working on a Mac product that needs on-device intelligence? Talk to us about partnership, adapter requests, or early access.

Talk to the team
Next platform component

Mnemos

Long-term memory for agents — Swift-native, on-device, contradiction-free.