explainx.ainewsletter3.5k
TrendingNewsPathwaysSkills
Pricing
explainx.ai

Upskill in AI — 16 free pathways, live workshops & bootcamps, and 50+ courses from practitioners. Plus the skills, tools, and MCP servers to practice on.

follow us

custom AI agents

[email protected]

get started

Find your pathTake Free Evaluation

learn

pathways — start freeworkshopsbootcampscoursescertificationsmock testsexplainx universitycorporate traininglearn skills & mcp

discover

skillsmcp serversexplainx mcptoolsagentsllmsdesignsagi trackerranks

company

aboutvisionmissionteaminstructorscommunityhackathonscareers

content

daily AI newsstate of AI — live resultsblogreleasespromptsgeneratorsresource librarydemofor LLMs

solutions

all solutionsdeveloper upskillingmarketing upskillingproduct manager upskillingleadership upskilling

More from us

InfloqInfluencer marketingBgBlurPrivacy-first blurOlly SocialSocial AI copilotCeptoryVideo intelligenceBgRemoverBackground removal

newsletter · weekly

Get AI news, tools, and insights in your inbox.

supportprivacytermsdata rightssubmission guidelines

© 2026 AISOLO Technologies Pvt Ltd

On this page

  • TL;DR
  • What people are asking
  • How the engine works
  • Quick start
  • When to use TurboFieldfare vs MLX
  • What the experiments teach (beyond this repo)
  • Products in the package
  • Builder checklist
  • Honest limitations
  • Closing
  • Related on explainx.ai
← Back to blog

explainx / blog

TurboFieldfare: Gemma 4 26B in ~2 GB RAM on Apple Silicon

Show HN: TurboFieldfare streams MoE experts from SSD so Gemma 4 26B-A4B runs in ~2 GB on 8 GB Macs. Swift+Metal, 5–6 tok/s M2, 31–35 on M5 Pro.

Jul 30, 2026·8 min read·Yash Thakker
Local AIGemma 4Apple SiliconOpen SourceInference
go deep
TurboFieldfare: Gemma 4 26B in ~2 GB RAM on Apple Silicon

A 26B MoE that fits in a ~2 GB process budget is not magic — it is SSD I/O overlapping GPU work.

On July 29–30, 2026, Andrey Mikhaylov’s TurboFieldfare hit Show HN: run Gemma 4 26B-A4B IT on any M-series Mac, including 8 GB machines, by keeping the shared ~1.35 GB core + FP16 KV in RAM and streaming only the routed experts needed per token from disk. Installed weights ~14.3 GB; process RSS ~2 GB (4K context, 16 expert-cache slots). Measured decode: ~5–6 tok/s on M2 Air, ~31–35 tok/s on M5 Pro.

This sits in the same local-inference lane as AirLLM-style offload, ESP32 per-layer flash tricks, and Apple-focused stacks we cover in MacBook vs dedicated GPU — but it is a purpose-built Metal runtime, not “turn down llama.cpp layers.”

Weekly digest3.5k readers

Catch up on AI

Curated AI updates on agents, skills, and MCP — delivered to your inbox. Unsubscribe anytime.

TL;DR

QuestionAnswer
ModelGemma 4 26B-A4B IT (~3.88B active/token)
RAM budget~2 GB (+ OS page cache helps a lot)
Disk~14.3 GB .gturbo install (~15 GB download)
StackSwift 6.2 · Metal 4 · macOS 26+
M2 8 GB5.1–6.3 tok/s decode
M5 Pro 24 GB31–35 tok/s decode
TrickResident shared MoE path + pread expert cache
APILoopback OpenAI-compatible server
LicenseApache-2.0 code; weights under Gemma terms
Stars (at writeup)~1.2k

What people are asking

“Why not just mmap the whole GGUF?”

HN asked. Author’s first version used mmap. On 8 GB M2, a cold ~3.36 MB expert took ~10 ms with mmap vs ~2.8 ms with pread; full simulation ~0.50 vs ~4 tok/s. mmap pages reactively and does not know which experts the router picked or when reads can overlap GPU work. TurboFieldfare: router → LFU 16-slot cache → miss fills via bounded parallel pread into Metal-visible buffers while Metal runs the shared expert branch.

