CoolFace
Modelpublic

batiai/Gemma-4-26B-A4B-it-GGUF

sourceHugging Faceapache-2.0updated 5mo agoView on Hugging Face
3likes723downloads
Model Card

Gemma 4 26B-A4B-it GGUF — Quantized by BatiAI

<p align="center"> <a href="https://flow.bati.ai"><img src="https://img.shields.io/badge/BatiFlow-macOS%20AI%20Automation-blue?style=for-the-badge&logo=apple" alt="BatiFlow"></a> <a href="https://ollama.com/batiai/gemma4-26b"><img src="https://img.shields.io/badge/Ollama-batiai%2Fgemma4--26b-green?style=for-the-badge" alt="Ollama"></a> <a href="https://huggingface.co/google/gemma-4-26B-A4B-it"><img src="https://img.shields.io/badge/Upstream-Gemma%204%2026B--A4B--it-orange?style=for-the-badge" alt="Upstream"></a> </p>

Optimized GGUF quantizations of google/gemma-4-26B-A4B-it for on-device AI on Mac. Built directly from official Google BF16 weights by BatiAI for BatiFlow — free, unlimited, on-device AI automation.

Gemma 4 26B-A4B is a Mixture-of-Experts model (26B total parameters, ~3.8B active per token) with native multilingual + vision capabilities. Optimized for chat, code, tool calling, and now image understanding (via opt-in mmproj — see Two modes below).

Quick Start

bash
# 24 GB Mac — Best quality / speed (recommended)
ollama pull batiai/gemma4-26b:iq4

# 24 GB Mac — Smaller, imatrix-calibrated
ollama pull batiai/gemma4-26b:iq3

# 24 GB Mac — Standard 3-bit
ollama pull batiai/gemma4-26b:q3

# 32 GB+ Mac — Higher quality
ollama pull batiai/gemma4-26b:q4

# 36 GB+ Mac — Highest on-device quality
ollama pull batiai/gemma4-26b:q6

Available Quantizations

TagQuantSizeRecommended For
:iq3IQ3_M (imatrix)12 GB24 GB Mac, smaller footprint
:iq4IQ4_XS (imatrix)13 GB24 GB+ Mac, recommended
:q3Q3KM13 GBStandard 3-bit, stable
:q4Q4KM16 GB32 GB+ Mac, higher quality
:q6Q6_K21 GB36 GB+ Mac, near-lossless
Note for 16 GB Macs: 26B MoE loads but runs at ~0.3 t/s due to swap. For 16 GB Macs use batiai/gemma4-e4b (5 GB, ~57 t/s) instead.

Two modes — text-only by default, multimodal opt-in

Upstream Gemma 4 26B-A4B-it is multimodal (text + image + video understanding — but no audio; for audio see the smaller E2B / E4B variants). In the GGUF ecosystem this is delivered as two files: a main model.gguf (text tower) and a separate mmproj.gguf (multi-modal projector — the vision tower). We ship both, separate, so you can pick:

**Text-only** (default)**Multimodal** (opt-in)
Files neededmain GGUF onlymain GGUF + mmproj-*.gguf
CapabilitiesQ&A, coding, tool calling, RAG, agents+ image / video understanding (OCR, captioning, visual reasoning)
ollama pull✅ single command⚠ Ollama mmproj integration is still rough — use llama.cpp directly
Disk / RAMsmaller (no vision weights)larger (+ ~770 MB to ~1.2 GB)
Recommended formost users (chat, code, agents)OCR, image understanding, multimodal tasks

This is the same pattern unsloth / bartowski / mradermacher use for multimodal models — text-only on Ollama, full multimodal via llama.cpp + mmproj.

Multimodal usage (llama.cpp)

Download the main GGUF + the mmproj file:

bash
# Pick a main model (text tower)
wget https://huggingface.co/batiai/Gemma-4-26B-A4B-it-GGUF/resolve/main/google-gemma-4-26B-A4B-it-IQ4_XS.gguf

# Pick the mmproj (vision tower) — Q6_K is the sweet spot, BF16 if you want zero loss
wget https://huggingface.co/batiai/Gemma-4-26B-A4B-it-GGUF/resolve/main/mmproj-Q6_K.gguf

