Model reference · open weights

Phi-3-mini-4k

LLMs microsoft Text gen 2 builds Open weights 628k dl/mo

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.

  • Phi-3-mini-4k-instruct is a 3.8B parameter text-generation model developed by Microsoft for use in memory and compute constrained environments.
  • It supports a context length of 4K tokens and is trained on English and French data.
  • The model is released under the MIT license and is designed for general purpose applications requiring strong reasoning capabilities.

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 bymicrosoft
Released2024-04-22
Parameters3.8B
VRAM7.6 GB for the weights

What it runs on

Memory and cards for Phi-3-mini-4k-instruct-gguf (GGUF)

7.6 GBweights, file size
651 MBruntime overhead, at least

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.

CardWeights alone
RTX 3060 12 GBfits
RTX 4060 Ti 16 GBfits
RTX 3090 24 GBfits
RTX 4090 24 GBfits
RTX 5090 32 GBfits
L40S 48 GBfits
A100 80 GBfits
H100 80 GBfits
RTX PRO 6000 Blackwell 96 GBfits
DGX Spark (GB10) 128 GB unifiedfits
H200 141 GBfits
B200 180 GBfits

Builds

Sizes, precisions & builds

BuildParamsPrecisionWeightsSmallest setup
Phi-3-mini-4k-instruct ↗ 3.8BBF16 7.6 GBRTX 3060 12 GB
Phi-3-mini-4k-instruct-gguf (above) ↗
2 builds: Q4 2.4 GB … F16 7.6 GB
—GGUF 7.6 GBRTX 3060 12 GB

From the model card

What microsoft says about Phi-3-mini-4k

Read the model card

🎉 Phi-3.5: [mini-instruct]; [MoE-instruct] ; [vision-instruct]

Model Summary

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 ContextLong Context
Mini4K [HF] ; [ONNX] ; [GGUF]128K [HF] ; [ONNX]
Small8K [HF] ; [ONNX]128K [HF] ; [ONNX]
Medium4K [HF] ; [ONNX]128K [HF] ; [ONNX]
Vision128K [HF] ; [ONNX]

Intended Uses

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

  1. memory/compute constrained environments;
  2. latency bound scenarios;
  3. strong reasoning (especially math and logic).

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.

Release Notes

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.

BenchmarksOriginalJune 2024 Update
Instruction Extra Hard5.76.0
Instruction Hard4.95.1
Instructions Challenge24.642.3
JSON Structure Output11.552.3
XML Structure Output14.449.8
GPQA23.730.6
MMLU68.870.9
Average21.936.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!

How to Use

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

Tokenizer

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.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms