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 coding assistant right now. 🚀 This is the v1 / code edition — distilled from real chain-of-thought so it thinks through a problem before writing the solution. 🧠💻 All local, all yours, no API, no cloud.
A focused fine-tune of Gemma 4 12B on verifiable Python coding data — every training example's reasoning leads to code that actually passed its tests. The result reasons in the open (edge cases, complexity, approach) and then emits a clean, runnable solution. 💚
This is a distillation of two complementary chain-of-thought sources, both over verifiable Python coding tasks (algorithmic / function-level problems that come with deterministic tests):
The recipe: real CoT for the bulk of solid coverage, plus synthetic "second-attempt" CoT to patch the failures — both verified by execution before anything entered training. ✅
This is v1. If the likes / downloads add up, I'll ship a v2 that pushes for the benchmarks 🏁.
Quick heads-up for everyone waiting on v2:
Fable 5 access has been pulled. The Fable 5 CoT data I managed to save beforehand is honestly a pretty small set — not enough on its own to act as the primary signal for v2 without risking overfitting. So the plan is shifting:
Bottom line: v2 is still coming. I'd just rather take a little longer and ship something that generalizes than rush out an overfit model. Thanks for the patience and support 💚
⭐ Like & download if you'd like to see v2 — that's the signal I'm watching!
| 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 |
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_0and your context roughly doubles.
…-Q4_K_M.gguf) and llama-server from llama.cpp.⚠️ Needs a recent llama.cpp (this is the
gemma4_unifiedarchitecture — older builds won't load it).
.bat shown — tweak --port, --ctx-size to taste):@echo off
cd /d C:\llama.cpp
llama-server.exe ^
-m C:\models\gemma4-coding-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
http://localhost:18080 and chat. 🎉 (Tip: bump --ctx-size per the table; use q4_0 KV for more.)Works in LM Studio, Jan, Ollama, etc. — just import the GGUF, pick your quant, go. 🐾
This model thinks in Gemma's native thought channel before answering — exactly how it was trained. Keep
enable_thinking=true (the default chat template handles it). Recommended sampling: temp 1.0, top_p 0.95, top_k 64.
For coding you can also go greedy (temp 0) for more deterministic solutions.
google/gemma-4-12B-it. Subject to the
Gemma Terms of Use (derivatives must comply).有文件?提交种子。
发布种子google/gemma-4-12B-it