Queen
In progressA Rust inference engine built natively for Apple's unified memory, designed as the core of a local assistant: a large model plans, small models work in parallel, memory is managed from inside the inference loop, and the system adapts to how you actually work.
Fig. 1 — Unified-memory inference loop. One pool shared by CPU and GPU; a planner directs parallel workers; context is managed from inside the loop (dashed).
101—CPU · 102—GPU · 103—unified memory pool · 104—planner (large model) · 105–107—parallel workers · 108—context / logits loop
A local assistant for your machine.
Why "Queen"
Before it was the queen, the strongest piece on the chessboard was the vizier or ferz: the king's advisor. That's the goal: not a chatbot in a window, but an advisor that lives on your machine, knows your context, and gets better at helping you specifically.
Field
Local inference and agentic systems on personal hardware, starting with Apple Silicon.
Background
Apple Silicon's unified memory puts CPU and GPU on the same memory pool. Most inference engines still treat the GPU as a discrete device, even on Metal: they stage copies, mirror buffers, and size everything as if VRAM were separate. Queen starts from the opposite assumption: one memory, shared by everything.
Several recent local-inference engines have appeared in the same space. That's a good signal: fast, serious local inference on a laptop is clearly possible. Queen focuses on what comes after the engine.
What makes it different
- Unified-memory-native, in Rust. An engine designed around shared memory from the start, written in Rust for control over memory, concurrency and safety.
- Gemma 4 first. Full support for the Gemma 4 family, including the efficient E-series models and their audio and vision towers, which existing local engines have yet to fully cover.
- Batched agentic compute. A larger model thinks and plans; several smaller models write and execute in parallel on the same machine. Batching is designed in rather than added later, so the hardware stays busy instead of serving one stream at a time.
- Memory and context control from inside the loop. Agent harnesses manage context
from the outside, through text. An engine has access to the logits and the
inference loop itself, which allows memory and context to be managed where the
decisions are actually made. Directions being explored:
- a graph-based memory: knowledge as atomic units connected by learned transition probabilities, which a model walks instead of re-reading everything;
- ideas from Context Language Models (Meta / UW, 2026), where models manage their own context as a file.
- Local signals, kept local. Because everything runs on-device, Queen can use context no cloud assistant should see: the active window, cursor position, what you're working on right now. Opt-in, and it never leaves the machine.
- Adapts like a muscle. With on-device fine-tuning, the models gradually fit your workflow: your tools, your habits, your vocabulary. The more you use it, the better it fits.
- More families over time. Other model families will follow, including fast "System 1" models for reflex-level tasks.
Status & Roadmap
Getting the forward pass of Gemma 4 E4B running on a MacBook Pro M5 (24 GB).
- Gemma 4 E4B forward pass
- Gemma 4 audio and vision towers
- Batched multi-model execution (planner + parallel workers)
- In-loop memory and context management
- Local signal integration (opt-in)
- On-device adaptation
- Additional model families
Collaborate
Queen is an independent project. If you work on local inference, agent memory, or on-device learning, or you'd like to help Queen grow into something bigger, get in touch.