Server mode (OpenAI-compatible Vision API):

bash
llama-server \
  -m google-gemma-4-26B-A4B-it-IQ4_XS.gguf \
  --mmproj mmproj-Q6_K.gguf \
  -c 32768 --host 127.0.0.1 --port 8080

# Then post images via the OpenAI Vision API shape
curl http://127.0.0.1:8080/v1/chat/completions -d '{
  "messages": [{
    "role": "user",
    "content": [
      {"type": "image_url", "image_url": {"url": "data:image/jpeg;base64,..."}},
      {"type": "text", "text": "What does this screenshot show?"}
    ]
  }]
}'

One-shot CLI:

bash
llama-mtmd-cli \
  -m google-gemma-4-26B-A4B-it-IQ4_XS.gguf \
  --mmproj mmproj-Q6_K.gguf \
  --image ~/Desktop/photo.jpg \
  -p "describe this image"

mmproj quantizations available

FileQuantSizeWhen to use
mmproj-Q6_K.ggufQ6_K~770 MBbalanced (recommended)
mmproj-BF16.ggufBF16~1.2 GBabsolute zero quantization loss for vision

(Q80 not available because some vision tensors have shapes incompatible with Q80's column alignment requirement — applies to every quantizer of this model. Q6_K's K-quant block layout handles them.)

Benchmarks

MacBook Pro M4 Pro 48 GB — consumer Mac (real-user measurement)

Metric**IQ4_XS**Q6_KOllama 26B (official)
Token generation58–63 t/s48–50 t/s56 t/s
VRAM15.1 GB23.9 GB19.3 GB
System memory free58 %40 %50 %
Cold start1.7 s5.8 s3.4 s
Simple response0.4 s0.5 s0.5 s
Coding task6.8 s7.3 s6.0 s
Reasoning (thinking)4.1 s5.3 s4.8 s
Tool calling✅ verified✅ verified⚠ untested
Korean language✅ verified✅ verified⚠ untested

BatiAI IQ4 outperforms Ollama's official 26B on the same hardware — both in raw speed (58–63 vs 56 t/s) and memory efficiency (15.1 vs 19.3 GB VRAM).

MacBook Pro M4 Max 128 GB — developer Mac

Metric**IQ4_XS**IQ3_MQ3_K_MQ4_K_MQ6_K
Token generation85.8 t/s77.0 t/s70.7 t/s74.9 t/s74.8 t/s
Prompt eval114.9 t/s250 t/s250 t/s250 t/s164.6 t/s
VRAM22 GB19 GB20 GB23 GB31 GB
Korean output✅✅✅✅✅
Tool call JSON✅✅✅✅✅

Mac mini M4 16 GB — boundary case

MetricIQ3_MQ3_K_M
Token generation~0.3 t/s~0.30 t/s
Usable?⚠ Very slow (swap)⚠ Very slow (swap)

26B MoE on 16 GB Macs hits swap (model + macOS overhead exceeds 16 GB). Recommendation: 24 GB+ Mac. For 16 GB devices, see the smaller Gemma 4 E series below.

RAM Requirements

Your Mac RAMIQ3 (12 GB)IQ4 (13 GB)Q3 (13 GB)Q4 (16 GB)Q6 (21 GB)
16 GB❌ swap❌ swap❌ swap❌ won't fit❌ won't fit
24 GB✅ fast✅ fits⚠ tight❌ barely❌ no
32 GB✅ fast✅ fast✅ fast✅ OK❌ no
36 GB+✅ fast✅ fast✅ fast✅ fast✅ fits
128 GB77 t/s85.8 t/s70.7 t/s74.9 t/s74.8 t/s

Why no Q2? (benchmark evidence)

We tested Q2_K extensively. It produces broken, unusable output on 26B MoE — infinite repetition loops. At 2-bit precision the MoE expert routing weights lose too much information. Q3 (3-bit) is the minimum viable quantization for this model.

Why BatiAI?

