Local AI Bench

phi-4

Phi · 14.66 billion parameters · Dense architecture

Running this model locally

phi-4 stores 14.66 billion parameters in memory. Reducing weight precision leaves more room for the attention cache and runtime buffers.

1 test records are available for this model. Check the runtime version and prompt length when comparing results. Source model card

Open in calculator
Architecture
DENSE
Parameters
14.66B
Layers
40
Hidden size
5120
KV heads
10
Head dimension
128
Maximum context
16,384 tokens
License
mit
Release
2024-12-12

Quantization and memory

Estimated footprint with an 8,192-token context. Runtime allocations can vary.

Estimated
EncodingWeightsFP16 cacheTotal with overhead
Q4_K_M8.9 GB1.7 GB12.4 GB
Q8_015.6 GB1.7 GB19.7 GB
Q5_K_M10.4 GB1.7 GB14.1 GB
4bit8.2 GB1.7 GB11.7 GB
8bit15.6 GB1.7 GB19.7 GB

Device measurements

Explore data
Model / hardwareRuntimePrompt / windowDecodeSource
phi-4M4 Max 64 GBollama0.40.16Q4_K_M512 / 8,19244.3 tok/sMeasured2026-11-29 UTC

Hardware to consider

Frequently asked questions

How large is phi-4?

phi-4 has 14.66 billion total parameters. Its dense layers use the full parameter set for inference.

How much memory does the attention cache require?

For 8,192 context tokens the estimated FP16 cache is 1.68 GB, before runtime overhead.

Where can I verify the model details?

The source model card below gives the architecture and links to its configuration and license. The hardware results table lists independently measured runtime conditions.