Microsoft Phi-4 14B (Q8_0) (Q8_0) — Exact VRAM, KV Cache & Tensor X-Ray
Near-lossless 8-bit Phi-4 14B (~14.5 GiB) for STEM and math accuracy on 24 GB GPUs.
⚡ 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)16.82 GiB32k w/ Q8_0 KV: 18.78 GiB
Binary .GGUF Weights14.51 GiB8.50 effective bits/weight
Parameters (Active / Total)14.66 / 14.66 B243 parsed tensors
KV Cache Growth200.0 MiB/1kQ8_0 KV: 106.2 MiB / 1k tok
1. HuggingFace Binary Provenance
| Repository | bartowski/phi-4-GGUF |
|---|---|
| Inspected File | phi-4-Q8_0.gguf (14.51 GiB) |
| HF Commit SHA | 19cd65f97c2f |
| Harvested UTC | 2026-12-01 15:05:03 UTC |
| Parsed Header | 3 555 756 bytes (SHA-256 cf8b08606341068e2b74…) |
2. Transformer & GQA Architecture
| GGUF Architecture | phi3 (Dense) |
|---|---|
| Transformer Layers | 40 layers (~345.4 MiB / layer) |
| Dimensions (d_model / FFN) | 5120 / 17920 |
| Attention Heads (Q / KV) | 40 Q / 10 KV (GQA 4.0:1, dim 128) |
| Native Context & Vocab | 16 384 tokens · vocab 100 352 |
3. Exact GGML Quantization Mix Inside This Binary
Rather than quantizing every tensor identically, Q8_0 keeps sensitive embedding, output and attention tensors at higher precision:
| GGML Type | Tensor Count | Volume | Weight Share | Distribution |
|---|---|---|---|---|
Q8_0 | 162 | 14.51 GiB | 100.0% | |
F32 | 81 | 0.00 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.39 GiB | 0.21 GiB | 0.11 GiB | 15.65 GiB | 15.47 GiB |
| 4k (4 096) | 0.78 GiB | 0.42 GiB | 0.22 GiB | 16.04 GiB | 15.68 GiB |
| 8k (8 192) | 1.56 GiB | 0.83 GiB | 0.44 GiB | 16.82 GiB | 16.09 GiB |
| 16k (16 384) | 3.13 GiB | 1.66 GiB | 0.88 GiB | 18.39 GiB | 16.92 GiB |
| 32k (32 768) | 6.25 GiB | 3.32 GiB | 1.76 GiB | 21.51 GiB | 18.58 GiB |
| 64k (65 536) | 12.50 GiB | 6.64 GiB | 3.52 GiB | 27.76 GiB | 21.90 GiB |
| 128k (131 072) | 25.00 GiB | 13.28 GiB | 7.03 GiB | 40.26 GiB | 28.54 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 | 16 / 40 | 7.31 GiB | 9.03 GiB | RAM Spillover |
| 8 GB GPU + 16 GB RAM | 32k · KV FP16 | 11 / 40 | 6.98 GiB | 14.31 GiB | Out of Memory |
| 8 GB GPU + 16 GB RAM | 32k · KV Q8_0 | 13 / 40 | 7.01 GiB | 11.35 GiB | RAM Spillover |
| 12 GB GPU + 32 GB RAM | 8k · KV FP16 | 26 / 40 | 11.07 GiB | 5.27 GiB | RAM Spillover |
| 12 GB GPU + 32 GB RAM | 32k · KV FP16 | 19 / 40 | 10.92 GiB | 10.36 GiB | RAM Spillover |
| 12 GB GPU + 32 GB RAM | 32k · KV Q8_0 | 22 / 40 | 10.79 GiB | 7.56 GiB | RAM Spillover |
| 16 GB GPU + 32 GB RAM | 8k · KV FP16 | 36 / 40 | 14.83 GiB | 1.51 GiB | RAM Spillover |
| 16 GB GPU + 32 GB RAM | 32k · KV FP16 | 27 / 40 | 14.87 GiB | 6.42 GiB | RAM Spillover |
| 16 GB GPU + 32 GB RAM | 32k · KV Q8_0 | 32 / 40 | 15.00 GiB | 3.36 GiB | RAM Spillover |
| 24 GB GPU + 64 GB RAM | 8k · KV FP16 | 40 / 40 | 16.34 GiB | — | 100% VRAM |
| 24 GB GPU + 64 GB RAM | 32k · KV FP16 | 40 / 40 | 21.29 GiB | — | 100% VRAM |
| 24 GB GPU + 64 GB RAM | 32k · KV Q8_0 | 40 / 40 | 18.36 GiB | — | 100% VRAM |
| 32 GB GPU + 64 GB RAM | 8k · KV FP16 | 40 / 40 | 16.34 GiB | — | 100% VRAM |
| 32 GB GPU + 64 GB RAM | 32k · KV FP16 | 40 / 40 | 21.29 GiB | — | 100% VRAM |
| 32 GB GPU + 64 GB RAM | 32k · KV Q8_0 | 40 / 40 | 18.36 GiB | — | 100% VRAM |
| 48 GB Dual-GPU + 128 GB RAM | 8k · KV FP16 | 40 / 40 | 16.34 GiB | — | 100% VRAM |
| 48 GB Dual-GPU + 128 GB RAM | 32k · KV FP16 | 40 / 40 | 21.29 GiB | — | 100% VRAM |
| 48 GB Dual-GPU + 128 GB RAM | 32k · KV Q8_0 | 40 / 40 | 18.36 GiB | — | 100% VRAM |
| 64 GB Unified Memory | 8k · KV FP16 | 40 / 40 | 16.34 GiB | — | Unified Memory |
| 64 GB Unified Memory | 32k · KV FP16 | 40 / 40 | 21.29 GiB | — | Unified Memory |
| 64 GB Unified Memory | 32k · KV Q8_0 | 40 / 40 | 18.36 GiB | — | Unified Memory |
6. Ready-to-Run Local CLI Commands
With Ollama:
ollama run phi4:14b-q8_0
With
llama-server (Flash Attention + Q8_0 KV Cache sized for 16 GB VRAM):llama-server -m phi-4-Q8_0.gguf -ngl 32 -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!