BatiAIThird-party (unsloth, etc.)
SourceQuantized directly from official Google weightsOften re-quantized from other GGUFs
Compatibility✅ Verified on Ollama 0.19 ~ 0.20+❌ Known issues with Ollama 0.20+ (#15235)
Tested onReal Mac mini M4 (16 GB) + MacBook Pro M4 Pro/MaxOften untested on consumer hardware
Tool calling✅ Verified with BatiFlow's 57 tool functionsOften broken on MoE models
Korean✅ ValidatedNot tested
imatrix✅ IQ3/IQ4 with calibrationUD- prefix custom format
Multimodal✅ Vision mmproj available (this repo)Often missing
Signinggeneral.author: BatiAI for provenanceVaries

About BatiFlow

<p align="center"> <a href="https://flow.bati.ai"><strong>flow.bati.ai</strong></a> </p>

BatiFlow is a macOS-native AI desktop automation app — just 5 MB, built with Swift.

  • —Free & Unlimited — On-device AI via Ollama, no API costs
  • —100 % Private — All data stays on your Mac
  • —Ultra Lightweight — Native macOS app, only 5 MB
  • —57 built-in tools — calendar, notes, reminders, files, email, browser, messaging, and more

<p align="center"> <a href="https://flow.bati.ai"> <img src="https://img.shields.io/badge/Download-BatiFlow-blue?style=for-the-badge&logo=apple" alt="Download BatiFlow"> </a> </p>

Related models in the BatiAI lineup

FamilyUse caseRepo
Gemma 4 E2B-itTiny + audio supportbatiai/Gemma-4-E2B-it-GGUF
Gemma 4 E4B-itSmall + audio supportbatiai/Gemma-4-E4B-it-GGUF
Gemma 4 26B-A4B-itMoE chat (this repo)—
Gemma 4 31B-itDense, larger context for desktopbatiai/Gemma-4-31B-it-GGUF
Qwen 3.6 35B-A3BNewer-gen MoE alternativebatiai/Qwen3.6-35B-A3B-GGUF

Technical Details

  • —Original Model: google/gemma-4-26B-A4B-it
  • —Architecture: Gemma 4 Mixture-of-Experts (26 B total, ~3.8 B active per token)
  • —Modalities: Text (primary) + Image / Video via opt-in mmproj. Audio not supported (use E2B / E4B for audio)
  • —Context Window: 128 K tokens
  • —License: Apache 2.0
  • —Quantized with: llama.cpp
  • —Quantized by: BatiAI
  • —GGUF metadata: general.author: BatiAI, general.url: https://flow.bati.ai

How we quantize

Google official weights (BF16, ~50 GB)
  ↓ llama.cpp convert_hf_to_gguf.py
BF16 GGUF (~50 GB)
  ↓ llama-imatrix (calibration data)
Importance Matrix (imatrix.dat)
  ↓ llama-quantize  (Q3_K_M, Q4_K_M, Q6_K)
  ↓ llama-quantize --imatrix  (IQ3_M, IQ4_XS)
Quantized GGUF
  ↓ convert_hf_to_gguf.py --mmproj  (vision tower)
mmproj BF16 → Q6_K
  ↓ scripts/sign-batiai.py  (general.author = BatiAI)
Signed GGUF
  ↓ ollama push (text-only)  +  hf upload (text + mmproj)
Published

No third-party intermediaries. Direct from source, verified on real hardware.

License

This model is quantized from google/gemma-4-26B-A4B-it under the Apache 2.0 license. Commercial use permitted per upstream terms.

BatiAI's quantization pipeline is provided under MIT.

Benchmarks

<!-- BENCH-START -->

MachineQuantCold startPrompt evalToken genTested
MacBook Pro M4 Max 128GBIQ3_XXS3.915s1768.99 t/s83.63 t/s2026-05-03
MacBook Pro M4 Max 128GBIQ4_XS6.96s1786.7 t/s89.66 t/s2026-05-03
MacBook Pro M4 Max 128GBQ3KM5.203s1776.86 t/s78.02 t/s2026-05-03
MacBook Pro M4 Max 128GBQ4KM5.036s1897.1 t/s87.56 t/s2026-05-03
MacBook Pro M4 Max 128GBQ6_K6.416s1281.27 t/s74.33 t/s2026-05-03

<!-- BENCH-END -->