llama.cpp can run huge MoEs under tight RSS with offload — often much slower when the OS is IOPS-bound on small page faults. Explicit large-chunk reads + compute overlap is the product.

“Is 5 tok/s usable?”

For interactive coding against Claude/Codex APIs — usually no. For offline chat, batch jobs, privacy-sensitive notes, or “keep 12 GB free for Resolve” — often yes. Author: with enough RAM you can raise expert-cache slots (e.g. 32 → ~3.5 GB) for better hit rate. Community: M4 Max 64 GB reported ~48 tok/s largely because the packed experts stay in page cache (iostat showed far less true disk than cold-miss math).

Unused RAM is disk cache. Starve the machine and tok/s falls toward raw SSD.

“macOS 26 only?”

Official requirements: macOS 26, Metal 4, Swift 6.2, Xcode 26, Apple Silicon. Apple10 GPU family gets a documented ~2.4× prefill path. M1 users on macOS 15 reported building after commenting languageVersion = .version4_0 — workable but without that prefill win.

“Will this destroy my SSD?”

Reads do not meaningfully wear NAND. Sustained overnight decode will heat fanless Airs; alternate I/O and GPU phases leave brief idles, but thermal throttle is still expected.

How the engine works

text
per layer:
  Metal: attention + router (resident weights)
  CPU: top-8 expert IDs → LFU 16-slot plan
  miss → parallel pread into Metal buffers
  Metal: shared-expert branch (overlaps reads)
  Metal: combine shared + routed outputs
prefill: chunks ≤128 tokens (one fetch serves many rows)
decode: token-by-token routed loop

Weights: MLX affine 4-bit (group 64) for embedding/attention/experts; 8-bit router. KV: FP16 with circular storage for sliding-window layers and linear for full-attention layers. Installer streams Hugging Face ranges straight into .gturbo — no second full checkpoint on disk.

Expert reuse (author): ~41% selected again next token, 57% within two — enough for cache to cut I/O roughly in half on M2 logs (250–320 MB pread per token during I/O phase at ~3 GB/s bursts; hit rate ~59–69%).

Curated 103 experiments in-repo — most failed (mmap, madvise, F_RDADVISE, Markov expert predictors, disk reordering). That lab notebook is the real Show HN value.

Quick start

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

First launch: Download (~15 GB), then Load Model, prompt, Generate. CLI / repack / verify:

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

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

Loopback server:

bash
swift build -c release --product TurboFieldfareServer
.build/release/TurboFieldfareServer --model scratch/gemma4.gturbo
# http://127.0.0.1:8080/v1 — Chat Completions, streaming, tools

Run one model owner at a time (app, decode service, CLI, server, tests). Check memory_pressure -Q before long runs.

When to use TurboFieldfare vs MLX

NeedPrefer
8–16 GB Mac, want 26B-class MoE offlineTurboFieldfare
Max tok/s, RAM to spare (~14 GB+)MLX (author ~75 tok/s M5 Pro full-resident)
Multi-model zoo / GGUF ecosystemllama.cpp / MLX community
Coding SOTA locallyOften Qwen MoE elsewhere — Gemma is “good enough” generalist
Non-Apple GPUNot this repo (Metal-specific)

Related Gemma coverage: Gemma 4 updates, Gemma 4 12B multimodal, DiffusionGemma, how to run open models locally.

Sibling SSD-stream MoE projects HN pointed at: Flash-MoE, Colibri, antirez/DwarfStar-class DeepSeek engines for 64 GB+ machines.

What the experiments teach (beyond this repo)

Mikhaylov’s inventory is a case study in local MoE systems engineering:

IdeaOutcome (author)
mmap expertsToo slow on cold 8 GB M2
pread + overlap shared GPUPrimary win (~0.5 → ~4 tok/s class)
madvise / F_RDADVISEMixed; long decodes sometimes worse
Predict next experts (Markov / cross-layer)Did not stick
Reorder experts on diskOverfit to one prompt

The HN wish for MTP heads that prefetch experts is harder than it sounds: expert choice is per layer, and layer n depends on layers below — you cannot freely speculate the whole stack from a draft token. Prefetch wrong experts and you burn the SSD slack you do not have.

Memory-bandwidth tables for M2→M5→rumored M6/M7 matter here. As base chips gain bandwidth and SSDs keep leaping (M5 laptop SSD uplift was already huge vs M4), streamed MoE becomes more mainstream for “workstation with big disk, not enough RAM for the full quant.”

