The 2GB AI Miracle on Apple Silicon
Forget the notion that serious AI demands server racks. A new open-source project shatters expectations, running a 26 billion parameter model on Apple Silicon with just ~2GB of RAM. Specifically, the instruction-tuned Gemma 4 (26B-A4B) achieves over 23 tokens/second on an M-series Mac, delivering genuinely usable local inference without breaking a sweat.
This feat drastically reduces the typical memory footprint for a model of its scale. Normally, a 26 billion parameter model like Gemma 4 demands 14GB+ RAM. Turbo Fieldfare achieves a 7x reduction in memory, fundamentally altering what's possible for local LLM deployment and making powerful AI accessible directly on your workstation.
The project responsible is Turbo Fieldfare, an open-source application meticulously engineered for Apple's hardware. Written purpose-built in Swift and Metal, Apple's low-level GPU API, it leverages the unique capabilities of unified memory. This bespoke design maximizes performance on Apple Silicon, turning a complex Mixture-of-Experts (MoE) model into a fluid local experience.
Why Most of Your AI Model Is Dead Weight
Gemma 4 isn't a monolithic network. It's a Mixture-of-Experts (MoE) model, a design that shatters the traditional single-network paradigm. Instead of one giant feed-forward block, it deploys 128 smaller, specialized 'expert' networks. Each expert handles specific data patterns, making the overall model highly efficient and adaptable without constant full activation.
Each MoE layer includes a tiny router. For any given token, this router dynamically selects and activates only the top 8 most relevant experts from the 128 available. This means roughly 3.9 billion parameters out of Gemma 4's 26 billion are actively engaged. A staggering 85% of the model's total parameters remain completely idle at any moment.
This inherent idleness is Turbo Fieldfare's core exploit. You don't need Gemma 4's full 14GB footprint in RAM when 85% is dead weight. The project intelligently keeps only the always-needed components and the actively selected ~3.9 billion parameters in memory. Experts are streamed directly from SSD, just-in-time, bypassing the need for full model residency. This precise, on-demand memory management is how Apple Silicon achieves its 2GB miracle.
Apple's Secret Weapon: Unified Memory
Traditional PC architectures bottleneck AI inference. Normally, getting weights to a discrete GPU involves a tortuous path: data moves from SSD to system RAM, then traverses the slow PCIe bus to dedicated VRAM. That's two copies and a bus hop for every chunk of data, a performance killer when you're streaming experts on demand.
Apple Silicon sidesteps this entirely with unified memory. CPU and GPU share the same physical RAM pool. There is no separate VRAM to copy into. A Metal buffer is simply a region of this shared memory, instantly visible to both processors.
This architecture enables a critical optimization: the CPU pulls expert weights directly from SSD into a memory buffer that the GPU accesses immediately. Zero slow copies. Zero PCIe transfers. The latency hit is drastically reduced, making just-in-time expert loading viable.
Furthermore, the Turbo Fieldfare project takes this to an extreme. Weights are not stored in some generic format requiring runtime conversion. Instead, they exist on disk in the exact 4-bit quantized layout the Metal GPU kernel consumes. This means zero conversion or unpacking overhead; reading the file literally loads the weight. For more on this project, check out drumih/turbo-fieldfare: Gemma 4 26B-A4B inference in ~2 GB of RAM on any M-series MacBook · GitHub. This tight integration unlocks insane performance.
Enjoying this? Get one like it in your inbox each morning.
one email a day · unsubscribe in two clicks · no third-party tracking
Smarter Than Your RAM: On-Demand Streaming
Turbo Fieldfare’s memory strategy employs a clever two-pile system. A lean, essential 1.35GB component—attention, the router, and embeddings—is memory-mapped and always resident in RAM. This critical block handles initial token processing without touching disk.
The remaining 12.9GB of experts live entirely on the SSD. Turbo Fieldfare employs a just-in-time (JIT) fetching strategy, streaming these experts into memory only when the router calls for them, a few megabytes at a time. No pre-fetching; choices depend on the current token and its history.
Intelligent caching further refines this. Each of Gemma 4's 30 layers maintains an LFU cache, holding 16 of its 128 experts in RAM. If the router picks a cached expert, access is immediate. If not, the required expert loads from SSD, replacing the least frequently used one currently in memory.
This LFU approach leverages the non-random, predictable nature of expert selection in MoE models. Some experts are picked consistently; others rarely. By prioritizing frequently used experts, the system minimizes disk reads, effectively hiding I/O latency within the model's existing computation threads.
Frequently Asked Questions
What is Turbo Fieldfare?
Turbo Fieldfare is an open-source project that runs large AI models like the 26B parameter Gemma 4 on Apple Silicon Macs with as little as 2GB of RAM by streaming parts of the model directly from the SSD.
Why is Apple Silicon's unified memory important for this?
It allows the CPU and GPU to share the same memory pool. This eliminates the slow process of copying data from system RAM to separate GPU VRAM, which is crucial for the high-speed, on-demand data streaming that Turbo Fieldfare uses.
What is a Mixture-of-Experts (MoE) model?
An AI model architecture composed of multiple smaller 'expert' sub-networks. For any given task, a router selects only a few experts to activate, making inference far more efficient than running a single, large monolithic model.
Can I run this on my Mac?
Yes, if you have any M-series Mac (Apple Silicon). The project is available on GitHub with instructions for cloning the repository and running the application.

