DynaMoE

Title screen

Manual

DynaMoE

Frontier AI  On your Mac

Native macOS · Apple Silicon · Local

macOS 26+ · 16 GB+ recommended · Apache 2.0

Download the latest release

or scroll to begin

DynaMoE

The Manual

>4.1 GB/s
NVMe at line rate
2.0–3.5 ×
Faster first token
262k
Context rows, per checkpoint
Local
By default, zero telemetry

Edition 26.12 What changed

  • Subagents that are agents

    A delegated run is a headless agent loop on your loaded checkpoint or a cloud provider, with its own context, tool scope, budget and report.

  • Runs that survive the app

    Every run is written to disk as it goes: transcript, steps, cost and status land in the Subagents inspector, ready to apply or discard.

  • Writers get their own checkout

    A writing run works in a git worktree and returns a diff. Nothing lands until you approve it, and a Stop cannot throw its work away.

Engineered for things other engines can't do.

Three capabilities define DynaMoE: models larger than your memory, a speculative tree decoder built for SSD offload, and a first-class local API.

01

Run models bigger than your RAM

Shards are memory-mapped and only the active experts are pulled off NVMe, straight into unified memory at line rate. A 35B MoE runs on a 16 GB Mac; a 66 GB dense model repacks to 22 GB.

  • Direct pread streaming from 100+ Hugging Face shards, no repack
  • Quantize to Q4 / Q8 turns a 66 GB dense checkpoint into 22 GB
  • Working-set presets: 8 GB, 16 GB or unrestricted
02

JetSpec speculative tree acceleration

Instead of drafting one token at a time, JetSpec drafts a whole candidate tree in a single pass and verifies every node at once with tree-causal attention masking.

  • Parallel tree drafting with tree-causal verification masks
  • Expert-aware MoE pruning that keeps offloaded models fast
  • Speculative KV cache compaction and rollback
  • Zero host-to-device copies on unified memory
03

A local OpenAI & Anthropic server

Flip a switch and DynaMoE serves the loaded model on 127.0.0.1, speaking OpenAI Chat Completions and Anthropic Messages, streaming or not. Images decode on a vision checkpoint.

  • SSE streaming, tools, reasoning, and images on a vision model
  • count_tokens answered by the same planner that runs the turn
  • Models list advertises vision, thinking levels and context length
  • KV-prefix reuse across turns, same 2.0–3.5× TTFT win

A complete local AI workspace.

The rest of the app: a real agent runtime with plan mode, isolated subagents, MCP tools and on-demand skills, cloud models when you opt in, and Metal kernels on unified memory.

Plan mode and real subagents

Plan read-only, or delegate. Runs can be uncapped, and each writer works in a worktree; its diff lands on approval.

Runs that survive the app

Every run is queued by priority and written to disk as it goes; the inspector shows its steps, cost and diff.

External tools over MCP

Servers in mcp.json become agent tools over stdio or HTTP. They load on demand, so an integration costs no prefill until used.

Agent skills & decisions

A SKILL.md advertises one line until the model loads it. SubQ turns a structured question into probabilities and confidence.

Cloud models, when you want them

Register any OpenAI-compatible endpoint; its models join the picker with tool calls, images and provider prompt caching.

Hybrid attention & massive sparsity

GatedDeltaNet layers interleave 3:1 with sparse or GQA attention, plus 256–512 routed and Sigmoid-gated shared experts.

Zero-copy Metal & FP8 KV cache

Q4/Q8 GEMV, MXFP8, SwiGLU and tree-verification kernels run on unified memory. KV cache goes FP32, FP16 or FP8.

Private, native, and local

Prompts, reasoning and the model cache stay on the Mac. Cloud is opt-in; credentials live in the data protection keychain.

Your Mac, as an API endpoint.

Enable it in Settings and it auto-starts on every launch. It drives the same headless engine as the chat UI: identical templates, samplers, prefix reuse and tool grammar. Nothing leaves loopback.

POST /v1/chat/completions OpenAI · streaming, tools, images on vision
POST /v1/messages Anthropic · thinking, tool use, images on vision
POST /v1/messages/count_tokens Anthropic · counted by the turn plan
POST /v1/completions OpenAI · legacy text completions
GET /v1/models List or retrieve, in the caller's protocol shape
GET /health Liveness, model state, engine status
curl http://127.0.0.1:8787/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "local",
    "stream": true,
    "messages": [
      { "role": "user", "content": "Explain JetSpec." }
    ],
    "tools": []
  }'
curl http://127.0.0.1:8787/v1/messages \
  -H "Content-Type: application/json" \
  -d '{
    "model": "local",
    "max_tokens": 1024,
    "thinking": { "type": "enabled" },
    "messages": [
      { "role": "user", "content": "Draft a Metal GEMV." }
    ]
  }'
