Instructions to use maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-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 maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-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 maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M
Use Docker
docker model run hf.co/maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-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": "maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M
- Ollama
How to use maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF with Ollama:
ollama run hf.co/maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_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:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF with Docker Model Runner:
docker model run hf.co/maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M
- Lemonade
How to use maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-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 maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_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:8080/v1 hermes config set model.default maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_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:8080/v1 \ --custom-model-id "maxkru92/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF:Q4_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"
File size: 6,454 Bytes
2c54356 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | ---
license: gemma
base_model: google/gemma-4-12B-it
library_name: gguf
pipeline_tag: text-generation
tags: [gemma4, reasoning, thinking, gguf, llama.cpp, local-llm]
---
# โจ Gemma4-12B-Reasoning-Distill (GGUF) โจ
### ๐ฃ Tiny footprint, big brain โ local AI for *everyone*
> **No matter your GPU. No matter your RAM.** If you've got **~4.5 GB** of VRAM *or* unified memory free,
> you can run your own private, offline AI right now. ๐
> Tuned on **Opus 4.6, 4.7 & 4.8** reasoning data, it delivers a **major leap in reasoning power** โ
> whether you're asking questions or writing code. ๐ง ๐ป All local, all yours, no API, no cloud.
### โก NEW โ the **MTP version is here!** Free speed ๐
**As of June 7, 2026**, mainline llama.cpp *just* merged Gemma 4 MTP support โ so the **MTP draft model** is now
live in the [`MTP/`](https://huggingface.co/yuxinlu1/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF/tree/main/MTP) folder.
Drop it next to any quant and generation gets **noticeably faster with identical output** (speculative decoding is
lossless) โ just add a couple of flags. ๐ See **โก Speed it up with MTP** below. ๐
---
## ๐ฆ Pick your size (GGUF quants)
| Quant | Size | Vibe |
|------|------|------|
| ๐ข **Q2_K** | **4.5 GB** | tiniest โ runs almost anywhere |
| ๐ต **Q4_K_M** | **6.87 GB** | the sweet spot ๐ (recommended) |
| ๐ฃ **Q6_K** | **9.11 GB** | near-lossless |
| โช **Q8_0** | **11.8 GB** | basically full quality |
| (f16) | 22.2 GB | full precision (overkill for most) |
---
## ๐งฎ "Will it fit?" โ context length cheat-sheet
Rough estimates ๐ค (assumes `q8_0` KV cache + ~1.5 GB overhead; **use `q4_0` KV cache for โ2ร more context!**).
Max context is **131K**. "โ" = won't fit, pick a smaller quant. โ๏ธ
| Your VRAM / unified mem | ๐ข Q2_K (4.5G) | ๐ต Q4_K_M (6.87G) | ๐ฃ Q6_K (9.11G) | โช Q8_0 (11.8G) |
|---|---|---|---|---|
| **8 GB** | ~16K ctx | tight (~2โ4K) | โ | โ |
| **12 GB** | ~48K | ~30K | ~12K | โ |
| **16 GB** | ~80K | ~64K | ~44K | ~22K |
| **24 GB** | 131K (max) ๐ | ~128K | ~110K | ~88K |
| **32 GB** | 131K | 131K | 131K | 131K |
> ๐ก Apple Silicon / integrated GPUs with **unified memory** count too โ same numbers, just slower than a dGPU.
> ๐ก Low on room? Drop a quant or switch KV cache to `q4_0` and your context roughly doubles.
---
## โก Speed it up with MTP (free & lossless) ๐๏ธ
**New as of June 7, 2026!** Gemma 4's *Multi-Token Prediction* drafter lets the model **guess a few tokens ahead** and
verify them in one shot โ so you get more tokens/sec with **byte-for-byte identical output**. Pure speed, zero quality
cost. ๐ช
**1.** Grab the tiny draft from the [`MTP/`](https://huggingface.co/yuxinlu1/gemma-4-12B-it-Claude-4.6-4.8-Opus-GGUF/tree/main/MTP) folder:
| Draft file | Size | Use it for |
|---|---|---|
| โช **`gemma-4-12B-it-MTP-Q8_0.gguf`** | **0.44 GB** | **recommended** โ tiny + full speed |
| `โฆ-F16.gguf` / `โฆ-BF16.gguf` | 0.82 GB | full-precision draft (overkill) |
> ๐ก The draft is **tiny** โ keep it **Q8 or higher** (over-quantizing a draft just lowers its hit rate). It pairs with **any** quant of the main model.
**2.** You need a **fresh llama.cpp build โ June 7 2026 (`b9553`) or newer**. MTP was *just* merged, so older builds
can't load the draft (`unknown architecture: 'gemma4-assistant'`).
**3.** Run it exactly like below, just **+3 flags** (`--model-draft`, `--spec-type`, `--n-gpu-layers-draft`):
```bat
@echo off
cd /d C:\llama.cpp
llama-server.exe ^
-m C:\models\gemma4-opus48-Q4_K_M.gguf ^
--model-draft C:\models\MTP\gemma-4-12B-it-MTP-Q8_0.gguf ^
--spec-type draft-mtp --spec-draft-n-max 4 ^
--ctx-size 16384 --n-gpu-layers 99 --n-gpu-layers-draft 99 ^
--no-mmap -fa on ^
--temp 1.0 --top-p 0.95 --top-k 64 ^
--host 0.0.0.0 --port 18080
pause
```
**Measured on a single RTX 5090** (Q4_K_M main + Q8 draft): **~1.3ร faster** at greedy and **~1.2ร** at the default
thinking sampling โ free, with no change to output. ๐
> ๐ง *Heads-up:* this is the **stock** Gemma drafter (trained on base Gemma 4), so on this fine-tune the hit rate โ
> and thus the speedup โ is a little lower than on vanilla Gemma 4. A re-aligned draft could push it higher (maybe a
> future update). Either way: free speed, no downside. ๐
---
## ๐ How to run it (super easy)
### Option A โ llama.cpp (recommended) ๐ฆ
1. Grab a quant above (e.g. `โฆ-Q4_K_M.gguf`) and `llama-server` from [llama.cpp](https://github.com/ggml-org/llama.cpp).
> โ ๏ธ Needs a **recent llama.cpp** (this is the `gemma4_unified` architecture โ older builds won't load it).
2. Run a server (Windows `.bat` shown โ tweak `--port`, `--ctx-size` to taste):
```bat
@echo off
cd /d C:\llama.cpp
llama-server.exe ^
-m C:\models\gemma4-opus48-Q4_K_M.gguf ^
--ctx-size 16384 ^
--n-gpu-layers 99 ^
--no-mmap ^
-fa on ^
--cache-type-k q8_0 --cache-type-v q8_0 ^
--temp 1.0 --top-p 0.95 --top-k 64 ^
--host 0.0.0.0 --port 18080
pause
```
3. Open `http://localhost:18080` and chat. ๐ (Tip: bump `--ctx-size` per the table; use `q4_0` KV for more.)
### Option B โ one-click apps ๐ฑ๏ธ
Works in **LM Studio**, **Jan**, **Ollama**, etc. โ just import the GGUF, pick your quant, go. ๐พ
### ๐ง Thinking mode
This model thinks in Gemma's native thought channel. Keep **`enable_thinking=true`** (the default chat template
handles it). Recommended sampling: `temp 1.0, top_p 0.95, top_k 64`.
---
## โ ๏ธ Good to know
- **Reduced refusals:** the training data omits safety hedging, so this refuses less than the base model.
It is **not** safety-aligned โ add your own guardrails for production. Use responsibly. ๐
- Reasoning is *stylistic* synthetic CoT โ great for structure, but double-check facts/numbers.
- English-centric.
---
## ๐ Data & License
- **Base model:** [`google/gemma-4-12B-it`](https://huggingface.co/google/gemma-4-12B-it). Subject to the
**[Gemma Terms of Use](https://ai.google.dev/gemma/terms)** (derivatives must comply).
- **Training data:** built on the public, **Apache-2.0** dataset
[`angrygiraffe/claude-opus-4.6-4.7-reasoning-8.7k`](https://huggingface.co/datasets/angrygiraffe/claude-opus-4.6-4.7-reasoning-8.7k),
**augmented with additional Opus 4.8-generated reasoning samples** I curated and mixed in.
- Personal/hobby project โ shared as-is, no warranty. Have fun! ๐พโจ
|