Open-source engine running Gemma 4 26B in 2 GB RAM on any M-series Mac

Hi HN,I built a specialized inference engine for running 4-bit Gemma 4 26B-A4B-IT on any M-series Mac using about 2 GB of RAM. It is called TurboFieldfare and is written in Swift and Metal.I have always adored on-device AI. It feels like magic that you can run a powerful NN on your Mac or iPhone. So I wanted to push the limits a bit and run a model whose weights don’t fit in memory.The model’s 4-bit quantized weights occupy roughly 14 GB, which makes running it with conventional inference tools almost impossible on an 8 GB or even 16 GB Mac once the OS, applications, and KV cache are included.The trick is to keep the shared part of the model and the KV cache in RAM, then stream only the routed experts needed for each token from SSD. An SSD is way slower than RAM, so the runtime uses a small expert cache and bounded parallel `pread`. While those reads are in flight, the GPU runs the shared part of the layer.I ran more than 100 experiments. Most didn’t work. A few got me here. The experiments are described in the GitHub repo.It currently generates 5–6 tok/s on an 8 GB M2 MacBook Air and 31–35 tok/s on an M5 MacBook Pro.I also added an experimental OpenAI-compatible local server. It supports streaming and tool calls, and reuses one prompt prefix from the KV cache.Try it! The Mac app is easy to install. On the first run, it will download 15 GB of weights from Hugging Face. The model is surprisingly capable.I would love any kind of feedback!

Hacker NewsToolAISource
0Sign in to voteCopy link

FL score

72

out of 100

Verdict

VALIDATE

medium confidence

Competition

No competitor data yet

Trend

No signal yet

A technical achievement that solves a real constraint (running 26B models on 8GB Macs) but lacks a clear path to sustainable revenue or defensible moat.

The pain

Developers and Mac users want to run capable open-source models locally without buying expensive hardware. Current tools either require 32GB+ RAM or produce unusable inference speeds. The 5-6 tok/s on M2 is barely functional for interactive use.

The gap

The engineering is solid, streaming experts from SSD while GPU processes shared layers is clever. But the gap isn't technical anymore; it's commercial. The creator built a tool, not a business. No pricing model, no target customer segment, no distribution beyond GitHub.

Build angle

This works as a developer tool or library if positioned correctly: (1) Sell as a commercial inference SDK for Mac app developers who want on-device AI without bloat, (2) Build a hosted service where users rent Mac inference capacity, (3) License the optimization techniques to existing inference frameworks (llama.cpp, MLX). The open-source release is good for credibility but doesn't generate revenue.

Strengths

  • Genuine technical innovation, 100+ experiments show rigor, not luck
  • Solves a real hardware constraint that affects millions of M-series Mac owners
  • Working product with measurable performance (5-6 tok/s is slow but real)
  • Open-source release builds trust and community; lowers barrier to adoption
  • OpenAI-compatible API means drop-in compatibility with existing apps
  • Addresses growing demand for on-device AI (privacy, latency, cost)

Risks

  • Speed is marginal, 5-6 tok/s makes interactive use painful; users will abandon it for cloud APIs
  • No business model articulated; open-source alone doesn't sustain a company
  • Narrow TAM, only M-series Mac owners; excludes Windows, Linux, mobile
  • Commoditization risk, once techniques are public, competitors (Apple, Qualcomm, inference frameworks) will integrate similar optimizations
  • Maintenance burden, supporting a specialized inference engine across OS updates is expensive
  • Gemma 4 is Google's model; no defensible IP in the weights themselves
  • Expert routing adds complexity; harder to support than standard inference
  • Market timing unclear, will users accept 5-6 tok/s, or will they wait for faster hardware?

Questions about this idea?

FlyBot reads the scoring and gives you a second opinion on “Open-source engine running Gemma 4 26B in 2 GB RAM on any M-series Mac”.

Open FlyBot