Phi-3-mini-4k-instruct GGUF size and VRAM requirements
microsoft/Phi-3-mini-4k-instruct-gguf is a mid-size instruction-tuned chat model with 3.82 billion parameters, built on the phi3 architecture. It is released under the mit license and has been downloaded 27,382 times.
Under the hood it uses 32 transformer layers, a hidden size of 3,072, 32 attention heads.
To run microsoft/Phi-3-mini-4k-instruct-gguf locally at a 4,096-token context, its quantized versions need between 4.53 GB (Q4, lowest quality) and 9.42 GB (GGUF, highest quality) of memory, weights plus KV cache and a system margin included.
For most users the best balance is Q4, needing about 4.53 GB. That means microsoft/Phi-3-mini-4k-instruct-gguf fits entirely in the VRAM of a 6 GB GPU or larger, running fully on the GPU.
Available GGUF quantizations for microsoft/Phi-3-mini-4k-instruct-gguf include Q4, GGUF. The model supports a native context length of up to 4,096 tokens; a longer context grows the KV cache and the memory needed.
GGUF file size and memory by quantization
Compare real GGUF weight sizes, estimated KV cache and total memory for Q4, Q5, Q8 and every quantization published in this repository.
| Quant. | Bits | Quality | Weights | KV | Total | Speed~ | Verdict |
|---|---|---|---|---|---|---|---|
| Q4 | 5.01 | Very good | 2.23 GB | 1.5 GB | 4.53 GB | 179.5 t/s | Fits in VRAM |
| GGUF | 16.0 | Excellent | 7.12 GB | 1.5 GB | 9.42 GB | 7.0 t/s | Offload |
KV cache computed from the model's exact architecture. Speed is a rough estimate bounded by memory bandwidth.
Frequently asked questions
What kind of model is microsoft/Phi-3-mini-4k-instruct-gguf?
microsoft/Phi-3-mini-4k-instruct-gguf is an instruction-tuned chat model with 3.82 billion parameters, based on the phi3 architecture. It is released under the mit license and distributed as GGUF files for local inference.
How much VRAM do you need to run microsoft/Phi-3-mini-4k-instruct-gguf?
You need about 4.53 GB of VRAM to run microsoft/Phi-3-mini-4k-instruct-gguf entirely on the GPU using the Q4 quantization (at a 4,096-token context). Smaller quantizations lower the requirement at the cost of quality.
Can I run microsoft/Phi-3-mini-4k-instruct-gguf on an 8 GB GPU?
Yes. With 8 GB of VRAM you can run microsoft/Phi-3-mini-4k-instruct-gguf fully on the GPU using Q4 (about 4.53 GB).
Can I run microsoft/Phi-3-mini-4k-instruct-gguf on a 16 GB GPU?
Yes. With 16 GB of VRAM you can run microsoft/Phi-3-mini-4k-instruct-gguf fully on the GPU using GGUF (about 9.42 GB).
Can I run microsoft/Phi-3-mini-4k-instruct-gguf on a 24 GB GPU?
Yes. With 24 GB of VRAM you can run microsoft/Phi-3-mini-4k-instruct-gguf fully on the GPU using GGUF (about 9.42 GB).
What context length does microsoft/Phi-3-mini-4k-instruct-gguf support?
microsoft/Phi-3-mini-4k-instruct-gguf supports a native context length of up to 4,096 tokens. A longer context grows the KV cache, so it increases the memory needed to run the model.
What is the best quantization for microsoft/Phi-3-mini-4k-instruct-gguf?
For microsoft/Phi-3-mini-4k-instruct-gguf, higher bits-per-weight means better quality. A common sweet spot is a Q4_K_M or Q5_K_M quantization, which keeps most of the quality while roughly halving the memory versus 8-bit. Pick the highest quantization that still fits in your VRAM.