Instructions to use DuoNeural/Gemma-4-26B-A4B-it-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use DuoNeural/Gemma-4-26B-A4B-it-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf DuoNeural/Gemma-4-26B-A4B-it-GGUF:Q3_K_M # Run inference directly in the terminal: llama cli -hf DuoNeural/Gemma-4-26B-A4B-it-GGUF:Q3_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf DuoNeural/Gemma-4-26B-A4B-it-GGUF:Q3_K_M # Run inference directly in the terminal: llama cli -hf DuoNeural/Gemma-4-26B-A4B-it-GGUF:Q3_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf DuoNeural/Gemma-4-26B-A4B-it-GGUF:Q3_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf DuoNeural/Gemma-4-26B-A4B-it-GGUF:Q3_K_M
Use Docker
docker model run hf.co/DuoNeural/Gemma-4-26B-A4B-it-GGUF:Q3_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use DuoNeural/Gemma-4-26B-A4B-it-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DuoNeural/Gemma-4-26B-A4B-it-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DuoNeural/Gemma-4-26B-A4B-it-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/DuoNeural/Gemma-4-26B-A4B-it-GGUF:Q3_K_M
- Ollama
How to use DuoNeural/Gemma-4-26B-A4B-it-GGUF with Ollama:
ollama run hf.co/DuoNeural/Gemma-4-26B-A4B-it-GGUF:Q3_K_M
- Unsloth Desktop
- Pi
How to use DuoNeural/Gemma-4-26B-A4B-it-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf DuoNeural/Gemma-4-26B-A4B-it-GGUF:Q3_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "DuoNeural/Gemma-4-26B-A4B-it-GGUF:Q3_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use DuoNeural/Gemma-4-26B-A4B-it-GGUF with Docker Model Runner:
docker model run hf.co/DuoNeural/Gemma-4-26B-A4B-it-GGUF:Q3_K_M
- Lemonade
How to use DuoNeural/Gemma-4-26B-A4B-it-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull DuoNeural/Gemma-4-26B-A4B-it-GGUF:Q3_K_M
Run and chat with the model
lemonade run user.Gemma-4-26B-A4B-it-GGUF-Q3_K_M
List all available models
lemonade list
- Hermes Agent
How to use DuoNeural/Gemma-4-26B-A4B-it-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf DuoNeural/Gemma-4-26B-A4B-it-GGUF:Q3_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default DuoNeural/Gemma-4-26B-A4B-it-GGUF:Q3_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use DuoNeural/Gemma-4-26B-A4B-it-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf DuoNeural/Gemma-4-26B-A4B-it-GGUF:Q3_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "DuoNeural/Gemma-4-26B-A4B-it-GGUF:Q3_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
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-decodinginstead โ 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
3-bit