microsoft
Phi-3-mini-4k-instruct
- Parameters
- 3.8B
- Max context length
- 4,096
- Architecture
- phi3
- License
- Commercial OK
- License
- mit
About Phi-3-mini-4k-instruct
Phi-3-mini-4k-instruct is a model published in GGUF format. GGUF files are published by microsoft/Phi-3-mini-4k-instruct-gguf. It has about 3.8B parameters, the phi3 architecture, a maximum context length of 4,096 tokens (values written in the GGUF).
There is one quantization, F16, with a file size of 7.64 GB (actual size on Hugging Face).
According to microsoft/Phi-3-mini-4k-instruct-gguf, the license is MIT License, which allows commercial use (keep the license text and copyright notice when redistributing). Check the original license for the terms of use.
File size and estimated memory per quantization
- Up to 8 GB
- Up to 16 GB
- Up to 24 GB
- Up to 48 GB
- Up to 128 GB
- More
File sizes are the actual values on Hugging Face. Memory is estimated for each context length (KV cache f16). The formula is in How memory is calculated.
All memory figures are Estimated (KV cache f16). It should run on a setup with at least this much VRAM (or Mac unified memory). Click a value to see the devices and models that fit that amount (Find by GPU / Mac).
About the "quality guide" (how far a quantization drifts from the original)
For each quantization type, how far the output drifts from the original model, grouped into six levels from values llama.cpp measured on Llama-3-8B.
The value is mean KLD (the difference between the original and quantized model in next-token probabilities); smaller means closer to the original. Quantizations made with an imatrix (importance data) come out slightly smaller. Levels use the value without an imatrix (or with one, for types that only have that).
These values were not measured on this model. Larger models and MoE models tend to drift less with the same type. Distributor-specific mixed types (such as UD-Q4_K_XL) cannot be matched by type name alone, so they show "-".
| Quantization | Quality guide | KLD (no imatrix) | KLD (imatrix) | Size (Llama-3-8B) |
|---|---|---|---|---|
| Q8_0 | Nearly identical | 0.0014 | - | 7.96 GiB |
| Q6_K | Very small | 0.0055 | - | 6.14 GiB |
| Q5_K_M | Very small | 0.0108 | - | 5.33 GiB |
| Q5_K_S | Small | 0.0166 | - | 5.21 GiB |
| Q5_1 | Small | 0.0180 | - | 5.65 GiB |
| Q5_0 | Small | 0.0222 | - | 5.21 GiB |
| Q4_K_M | Small | 0.0313 | 0.0282 | 4.58 GiB |
| Q4_K_S | Medium | 0.0431 | 0.0320 | 4.37 GiB |
| IQ4_NL | Small | - | 0.0357 | 4.35 GiB |
| IQ4_XS | Small | - | 0.0363 | 4.14 GiB |
| Q4_1 | Medium | 0.0717 | - | 4.78 GiB |
| Q4_0 | Medium | 0.0719 | - | 4.34 GiB |
| Q3_K_L | Medium | 0.0872 | 0.0731 | 4.03 GiB |
| Q3_K_M | Medium | 0.1019 | 0.0844 | 3.74 GiB |
| IQ3_M | Medium | - | 0.1025 | 3.53 GiB |
| IQ3_S | Medium | - | 0.1113 | 3.42 GiB |
| IQ3_XS | Large | - | 0.1387 | 3.28 GiB |
| IQ3_XXS | Large | - | 0.1836 | 3.05 GiB |
| Q3_K_S | Large | 0.2282 | 0.1998 | 3.41 GiB |
| IQ2_M | Large | - | 0.3260 | 2.74 GiB |
| Q2_K | Very large | 0.4451 | 0.3322 | 2.96 GiB |
| Q2_K_S | Very large | - | 0.4034 | 2.96 GiB |
| IQ2_S | Very large | - | 0.4392 | 2.56 GiB |
| IQ2_XS | Very large | - | 0.5463 | 2.43 GiB |
| IQ2_XXS | Very large | - | 0.8120 | 2.24 GiB |
| IQ1_M | Very large | - | 1.3931 | 2.01 GiB |
| IQ1_S | Very large | - | 2.2546 | 1.88 GiB |
Source: llama.cpp (MIT), measured on Llama-3-8B against FP16, Wikitext-2, revision f364eb6f. Original table · Reading and choosing quantizations
GGUF source
microsoft/Phi-3-mini-4k-instruct-gguf
Published by the original developer About this label
Last checked: Oct 22, 2026
- Architecture
- phi3
- Supported before llama.cpp b4409
- Parameters
- 3.8B
- Max context length
- 4,096
- License
- mit Commercial OK
| Quantization | File size Measured | Quality guide | 4,096 max |
|---|---|---|---|
| F16 | 7.64 GB | Original precision | 10.3 GB |
Ollama ollama run hf.co/microsoft/Phi-3-mini-4k-instruct-gguf:F16
llama.cpp llama-server -hf microsoft/Phi-3-mini-4k-instruct-gguf:F16
Third-party evaluations
Values from other organizations for the original model before quantization. Not this site's own rating. Values are for the original model before quantization. GGUF quantization (especially small quantizations) can lower performance.
Human preference (LMArena)
1,128 1,122–1,135
Phi-3 Mini 4K Instruct · 20,118 votes · Values as of Nov 9, 2026
Source: LMArena (CC BY 4.0). Original leaderboard · See in ranking
License and commercial use
MIT License Commercial OK
Allows commercial use, modification and redistribution. When redistributing, keep the copyright notice and license text.
The original model's license has not been fetched yet, so this is based on the GGUF repository's label. Original license text (checked Oct 18, 2026)
The summary states facts this site read from the original text and is not legal advice. Always check the original license and its latest terms before use. All licenses
How to run
Example commands using F16. To use another quantization, replace the name with one from the table above. How to run local LLMs
Ollama
Run it by pointing directly at the GGUF on Hugging Face.
ollama run hf.co/microsoft/Phi-3-mini-4k-instruct-gguf:F16
llama.cpp
Pass the repository and quantization name to llama-server (or llama-cli) with -hf.
llama-server -hf microsoft/Phi-3-mini-4k-instruct-gguf:F16
LM Studio
Paste microsoft/Phi-3-mini-4k-instruct-gguf into the search box, download it, and choose the quantization from the file list.
Other models from microsoft
-
3.8B
microsoft
Phi-4-mini-instruct
- Q4_K_M size
- 2.49 GB
- Memory at 8K
- 4.51 GB
Measured Estimated VRAM 6 GB+
-
1.8B
microsoft
VibeVoice-ASR-BitNet
- Q6_K size
- 0.99 GB
- Memory at 8K
- 2.08 GB
Measured Estimated VRAM 4 GB+
-
7.2B
microsoft
WizardLM-2-7B
- Q4_K_M size
- 4.37 GB
- Memory at 8K
- 6.04 GB
Measured Estimated VRAM 6 GB+
-
14.7B
microsoft
phi-4
- Q4_K_M size
- 9.05 GB
- Memory at 8K
- 11.5 GB
Measured Estimated VRAM 12 GB+
-
3.8B
microsoft
Phi-3.5-mini-instruct
- Q4_K_M size
- 2.39 GB
- Memory at 8K
- 6.22 GB
Measured Estimated VRAM 6 GB+
-
4.3B
microsoft
FrogNano-4B-2609
- Q4_K_M size
- 2.80 GB
- Memory at 8K
- 4.16 GB
Measured Estimated VRAM 4 GB+
Models of a similar size (other developers)
-
4.2B
Qwen
Qwen3.5-4B
- Q4_K_M size
- 2.74 GB
- Memory at 8K
- 4.11 GB
Measured Estimated VRAM 4 GB+
-
4.1B
peculiar-ragdoll
Sharp-Spark-X2.5-4B
- Q4_K_XL size
- 2.68 GB
- Memory at 8K
- 3.90 GB
Measured Estimated VRAM 4 GB+
-
3.1B
ZejunLi
AdaVaR-3B
- Q4_K_M size
- 1.93 GB
- Memory at 8K
- 3.08 GB
Measured Estimated VRAM 4 GB+
-
4B
Qwen
Qwen3-4B-Instruct-2507
- Q4_K_M size
- 2.50 GB
- Memory at 8K
- 4.55 GB
Measured Estimated VRAM 6 GB+
-
4B
Qwen
Qwen3-VL-4B-Instruct
- Q4_K_M size
- 2.50 GB
- Memory at 8K
- 4.55 GB
Measured Estimated VRAM 6 GB+
-
4B
Qwen
Qwen3-4B
- Q4_K_M size
- 2.50 GB
- Memory at 8K
- 4.55 GB
Measured Estimated VRAM 6 GB+
Frequently asked questions
- How much memory do I need to run Phi-3-mini-4k-instruct (F16)?
- The file size is 7.64 GB (measured). With a 4,096-token context, the estimated memory including the KV cache is 10.3 GB. The formula is published at https://localllm.az-arte.com/en/guide/memory-calculation.
- Can Phi-3-mini-4k-instruct be used commercially?
- The license is MIT License (Commercial use allowed).Allows commercial use, modification and redistribution. When redistributing, keep the copyright notice and license text. Check the original license text before deciding.
- What is the command to run Phi-3-mini-4k-instruct with Ollama?
- Run "ollama run hf.co/microsoft/Phi-3-mini-4k-instruct-gguf:F16" to use the GGUF on Hugging Face directly. To use another quantization, replace the name at the end.