Products in the package

ProductRole
TurboFieldfareSwift library + Metal kernels
TurboFieldfareMacNative install / generate app
TurboFieldfareDecodeServiceOne-shot local Metal owner for the app
TurboFieldfareCLIInstruction chat + raw completion
TurboFieldfareServerLoopback OpenAI-compatible API
TurboFieldfareRepackStreaming installer + verify

Prompting defaults: temperature 0.2, Top-K 64, Top-P 0.95; set temperature 0 for greedy. The Mac app owns chat formatting; --prompt is raw completion for reproducible benches. Multi-turn chat was still landing at Show HN time — check releases.

Builder checklist

  1. Free ≥20 GB disk before install.
  2. Close browsers / IDEs; note page-cache effects when benchmarking.
  3. Report tok/s + RSS + free RAM + SSD model via the community benchmark guide.
  4. Treat local OpenAI server as loopback-only.
  5. Do not expect Claude-class agent coding from Gemma 4 26B — harness + model both matter (agent harness guide).
  6. If you port to Qwen 35B-A3B, reuse the router stop → pread experts → resume pattern; kernels won’t copy-paste.
  7. Raise expert-cache slots when you have RAM headroom; document the new RSS.
  8. Keep MLX installed in parallel so you can A/B quality and speed on the same prompt set.

For “everything models vs something models” HN debates: MoE streaming is a systems answer to memory, not a substitute for training smaller specialists. You still pay for experts on disk and in transfer time; you just refuse to keep all of them hot.

Honest limitations

  • macOS 26 gate keeps many users out today.
  • Gemma-only — not a general MoE runtime.
  • Text-only; tools are server-side declarations for the client to run.
  • Speed is SSD- and cache-bound; marketing tok/s needs cold vs warm disclosure.
  • Quality ≠ frontier API for hard coding/agent work.
  • Independent security review still on you (Swift/Metal local stack; no HF token required in default path).

Closing

TurboFieldfare is a clean demonstration that MoE sparsity + explicit I/O planning beats “hope mmap is fast enough” on memory-poor Macs. If you have an 8–16 GB Apple Silicon box and want Gemma 4 offline without swapping yourself into oblivion, clone it, run the app, and send back numbers. If you have 64 GB and need max speed, stay on MLX — and steal the experiment log either way.

Follow @explainx_ai for more local-inference engineering writeups.

Related on explainx.ai

  • AirLLM — 70B-class on 4GB GPU patterns
  • MacBook vs dedicated GPU for local LLMs
  • How to run open-source models locally
  • Gemma 4 updates — flash attention & tools
  • Gemma 4 12B multimodal local
  • DiffusionGemma
  • ESP32 tiny LLM + flash embeddings
  • Open-weights American AI letter

Sources

  • drumih/turbo-fieldfare
  • Show HN: Open-source engine running Gemma 4 26B in 2 GB RAM
  • Gemma 4 model card

Benchmarks and requirements as published in the TurboFieldfare README around July 29–30, 2026. Re-measure on your hardware; page cache and macOS version dominate outcomes.

Yash Thakker

Written by

Yash Thakker

Yash is an AI expert with over 300K learners. Join his workshops →

Related posts

Jul 29, 2026

Deltafin: Run Kimi K3 (2.8T MoE) on One Apple Silicon Mac

Not chat-speed — an existence proof. Deltafin keeps a ~114 GB spine local, pulls 16 experts/layer from disk or Hugging Face, and serves greedy, reproducible tokens (plus reasoning_content) over an OpenAI-compatible server.

Jul 28, 2026

Framework Laptop 13 Pro: Modular Hardware for Local AI (2026)

MKBHD’s Framework 13 Pro walkthrough lands as Framework ships a ground-up redesign: CNC aluminum, haptic trackpad, LPCAMM2 RAM, and claimed 20-hour battery — without abandoning repairability. Here’s what that means if you run models on a laptop.

Jun 29, 2026

Gemma 4 31B on Cerebras: 1,800+ TPS — The Fastest Multimodal Inference Yet

Google DeepMind's Gemma 4 31B hits 1,851 TPS on Cerebras — first multimodal model at wafer-scale speed. Haiku 4.5-class intelligence, 18× faster, public preview now.