Model reference · open weights
Phi-3-mini-4k is an open-weight language model from microsoft. Phi-3-mini-4k-instruct-gguf (GGUF) weighs 7.6 GB; the smallest configuration that runs it is RTX 3060 12 GB.
Summary of the microsoft/Phi-3-mini-4k-instruct model card, 2026-10-01. The estimate below is for another build of the family.
What it is
| Released by | microsoft |
|---|---|
| Released | 2024-04-22 |
| Parameters | 3.8B |
| VRAM | 7.6 GB for the weights |
What it runs on
How much memory each request adds isn't estimated yet for this architecture. The weights need at least the cards below, plus room for the context.
| Card | Weights alone |
|---|---|
| RTX 3060 12 GB | fits |
| RTX 4060 Ti 16 GB | fits |
| RTX 3090 24 GB | fits |
| RTX 4090 24 GB | fits |
| RTX 5090 32 GB | fits |
| L40S 48 GB | fits |
| A100 80 GB | fits |
| H100 80 GB | fits |
| RTX PRO 6000 Blackwell 96 GB | fits |
| DGX Spark (GB10) 128 GB unified | fits |
| H200 141 GB | fits |
| B200 180 GB | fits |
Builds
| Build | Params | Precision | Weights | Smallest setup |
|---|---|---|---|---|
| Phi-3-mini-4k-instruct ↗ | 3.8B | BF16 | 7.6 GB | RTX 3060 12 GB |
| Phi-3-mini-4k-instruct-gguf (above) ↗ 2 builds: Q4 2.4 GB … F16 7.6 GB |
— | GGUF | 7.6 GB | RTX 3060 12 GB |
From the model card
🎉 Phi-3.5: [mini-instruct]; [MoE-instruct] ; [vision-instruct]
The Phi-3-Mini-4K-Instruct is a 3.8B parameters, lightweight, state-of-the-art open model trained with the Phi-3 datasets that includes both synthetic data and the filtered publicly available websites data with a focus on high-quality and reasoning dense properties. The model belongs to the Phi-3 family with the Mini version in two variants 4K and 128K which is the context length (in tokens) that it can support.
The model has underwent a post-training process that incorporates both supervised fine-tuning and direct preference optimization for the instruction following and safety measures. When assessed against benchmarks testing common sense, language understanding, math, code, long context and logical reasoning, Phi-3 Mini-4K-Instruct showcased a robust and state-of-the-art performance among models with less than 13 billion parameters.
Resources and Technical Documentation:
🏡 Phi-3 Portal 📰 Phi-3 Microsoft Blog 📖 Phi-3 Technical Report 🛠️ Phi-3 on Azure AI Studio 👩🍳 Phi-3 Cookbook 🖥️ Try It
| Short Context | Long Context | |
|---|---|---|
| Mini | 4K [HF] ; [ONNX] ; [GGUF] | 128K [HF] ; [ONNX] |
| Small | 8K [HF] ; [ONNX] | 128K [HF] ; [ONNX] |
| Medium | 4K [HF] ; [ONNX] | 128K [HF] ; [ONNX] |
| Vision | 128K [HF] ; [ONNX] |
Primary use cases
The model is intended for broad commercial and research use in English. The model provides uses for general purpose AI systems and applications which require
Our model is designed to accelerate research on language and multimodal models, for use as a building block for generative AI powered features.
Out-of-scope use cases
Our models are not specifically designed or evaluated for all downstream purposes. Developers should consider common limitations of language models as they select use cases, and evaluate and mitigate for accuracy, safety, and fairness before using within a specific downstream use case, particularly for high-risk scenarios.
Developers should be aware of and adhere to applicable laws or regulations (including privacy, trade compliance laws, etc.) that are relevant to their use case.
Nothing contained in this Model Card should be interpreted as or deemed a restriction or modification to the license the model is released under.
This is an update over the original instruction-tuned Phi-3-mini release based on valuable customer feedback. The model used additional post-training data leading to substantial gains on instruction following and structure output. We also improve multi-turn conversation quality, explicitly support tag, and significantly improve reasoning capability. We believe most use cases will benefit from this release, but we encourage users to test in their particular AI applications. We appreciate the enthusiastic adoption of the Phi-3 model family, and continue to welcome all feedback from the community.
The table below highlights improvements on instruction following, structure output, and reasoning of the new release on publich and internal benchmark datasets.
| Benchmarks | Original | June 2024 Update |
|---|---|---|
| Instruction Extra Hard | 5.7 | 6.0 |
| Instruction Hard | 4.9 | 5.1 |
| Instructions Challenge | 24.6 | 42.3 |
| JSON Structure Output | 11.5 | 52.3 |
| XML Structure Output | 14.4 | 49.8 |
| GPQA | 23.7 | 30.6 |
| MMLU | 68.8 | 70.9 |
| Average | 21.9 | 36.7 |
Notes: if users would like to check out the previous version, use the git commit id ff07dc01615f8113924aed013115ab2abd32115b. For the model conversion, e.g. GGUF and other formats, we invite the community to experiment with various approaches and share your valuable feedback. Let's innovate together!
Phi-3 Mini-4K-Instruct has been integrated in the 4.41.2 version of transformers. The current transformers version can be verified with: pip list | grep transformers.
Examples of required packages:
flash_attn==2.5.8
torch==2.3.1
accelerate==0.31.0
transformers==4.41.2
Phi-3 Mini-4K-Instruct is also available in Azure AI Studio
Phi-3 Mini-4K-Instruct supports a vocabulary size of up to 32064 tokens. The [tokenizer files](https://huggingfa
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.