Phi-3.5-mini-instruct VRAM requirements
Phi-3.5-mini-instruct needs about 6 GiB of GPU memory at Q4_K_M with an 8K context. 8 GB GPUs like the RTX 4060 are enough. At 32K context it needs about 15.6 GiB, which fits 20 GB cards.
These are estimates from the model's config and file sizes, not measurements. How we calculate
VRAM by quantization
| Quant | File size | Total at 8K | Total at 32K |
|---|---|---|---|
| BF16 safetensors | 7.6 GB | 10.7 GiB–12.7 GiB | 19.7 GiB–22.0 GiB |
| GGUF Q8_0 (bartowski) | 4.1 GB | 6.9 GiB–7.6 GiB | 15.9 GiB–17.2 GiB |
| GGUF Q6_K (bartowski) | 3.1 GB | 6.0 GiB–6.7 GiB | 15.0 GiB–16.3 GiB |
| GGUF Q5_K_M (bartowski) | 2.8 GB | 5.7 GiB–6.4 GiB | 14.7 GiB–16.0 GiB |
| GGUF Q4_K_M (bartowski) | 2.4 GB | 5.4 GiB–6.0 GiB | 14.4 GiB–15.6 GiB |
Names like Q4_K_M and Q8_0 are quantization levels: fewer bits per weight means a smaller file and a small loss of quality. Totals add the KV cache (memory that grows with context length) and runtime buffers, for one chat at a time. Download files
Which GPUs can run it
| Memory | Usable | Examples | At 8K | At 32K |
|---|---|---|---|---|
| 8 GB | 7.0 GiB | RTX 4060, RTX 3060, RTX 5060 Ti +1 more | Fits | Does not fit |
| 10 GB | 9.0 GiB | RTX 3080 | Runs comfortably | Does not fit |
| 12 GB | 11.0 GiB | RTX 4070, RTX 3060, RTX 5070 +2 more | Runs comfortably | Does not fit |
| 16 GB | 14.0 GiB | RTX 4080 SUPER, RTX 5080, RX 7800 XT +5 more | Runs comfortably | Does not fit |
| 16 GB | 15.0 GiB | RTX 4060 Ti, RTX 4070 Ti SUPER | Runs comfortably | Tight fit |
| 20 GB | 18.0 GiB | RX 7900 XT | Runs comfortably | Fits |
| 24 GB | 22.0 GiB | RTX 4090, RX 7900 XTX, RTX 3090 | Runs comfortably | Fits |
| 32 GB | 30.0 GiB | RTX 5090 | Runs comfortably | Runs comfortably |
| 48 GB | 46.0 GiB | L40S | Runs comfortably | Runs comfortably |
| 80 GB | 78.0 GiB | A100, H100 | Runs comfortably | Runs comfortably |
| 64 GB · unified | 54.0 GiB | Apple M2 Max | Runs comfortably | Runs comfortably |
| 128 GB · unified | 96.0 GiB | Ryzen AI Max+ 395 | Runs comfortably | Runs comfortably |
| 128 GB · unified | 112.0 GiB | DGX Spark (GB10) | Runs comfortably | Runs comfortably |
| 128 GB · unified | 116.0 GiB | Apple M4 Max | Runs comfortably | Runs comfortably |
GGUF Q4_K_M (bartowski), one chat at a time. Usable memory is the total minus a default reserve for the OS and display.
Detailed checks
Architecture
- PublisherMicrosoft
- Hugging Face
microsoft/Phi-3.5-mini-instruct - Total parameters3,821,079,552
- Layers32
- Query heads32
- KV heads32 (mha)
- Head dimension96
- Context window131,072
The KV cache grows with context: about 3 GiB at 8K and 12 GiB at 32K in FP16.
FAQ
Is the download size the same as VRAM use?
No. The Q4_K_M file is about 2.2 GiB, but with an 8K context the total is about 6 GiB, because the KV cache and runtime buffers sit on top of the weights.
How much memory does a longer context add?
For Phi-3.5-mini-instruct the KV cache is about 3 GiB at 8K tokens and 12 GiB at 32K in FP16. The weights stay the same size.
Which quantization should I use?
Start with Q4_K_M (about 6 GiB at 8K). If you have the memory, BF16 needs about 12.7 GiB and stays closer to the original weights.
Download files
| Quant | Files | File size | Engine |
|---|---|---|---|
| BF16 safetensors | model-00001-of-00002.safetensors, model-00002-of-00002.safetensors | 7.64 GB 7,642,159,104 bytes | vllm, sglang |
| GGUF Q8_0 (bartowski) | Phi-3.5-mini-instruct-Q8_0.gguf | 4.06 GB 4,061,222,688 bytes | llama.cpp, ollama |
| GGUF Q6_K (bartowski) | Phi-3.5-mini-instruct-Q6_K.gguf | 3.14 GB 3,135,853,344 bytes | llama.cpp, ollama |
| GGUF Q5_K_M (bartowski) | Phi-3.5-mini-instruct-Q5_K_M.gguf | 2.82 GB 2,815,276,320 bytes | llama.cpp, ollama |
| GGUF Q4_K_M (bartowski) | Phi-3.5-mini-instruct-Q4_K_M.gguf | 2.39 GB 2,393,232,672 bytes | llama.cpp, ollama |
How this number is calculated
Total = weight file + KV cache + runtime buffers. The range spans low to high runtime overhead for the engine shown.
GGUF Q4_K_M (bartowski) · 8,192 tokens · llama.cpp
- Weights (file)
- 2.23 GiB (2,393,232,672 bytes)
- KV cache
- 3.00 GiB (3,221,225,472 bytes)
- Runtime buffers
- 0.13 GiB–0.75 GiB
- Total
- 5.35 GiB–5.98 GiB
- Requested context is within the recorded native window of 131072 tokens.
- Full-resident weight estimates use total parameters, including inactive MoE experts.
- Weight bytes come from the selected weight files only, not from every file in the repository.
- Download file size is not peak GPU memory. Runtime layout, allocator padding, and KV are extra.
- Counted files: Phi-3.5-mini-instruct-Q4_K_M.gguf.
- Context budget is the number of cached tokens per sequence (prompt plus reserved generation).
- Concurrent sequences share one model replica; weights are not multiplied by sequence count.
- KV dtype is independent of weight quantization unless you change it.
Related pages
Sources
- Phi-3.5-mini-instruct model card
- config.json — revision 2fe192450127e6a83f7441aef6e3ca586c338b77
- safetensors index — metadata.total_size=7642159104
- Artifact repo bartowski/Phi-3.5-mini-instruct-GGUF
Calculator
Loading catalog snapshot…
Pick a model to see how much memory it needs.