Gemma 3 27B IT (Q4_K_M) — Exact VRAM, KV Cache & Tensor X-Ray
Flagship 27B dense model (62 layers) built for 24 GB GPUs (RTX 3090 / 4090) and 32–64 GB unified-memory Macs/PCs.
⚡ Simulate on Your GPU in Browser (WASM)
Benchmark & Sign Ed25519 in Local Cockpit 0.4.0
View File on HuggingFace
Min VRAM (8k · FP16 KV)20.03 GiB32k w/ Q8_0 KV: 24.59 GiB
Binary .GGUF Weights15.40 GiB4.90 effective bits/weight
Parameters (Active / Total)27.01 / 27.01 B808 parsed tensors
KV Cache Growth496.0 MiB/1kQ8_0 KV: 263.5 MiB / 1k tok
1. HuggingFace Binary Provenance
| Repository | bartowski/google_gemma-3-27b-it-GGUF |
|---|---|
| Inspected File | google_gemma-3-27b-it-Q4_K_M.gguf (15.41 GiB) |
| HF Commit SHA | 4a05c54413bd |
| Harvested UTC | 2026-11-29 15:28:34 UTC |
| Parsed Header | 6 561 407 bytes (SHA-256 b4af5f57d9478fc865a0…) |
2. Transformer & GQA Architecture
| GGUF Architecture | gemma3 (Dense) |
|---|---|
| Transformer Layers | 62 layers (~236.6 MiB / layer) |
| Dimensions (d_model / FFN) | 5376 / 21504 |
| Attention Heads (Q / KV) | 32 Q / 16 KV (GQA 2.0:1, dim 128) |
| Native Context & Vocab | 131 072 tokens · vocab 262 144 |
3. Exact GGML Quantization Mix Inside This Binary
Rather than quantizing every tensor identically, Q4_K_M keeps sensitive embedding, output and attention tensors at higher precision:
| GGML Type | Tensor Count | Volume | Weight Share | Distribution |
|---|---|---|---|---|
Q4_K | 374 | 11.42 GiB | 74.1% | |
Q6_K | 61 | 3.98 GiB | 25.8% | |
F32 | 373 | 0.01 GiB | 0.0% |
4. KV-Cache Context Cliff from 2k to 128k Tokens (FP16 vs Q8_0 vs Q4_0)
Enabling Flash Attention with a Q8_0 KV cache cuts context memory nearly in half without altering model weights:
| Context Length | KV Only (FP16) | KV Only (Q8_0) | KV Only (Q4_0) | Total VRAM (FP16) | Total VRAM (Q8_0) |
|---|---|---|---|---|---|
| 2k (2 048) | 0.97 GiB | 0.51 GiB | 0.27 GiB | 17.12 GiB | 16.66 GiB |
| 4k (4 096) | 1.94 GiB | 1.03 GiB | 0.54 GiB | 18.09 GiB | 17.18 GiB |
| 8k (8 192) | 3.88 GiB | 2.06 GiB | 1.09 GiB | 20.03 GiB | 18.21 GiB |
| 16k (16 384) | 7.75 GiB | 4.12 GiB | 2.18 GiB | 23.90 GiB | 20.27 GiB |
| 32k (32 768) | 15.50 GiB | 8.23 GiB | 4.36 GiB | 31.65 GiB | 24.38 GiB |
| 64k (65 536) | 31.00 GiB | 16.47 GiB | 8.72 GiB | 47.15 GiB | 32.62 GiB |
| 128k (131 072) | 62.00 GiB | 32.94 GiB | 17.44 GiB | 78.15 GiB | 49.09 GiB |
5. Layer-by-Layer GPU Offload Matrix Across Hardware Tiers
Deterministic memory placement including OS display VRAM reserve and compute buffers:
| Hardware Tier | Context & KV | Layers in VRAM | VRAM Used | RAM Spillover | Memory Verdict |
|---|---|---|---|---|---|
| 8 GB GPU + 16 GB RAM | 8k · KV FP16 | 20 / 62 | 7.26 GiB | 12.29 GiB | RAM Spillover |
| 8 GB GPU + 16 GB RAM | 32k · KV FP16 | 11 / 62 | 7.00 GiB | 24.45 GiB | Out of Memory |
| 8 GB GPU + 16 GB RAM | 32k · KV Q8_0 | 15 / 62 | 7.14 GiB | 17.05 GiB | Out of Memory |
| 12 GB GPU + 32 GB RAM | 8k · KV FP16 | 33 / 62 | 11.01 GiB | 8.54 GiB | RAM Spillover |
| 12 GB GPU + 32 GB RAM | 32k · KV FP16 | 19 / 62 | 10.82 GiB | 20.63 GiB | RAM Spillover |
| 12 GB GPU + 32 GB RAM | 32k · KV Q8_0 | 26 / 62 | 11.10 GiB | 13.09 GiB | RAM Spillover |
| 16 GB GPU + 32 GB RAM | 8k · KV FP16 | 47 / 62 | 15.06 GiB | 4.49 GiB | RAM Spillover |
| 16 GB GPU + 32 GB RAM | 32k · KV FP16 | 27 / 62 | 14.61 GiB | 16.84 GiB | RAM Spillover |
| 16 GB GPU + 32 GB RAM | 32k · KV Q8_0 | 37 / 62 | 15.06 GiB | 9.12 GiB | RAM Spillover |
| 24 GB GPU + 64 GB RAM | 8k · KV FP16 | 62 / 62 | 19.55 GiB | — | 100% VRAM |
| 24 GB GPU + 64 GB RAM | 32k · KV FP16 | 44 / 62 | 22.72 GiB | 8.73 GiB | RAM Spillover |
| 24 GB GPU + 64 GB RAM | 32k · KV Q8_0 | 58 / 62 | 22.67 GiB | 1.52 GiB | RAM Spillover |
| 32 GB GPU + 64 GB RAM | 8k · KV FP16 | 62 / 62 | 19.55 GiB | — | 100% VRAM |
| 32 GB GPU + 64 GB RAM | 32k · KV FP16 | 60 / 62 | 30.46 GiB | 0.99 GiB | RAM Spillover |
| 32 GB GPU + 64 GB RAM | 32k · KV Q8_0 | 62 / 62 | 24.19 GiB | — | 100% VRAM |
| 48 GB Dual-GPU + 128 GB RAM | 8k · KV FP16 | 62 / 62 | 19.55 GiB | — | 100% VRAM |
| 48 GB Dual-GPU + 128 GB RAM | 32k · KV FP16 | 62 / 62 | 31.45 GiB | — | 100% VRAM |
| 48 GB Dual-GPU + 128 GB RAM | 32k · KV Q8_0 | 62 / 62 | 24.19 GiB | — | 100% VRAM |
| 64 GB Unified Memory | 8k · KV FP16 | 62 / 62 | 19.55 GiB | — | Unified Memory |
| 64 GB Unified Memory | 32k · KV FP16 | 62 / 62 | 31.45 GiB | — | Unified Memory |
| 64 GB Unified Memory | 32k · KV Q8_0 | 62 / 62 | 24.19 GiB | — | Unified Memory |
6. Ready-to-Run Local CLI Commands
With Ollama:
ollama run gemma3:27b
With
llama-server (Flash Attention + Q8_0 KV Cache sized for 16 GB VRAM):llama-server -m google_gemma-3-27b-it-Q4_K_M.gguf -ngl 37 -c 32768 -fa --cache-type-k q8_0 --cache-type-v q8_0
7. Ed25519 Certified Real Hardware Benchmarks
No certified Ed25519 passport recorded for this exact quantization yet (zero synthetic tok/s are ever invented). Run this model in Local Cockpit 0.4.0 to publish the first signed /b/lc-… passport!