127.0.0.1:8787 · loopback only · optional bearer or x-api-key
Requests queue in arrival order; one turn runs at a time
Every turn lands in a searchable request log, metadata only by default
Image parts decode on both protocols; remote URLs are refused, never fetched

The machinery that makes it fast.

Every layer of the stack is tuned for Apple Silicon, from how weights are stored on disk to how the last token is sampled.

WorkingSetManager

Strict RAM budgeting

Evicts stale experts at layer boundaries during prefill and token boundaries during generation, so RAM never spikes past the chosen budget.

ExpertCache

Priced from available RAM

A dense backbone is pinned once and the expert cache is wired to the disk, so a read runs at the drive's own rate.

Quantizer

Quantize dense weights

Rewrites a dense checkpoint into one contiguous blob: 66 GB to 22 GB at Q4, decode around 2.4× faster, embedding and head kept at full precision.

PrefixCacheManager

KV prefix pinning & delta prefill

Preserves cached KV slots across turns. A bit-31 Metal GQA mask attends over the prefix while computing only delta tokens, so TTFT drops 2.0–3.5×.

memmap2 + MTLBuffer

Zero-copy unified memory bridge

SafeTensors shards are memory-mapped in Rust and wrapped directly into shared Metal buffers, eliminating CPU-to-GPU copies.

ModelConfig

Dynamic architecture auto-detection

Reads config.json, safetensors headers and tensor topology to set layers, heads, KV heads, RoPE theta and MLP type, identifying a checkpoint by shape.

Accelerate sampling

Hardware-vectorized decoding

vDSP_maxvi greedy selection, O(log K) Top-K heaps, and Min-P, Top-P, repetition and presence penalties to kill vocabulary looping.

Chat UI

Reasoning-aware workspace

Long answers split across rows, messages parsed on scroll, auto-detected <think> accordions with timers, GitHub-Flavored Markdown and code copy.

Bring your own weights.

Auto-detects MoE, dense and hybrid recurrent architectures, and identifies a checkpoint from its own shape. Use native checkpoints, not MLX or GGUF: MLX quantizations run slower here, or not at all.

Tested checkpoints
  • deepseek-ai/DeepSeek-V4.1-Flash-1017 MoE · 384 experts Six of 384 experts per layer in MXFP4; ~100 GB of Engram tables streamed a row at a time, with a vision tower.
  • Nanbeige/Nanbeige4.3-33B Dense · 33B Native 524,288-token context; Quantize to Q4/Q8 takes 66 GB to ~22 GB.
  • google/gemma-4-26B-A4B MoE · 26B / 4B active Hybrid attention with sparse expert routing.
  • ornith-ai/Ornith-1.5-35B-A3B Hybrid · 35B / 3B active GatedDeltaNet layers interleave with attention; JetSpec defaults off for them.
  • inclusionAI/Ling-3.0-tiny Hybrid · FP16 KV No FP8 KV support; DynaMoE falls back to FP16 automatically.
  • Qwen/Qwen3.8-Flash-Next MoE · 512 experts 131 safetensors shards streamed directly, with no repack needed.
  • Qwen/Qwen3.8-Flash-Next-FP8 MoE · FP8 weights 48.2 GB of FP8 weights; no MLX quantization required.
  • XHToken/Spark-X2.5-4B Hybrid · 4B One full attention layer per three sliding-window layers; 1M-token context, slow prefill.
  • XHToken/Spark-X2.6-4B Hybrid · graded thinking Thinking offers High, Low and Off, stored per conversation as reasoning_effort.

Validated on a 16 GB M1 Pro MacBook Pro. With Apple Intelligence on, Apple's Foundation Model appears under System Models and compacts local chat; a cloud conversation compacts with its own provider model. Checkpoints are discovered in ~/.cache/huggingface/hub at launch.

The short version.

Target Architecture
Apple Silicon
M1 and later · macOS 26+ · 16 GB+ recommended
Model Topology
MoE · Dense · Hybrid
Up to 512 experts · dense models repack to Q4/Q8
Quantization
Q4 / Q8 / MXFP8
MXFP4/MXFP8 experts · Metal GEMV · Q4/Q8 dense
KV Cache
FP32 / FP16 / FP8
Per-head 8-bit K/V scales · FP8 reaches long context
Local Server
OpenAI + Anthropic
127.0.0.1:8787 · SSE, tools, vision images
Privacy & Storage
Local by default
Zero telemetry, opt-in cloud, local cache

Bring frontier AI to your Mac.

Free and open source under Apache 2.0. Download the latest release, or read the source and tune it yourself.

macOS 26+ · Apple Silicon · 16 GB+ recommended