How to Run Gemma 4 26B in ~2 GB of RAM (TurboFieldfare on Apple Silicon)

Read time: ~7 minutes. TL;DR — build and run:

git clone https://github.com/drumih/turbo-fieldfare.git
cd turbo-fieldfare
swift build -c release
.build/release/TurboFieldfareMac

Then Download (fetches/repacks ~15 GB), Load Model, and generate. Needs macOS 26, Metal 4, Xcode 26 / Swift 6.2, Apple Silicon.

Key facts:

  • Runs Gemma 4 26B-A4B (26B total, ~3.88B active per token) in ~2 GB of RAM — validated on an 8 GB M2 MacBook Air.
  • It’s not compression. The 1.35 GB shared core + FP16 KV cache stay resident; per-token experts stream from SSD. Disk still holds 14.3 GB.
  • Measured decode: 5.1–6.3 tok/s on an 8 GB M2 Air, 31–35 tok/s on a 24 GB M5 Pro (project’s own benchmarks).
  • Apache 2.0, Swift + Metal, 3,237 stars, arm64-only, text-only.

Sourcing note: every command, number, and requirement below is from the official drumih/turbo-fieldfare README (fetched August 1, 2026); star count from the GitHub API the same day. Benchmarks are the project’s own measurements, flagged as such. Links at the bottom.

“26B model in 2 GB of RAM” sounds like it can’t be true — a 26B model at 4-bit is normally ~13 GB. It is true, and the trick is worth understanding, because it tells you exactly when this approach helps you and when it doesn’t. Here’s what TurboFieldfare actually does, what it costs, and how to run it.


1. How 2 GB is possible (the honest explanation)

Two things combine:

First, the model is a MoE. Gemma 4 26B-A4B has 26B total parameters but activates only ~3.88B per token. Most of those weights are idle on any given token.

Second — the actual innovation — the experts stream from disk. From the README:

TurboFieldfare runs the instruction-tuned Gemma 4 26B-A4B without loading the entire 14.3 GB model into memory. It keeps the shared 1.35 GB core and FP16 KV cache in memory, then streams only the experts needed for each token from SSD.

So the resident set is small (shared core + KV cache ≈ 2 GB) while the full 14.3 GB still lives on your SSD. Nothing is compressed away — the memory number is small because most of the model isn’t in memory.

Weights are MLX affine 4-bit, group 64, with an 8-bit router and 4-bit shared and routed experts. The runtime is model-specific — Swift + Metal written for this model, not a wrapper around MLX or llama.cpp.

What this means for you: if you’re RAM-limited but have disk and a fast SSD, this unlocks a model you otherwise couldn’t load. If you’re disk-limited, it changes nothing — you still need 14.3 GB.


2. The honest trade

You getYou pay
A 26B-class model on an 8 GB Mac14.3 GB of storage for the install (~15 GB download)
~2 GB resident memoryDecode speed is SSD-bound: 5.1–6.3 tok/s on an 8 GB M2 Air
Apache 2.0, local, privatemacOS 26 + Metal 4 + Swift 6.2, Apple Silicon arm64 only
Native Mac app, CLI, and OpenAI-compatible serverText-only; no tool execution in the app/CLI

The speed spread is the number to internalize: 5.1–6.3 tok/s on the 8 GB M2 versus 31–35 tok/s on a 24 GB M5 Pro (both the project’s measured results). On the low-RAM machine this is a “works at all” story, not a fast one — reading speed, roughly. On a newer chip with headroom it’s genuinely usable.

The README is upfront that these are reference points, not ceilings: prompt length, generated length, page-cache state, and hardware all move throughput.


3. Requirements (check before you download 15 GB)

  • Apple Silicon Mac — the validated target is an 8 GB M2 MacBook Air; arm64 only
  • macOS 26 with Metal 4
  • Xcode 26 and Swift 6.2 or newer
  • ~14.3 GB free storage
  • Internet for the first install

Older macOS/Metal versions are explicitly unsupported. This is the strictest requirement list of any local-LLM setup we’ve covered — check swift --version and your macOS version first.


4. Method 1 — the Mac app (easiest)

git clone https://github.com/drumih/turbo-fieldfare.git
cd turbo-fieldfare
swift build -c release
.build/release/TurboFieldfareMac

On first run, SPM downloads and builds the tokenizer’s Swift packages. In the app: choose Download (fetches and repacks the pinned model, ~15 GB), then Load Model, type a prompt, press Generate.

The app handles Gemma’s chat formatting for you — just describe the task. Generation defaults: temperature 0.2, Top-K 64, Top-P 0.95. Set temperature to 0 for deterministic greedy output.


