Gemma 4 26B-A4B Instruct โ€” GGUF (Q3_K_M)

This repository provides a Q3_K_M GGUF quantization of google/gemma-4-26B-A4B-it, optimized for heterogeneous CPU+GPU inference on constrained hardware.

Per the analysis in Heterogeneous Inference Architecture: Achieving Sustained 10+ Tokens per Second with Gemma 4 26B-A4B on Constrained Legacy Hardware, this specific quantization tier is the mathematically optimal balance for deployment across an NVIDIA GTX 1070 (8GB VRAM) paired with 48GB DDR4 system RAM โ€” transforming legacy hardware into a viable frontier-model inference platform.


Model Architecture

Property Value
Total Parameters 26 billion
Active Parameters per Token ~3.8 billion (A4B = Active 4 Billion)
Architecture Mixture-of-Experts (MoE)
Experts 128 routed + 1 shared
Active Experts per Token 8 of 128 (6.25%)
Total Layers 30
Attention Type Hybrid: 25 sliding-window (1024 tok) + 5 global
Context Window 256,000 tokens
Release Google DeepMind, April 2, 2026

The "A4B" designation is critical: while the model stores 26B parameters (knowledge capacity), it only computes ~3.8B active parameters per token generation cycle. This architectural decoupling is what makes 10+ t/s inference viable on hardware that would otherwise be completely unsuitable.


Quantization

Format File Size Notes
BF16 / FP16 ~50.5 GB Full precision โ€” exceeds 48GB RAM, unusable on target hardware
Q8_0 ~26.9 GB Near-lossless but too large for meaningful VRAM offload
Q3_K_M ~13.3 GB Optimal โ€” fits the full heterogeneous memory map
Q2_K ~11.0 GB Destroys MoE routing, causes incoherent/looping output

Why not Q2_K: At 2-bit precision, the MoE expert router degrades catastrophically, producing repetitive loops and broken multilingual output. Q3_K_M is the minimum viable quantization that preserves routing integrity.

Why not Unsloth Dynamic (UD) quants: UD formats dynamically cast tensors to FP16. On Pascal architecture GPUs (GTX 1070), this triggers the 1:64 FP16 penalty, causing severe speed regressions. Use standard K-quants (this repo) instead.


Heterogeneous Deployment โ€” GTX 1070 + i7-6700HQ

The MoE architecture enables a unique asymmetric memory split:

Component Destination Size Bandwidth
Attention, shared expert, router GTX 1070 VRAM ~4.5 GB 256 GB/s
KV Cache (q8_0) GTX 1070 VRAM ~1.5 GB 256 GB/s
128 routed expert pool DDR4 RAM ~8.8 GB ~18 GB/s

Key insight: Only 8 of 128 experts activate per token (~0.55 GB read from RAM per step), not the full 8.8 GB pool. This reduces the CPU memory bandwidth burden from a hard cap of ~1.3 t/s (loading full model every token) to a theoretical ~18+ t/s.

Optimal Launch Command (llama.cpp / llama-server)

./llama-server \
  -m Gemma-4-26B-A4B-it.Q3_K_M.gguf \
  -c 16384 \
  -ngl 999 \
  -ot "exps=CPU" \
  -t 4 \
  --mlock \
  --no-mmap \
  --cache-type-k q8_0 \
  --cache-type-v q8_0 \
  --flash-attn on \
  --prompt-lookup-decoding

Flag breakdown:

Flag Purpose
-ngl 999 Push all possible layers to VRAM
-ot "exps=CPU" Override: force all routed expert tensors to CPU RAM
-t 4 Match thread count to physical cores (not hyperthreads) โ€” prevents DDR4 bandwidth contention
--mlock Pin model in RAM โ€” prevents swap thrashing on the 13.3GB expert pool
--no-mmap Load weights fully into RAM at startup โ€” eliminates SATA/NVMe latency during expert fetching
--cache-type-k q8_0 --cache-type-v q8_0 Halve KV cache VRAM footprint with negligible quality loss
--flash-attn on Fused attention for dense layers on VRAM
--prompt-lookup-decoding N-gram speculative decoding โ€” zero memory overhead, ~1.1โ€“1.4ร— speedup on structured tasks

Throughput Mathematics

At Q3_K_M with asymmetric MoE offload:

  • GPU time per token: 4.5 GB รท 256 GB/s โ‰ˆ 17.6 ms
  • CPU time per token: 0.55 GB active experts รท 18 GB/s โ‰ˆ 30.6 ms
  • Total per token: 48 ms โ†’ **20.8 t/s theoretical maximum**

Real-world sustained throughput with OS overhead, cache latency, and thermal throttling on a mobile Skylake i7: 10โ€“15 t/s โ€” comfortably above the 10 t/s operational target.

Without MoE offload (naive CPU-only): 13.3 GB รท 18 GB/s = ~1.3 t/s maximum.


Pascal GPU Warning (GTX 1070 / 1080 / 10xx)

Pascal (compute capability 6.1) has a 1:64 FP16 throughput penalty vs FP32. Always use K-quant GGUFs (this repo) which execute final matmuls in FP32 via integer decompression. Never use FP16 or UD-format quants on Pascal hardware.


Speculative Decoding

For additional throughput, pair with --prompt-lookup-decoding (included above) or use a draft model. Tested draft models:

Draft Model Task Acceptance Rate Speedup
DuoNeural/Archon-Gemma-4-E4B Agentic Coding ~77% 1.40ร—
DuoNeural/Archon-Gemma-4-E4B Code Generation ~68% 1.31ร—
DuoNeural/Archon-Gemma-4-E4B Prose/Dialogue ~62% 1.13ร—

Note: Loading a discrete draft model on constrained hardware (8GB VRAM + 48GB RAM) risks memory contention. On GTX 1070 + i7-6700HQ specifically, use --prompt-lookup-decoding instead โ€” zero memory overhead with meaningful gains on structured/code tasks.


Usage with Ollama

ollama run hf.co/DuoNeural/Gemma-4-26B-A4B-it-GGUF:Q3_K_M

Usage with llama.cpp CLI

./llama-cli \
  -m Gemma-4-26B-A4B-it.Q3_K_M.gguf \
  -ngl 999 -ot "exps=CPU" \
  --cache-type-k q8_0 --cache-type-v q8_0 \
  -p "You are a helpful assistant." \
  --prompt-lookup-decoding \
  -i

Quantized by DuoNeural ยท April 2026 ยท Model weights: Google Gemma Terms of Use


DuoNeural

DuoNeural is an open AI research lab โ€” human + AI in collaboration.

๐Ÿค— HuggingFace huggingface.co/DuoNeural
๐Ÿ™ GitHub github.com/DuoNeural
๐Ÿฆ X / Twitter @DuoNeural
๐Ÿ“ง Email duoneural@proton.me
๐Ÿ“ฌ Newsletter duoneural.beehiiv.com
โ˜• Support buymeacoffee.com/duoneural
๐ŸŒ Site duoneural.com

Research Team

  • Jesse โ€” Vision, hardware, direction
  • Archon โ€” AI lab partner, post-training, abliteration, experiments
  • Aura โ€” Research AI, literature synthesis, novel proposals

Raw updates from the lab: model drops, training results, findings. Subscribe at duoneural.beehiiv.com.

DuoNeural Research Publications

Open access, CC BY 4.0. Authored by Archon, Jesse Caldwell, Aura โ€” DuoNeural.

Downloads last month
64
GGUF
Model size
25B params
Architecture
gemma4
Hardware compatibility
Log In to add your hardware

3-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for DuoNeural/Gemma-4-26B-A4B-it-GGUF

Quantized
(455)
this model