Home » Open-source project enables Gemma 4 26B-A4B inference on M-series MacBooks with 2 GB RAM

Open-source project enables Gemma 4 26B-A4B inference on M-series MacBooks with 2 GB RAM

By

–

Open-source project enables Gemma 4 26B-A4B inference on M-series MacBooks with 2 GB RAM

What TurboFieldfare Is and the Problem It Addresses

TurboFieldfare is an open-source project that enables the Gemma 4 26B-A4B instruction-tuned language model to run inference on Apple Silicon Macs using approximately 2 GB of RAM. The model itself has 26 billion total parameters, with about 3.88 billion active per token, but its full weight set normally requires around 14.3 GB of storage. Running such a model locally typically demands significant memory, often exceeding what is available on consumer-grade Macs with 8 GB of RAM. TurboFieldfare solves this by avoiding the need to load the entire model into memory at once.

Instead, it keeps only a small, shared core of the model — 1.35 GB — and the FP16 KV cache in memory. During inference, it streams only the necessary expert components from the SSD for each token generated. This approach allows the model to operate within tight memory constraints, making it feasible to run on Macs with as little as 8 GB of RAM, such as the M2 MacBook Air.

The project is built entirely in Swift and uses Apple’s Metal framework for GPU acceleration. It is not a wrapper around existing inference libraries like MLX or llama.cpp but a custom runtime designed specifically for the Gemma 4 26B-A4B model’s architecture.

Why It Is Gaining Attention

TurboFieldfare has attracted interest from developers and AI enthusiasts because it demonstrates how large language models can be run locally on modest hardware without relying on cloud services. The ability to run a 26-billion-parameter model on an 8 GB MacBook Air addresses a growing demand for private, offline AI capabilities — particularly for users concerned about data privacy, latency, or recurring API costs.

The project’s focus on Apple Silicon aligns with the increasing adoption of M-series chips in Macs, which offer unified memory and powerful GPU performance via Metal. By optimizing for this ecosystem, TurboFieldfare leverages hardware strengths to overcome memory limitations through intelligent model partitioning and streaming.

Its visibility has grown through community engagement, including a documented experiment record with 103 measured results covering kernels, caching, I/O, prefill, and decode performance. Users are encouraged to contribute their own benchmark results, fostering a collaborative effort to understand real-world performance across different Mac configurations.

The availability of a native Mac app, a command-line interface, and an experimental OpenAI-compatible server makes it accessible to both casual users and developers seeking to integrate local AI into workflows.

How It Works at a High Level

At its core, TurboFieldfare uses a mixture-of-experts (MoE) architecture, which is inherent to the Gemma 4 26B-A4B model. In this design, the model consists of multiple expert networks, but only a subset are activated for any given token. TurboFieldfare exploits this by storing the shared model core and KV cache in RAM while keeping the individual experts on disk.

During text generation, the system loads only the required experts from the SSD into the GPU memory via Metal, performs the computation, and then discards them before moving to the next token. This just-in-time loading minimizes RAM usage while still allowing full model functionality.

The model weights are stored in a quantized format: MLX affine 4-bit with group size 64, an 8-bit router, and both shared and routed experts in 4-bit precision. This reduces storage footprint while preserving sufficient accuracy for inference.

The entire pipeline — from model installation and repacking to token generation — is handled through Swift-based tools. The TurboFieldfareRepack product manages the initial download and conversion of the model into the .gturbo format used at runtime. Once installed, users can interact with the model via the native Mac app, CLI, or a local server that mimics OpenAI’s API format.

Who It Is For and Real-World Use Cases

TurboFieldfare is suited for developers, researchers, and power users who want to run state-of-the-art language models locally on Apple Silicon Macs. It appeals to those prioritizing data privacy, as all processing occurs on-device without transmitting prompts or responses to external servers.

Practical use cases include personal writing assistance, code generation, offline research, and experimentation with model behavior — all without internet dependency or subscription fees. The OpenAI-compatible server option allows integration with existing tools that expect such an interface, enabling a drop-in replacement for cloud-based APIs in local development environments.

Because the project includes benchmarks and encourages community reporting, it also serves as a platform for evaluating LLM performance on consumer hardware, helping users understand trade-offs between speed, memory use, and model fidelity.

Caveats and Current Limitations

TurboFieldfare is an early-stage, community-driven project. As noted in its documentation, measured performance — such as decode speeds of 5.1–6.3 tokens per second on an 8 GB M2 MacBook Air or 31–35 tokens per second on a 24 GB M5 Pro — is a reference point, not a guarantee. Actual throughput varies based on prompt length, generated length, system page-cache state, and specific hardware configuration.

The software requires macOS 26, Metal 4, Xcode 26, and Swift 6.2 or newer, which may limit accessibility for users on older systems. It is arm64-only and does not support Intel Macs or older macOS versions.

Licensing, long-term maintenance, and official support models are not detailed in the provided README. Users should review the project’s repository directly for the most current information on these aspects. As with any open-source tool, especially in the rapidly evolving AI space, ongoing compatibility with future model updates or system changes cannot be assumed.

Finally, while the project enables local inference, the initial model download requires approximately 14.3 GB of free storage, plus optional components, and an internet connection for the first setup.

Source: https://github.com/drumih/turbo-fieldfare

More stories by

Most read

AI Tools

Artificial Intelligence

Business

World News