5. Method 2 — the CLI

If the model is already installed via the app it lives at scratch/gemma4.gturbo. Otherwise install from the command line:

swift run -c release TurboFieldfareRepack \
  --output scratch/gemma4.gturbo \
  --overwrite

Interrupted download? Resume rather than restarting 15 GB:

swift run -c release TurboFieldfareRepack \
  --output scratch/gemma4.gturbo \
  --overwrite \
  --resume

(And --discard-partial clears saved download state.) The runtime only accepts a completed .gturbo directory with a final manifest.json — a partial install won’t load.

Chat from a messages file (same formatting as the app):

swift run -c release TurboFieldfareCLI \
  --model scratch/gemma4.gturbo \
  --messages-file messages.json

Raw completion (no chat formatting — good for reproducible comparisons):

swift run -c release TurboFieldfareCLI \
  --model scratch/gemma4.gturbo \
  --prompt "The capital of France is" \
  --max-new 64 \
  --temperature 0

CLI response length defaults to 1,024 tokens via --max-new (the Mac app can generate until the context window fills). Other options: --max-context, --temperature, --top-k, --top-p, --repetition-penalty, --seed, and repeatable --stop. Full list: swift run -c release TurboFieldfareCLI --help.


6. Method 3 — the OpenAI-compatible server

To point existing tooling at it:

swift build -c release --product TurboFieldfareServer
.build/release/TurboFieldfareServer \
  --model scratch/gemma4.gturbo

It listens on http://127.0.0.1:8080/v1 and supports Chat Completions, streaming, function tools, and single-prefix prompt reuse.

Two safety notes straight from the README:

  • Keep it on loopback — it has no remote authentication and no TLS.
  • The client must authorize and run every tool call — the server doesn’t execute tools for you.

Also: the app, CLI, and server share the same .gturbo directory, but only one model-owning product should run at a time.


7. Who this is actually for

  • You have an 8–16 GB Apple Silicon Mac and want a 26B-class model at all → this is the reason the project exists. Accept ~5-6 tok/s on an M2.
  • You have a newer/roomier Mac (M5-class) → 31–35 tok/s is genuinely usable, and you still save RAM for everything else.
  • You need speed above all, or you’re not on macOS 26 → stay with a smaller model that fits in RAM properly, e.g. Gemma 4 12B locally, and consider MTP for ~2× decode throughput.
  • You need tools/agents or multimodal → not this; it’s text-only with no tool execution.

One more caveat the README states plainly: the model can still repeat itself or give incorrect answers — check important results. A 4-bit 26B streaming from SSD is not a frontier model.

The takeaway

TurboFieldfare’s “26B in 2 GB” is real and honestly explained: Gemma 4 26B-A4B activates only ~3.88B parameters per token, so the runtime keeps the 1.35 GB shared core + KV cache resident and streams each token’s experts from SSD — the other 14.3 GB stays on disk. Build it with swift build -c release, install the model via the app or TurboFieldfareRepack (use --resume on a dropped download), then use the Mac app, the CLI (--messages-file for chat, --prompt for raw), or the loopback OpenAI server on 127.0.0.1:8080/v1. Just budget for the real costs: macOS 26 + Metal 4 + Swift 6.2, 14.3 GB of disk, and 5-6 tok/s on an 8 GB M2 (31-35 on an M5 Pro).

For Gemma 4 setups that fit in RAM conventionally, see running Gemma 4 12B locally and speeding up Gemma 4 with MTP.

Sources

  • drumih/turbo-fieldfare — GitHub — Gemma 4 26B-A4B in ~2 GB RAM; architecture (1.35 GB shared core + FP16 KV cache resident, per-token experts streamed from SSD, 14.3 GB installed); MLX affine 4-bit group 64 weights with 8-bit router; 26B total / ~3.88B active per token; requirements (Apple Silicon arm64, macOS 26, Metal 4, Xcode 26 / Swift 6.2, ~14.3 GB storage); measured decode 5.1–6.3 tok/s on 8 GB M2 MacBook Air and 31–35 tok/s on 24 GB M5 Pro; six Swift products (library, Mac app, decode service, CLI, server, repack installer); build/install/CLI/server commands; generation defaults (temperature 0.2, Top-K 64, Top-P 0.95); loopback server at 127.0.0.1:8080/v1 with no auth/TLS; text-only, no tool execution
  • Gemma 4 model card — Google — the underlying Gemma 4 26B-A4B model
  • Star count (3,237) and repo activity from the GitHub API on August 1, 2026 (repo created July 17, 2026, pushed July 31). Benchmarks are the project’s own measured results — the README notes they are reference points, not ceilings. Verified August 1, 2026.