Skip to content

How-ToRAM

How to Run Microsoft Phi-4 Locally: Hardware, Downloads and Setup on a Home PC

Microsoft's Phi-4 is a free, MIT-licensed 14B model whose 4-bit version is only about 9GB, so it suits ordinary gaming PCs. We explain which Phi-4 model to pick, how much VRAM each needs, and how to run it with Ollama, LM Studio or llama.cpp, including the settings Microsoft recommends for Phi-4-reasoning.

By , Systems & Technical Editor

4 min read

How to Run Microsoft Phi-4 Locally: Hardware, Downloads and Setup on a Home PC

This guide is based on Microsoft's official model cards for Phi-4, Phi-4-mini-instruct and Phi-4-reasoning, Ollama's model library pages, Unsloth's GGUF file listings and the llama.cpp documentation, all read on 6 December 2026. Where we say a PC should handle a given setup, that's our estimate, not a measured result.

Phi-4 is Microsoft's family of small, open-weight language models. The main model is a 14-billion-parameter "dense decoder-only Transformer", released on 12 December 2024 under the MIT licence, so you can download it free and use it commercially. Microsoft aims it at "memory/compute constrained environments" and reasoning and logic tasks, primarily in English. Unlike the mixture-of-experts models that have become popular since, every one of those 14 billion parameters is used for every token, which makes Phi-4 simple to size: if the file fits in your graphics card's memory with some room to spare, it runs quickly.

Step 1: Pick the right Phi-4 model

The family now has several members, and they need very different hardware:

Model

Parameters

Context window

What it's for

Phi-4

14B

16K tokens

General chat, writing, maths and code

Phi-4-reasoning / reasoning-plus

14B

32K tokens

Step-by-step reasoning, maths and science

Phi-4-mini-instruct

3.8B

128K tokens

Lightweight chat, 23 languages, function calling

Phi-4-mini-reasoning

3.8B

128K tokens (Ollama listing)

Maths reasoning on low-end hardware

Phi-4-multimodal-instruct

5.6B

128K tokens

Text, image and audio input

Figures come from Microsoft's model cards, apart from the Phi-4-mini-reasoning context window, which is from Ollama's listing. For most people with a graphics card, Phi-4 or Phi-4-reasoning is the one to try. If you only have integrated graphics or an 8GB card, start with Phi-4-mini. Our Phi-4 vs Phi-4-mini comparison goes into the trade-offs.

Step 2: Check how much memory you have

Because Phi-4 is a dense model, VRAM is what matters. Here are the main download sizes from Ollama's library and Unsloth's GGUF files on Hugging Face:

Version

Phi-4 (14B)

Phi-4-mini (3.8B)

Q3_K_M (3-bit)

7.19GB

2.12GB

Q4_K_M (4-bit, Ollama default)

8.89GB (Ollama lists 9.1GB)

2.49GB (Ollama lists 2.5GB)

Q6_K (6-bit)

12.03GB

3.16GB

Q8_0 (8-bit)

15.58GB (Ollama lists 16GB)

4.08GB (Ollama lists 4.1GB)

16-bit (full precision)

29.32GB (Ollama lists 29GB)

7.68GB (Ollama lists 7.7GB)

Ollama's Phi-4-reasoning download is a little bigger at 11GB for the default 4-bit version, 17GB at 8-bit and 29GB at 16-bit.

In our estimate, that gives these rough tiers:

  • 8GB graphics card: Phi-4-mini runs comfortably, even at 8-bit. The 4-bit Phi-4 file is larger than 8GB, so it would spill into system RAM and slow down; a 3-bit file is a tighter squeeze.

  • 12GB graphics card: the 4-bit Phi-4 fits with room for context. This is the sweet spot for the 14B models.

  • 16GB graphics card: the 6-bit Phi-4 fits with room to spare, and the 4-bit Phi-4-reasoning leaves space for longer reasoning chains. The 8-bit file is too close to 16GB to be comfortable.

  • 32GB graphics card: even the 16-bit version fits, though only just.

  • No graphics card: Phi-4-mini is the realistic choice on a CPU, and our guide to running a local LLM on integrated graphics covers that route.

Context uses memory on top of the file size, which matters most for Phi-4-reasoning because it writes long chains of thought before answering. Our LLM context length and VRAM explainer covers why. If you're unsure which quantisation to pick, see our Q4_K_M vs Q8_0 comparison.

Step 3: Choose your software

  • Ollama: the simplest route. The official library has phi4, phi4-mini, phi4-reasoning and phi4-mini-reasoning, each in 4-bit, 8-bit and 16-bit versions, and Ollama tags phi4-mini with tool (function calling) support.

  • LM Studio: a desktop app that, according to its documentation, runs GGUF models on Windows using llama.cpp and can download models for you, including the GGUF files above. See our llama.cpp vs LM Studio comparison if you're choosing between the two.

  • llama.cpp: the most control. Our llama.cpp on Windows guide covers installing it.

Step 4: Download and run it

With Ollama, one command downloads the default 4-bit Phi-4 (about 9.1GB) and starts a chat:

ollama run phi4

Swap in phi4-mini, phi4-reasoning or phi4-mini-reasoning for the other models, or add a tag such as phi4:14b-q8_0 for the 8-bit version.

With llama.cpp, you can pull a GGUF straight from Hugging Face with the -hf option, which the llama.cpp server documentation says defaults to the Q4_K_M file if you don't name a quantisation. For example:

llama serve -hf unsloth/phi-4-GGUF:Q4_K_M -c 16384

The -c option sets the context size. Phi-4's model card gives a 16K-token context length, so there's no point setting it higher for the base model.

Step 5: Use the right settings for the reasoning models

Microsoft's Phi-4-reasoning model card says that to get the most out of the model you should use a temperature of 0.8, top-k of 50 and top-p of 0.95, and allow up to 32,768 new tokens for complex queries so the chain of thought isn't cut short. Its answers come in two parts: a reasoning block, then a summary.

Microsoft also warns that the 3.8B Phi-4-mini "does not have the capacity to store too much factual knowledge", so check facts it gives you, or pair it with a search tool.

Which graphics card should you buy?

Phi-4's 14B models are a good match for 12GB and 16GB graphics cards. Our best GPUs for Phi-4 guide covers which ones to consider, and for other models that suit similar hardware, see our best local LLMs for 12GB of VRAM.

The bottom line

Phi-4 is one of the easiest capable open models to run at home: a 14B dense model under the MIT licence, with a 4-bit download of about 9GB that fits a 12GB graphics card with room for context. Use Phi-4-reasoning if you want step-by-step maths and science answers and have a 16GB card for its longer outputs, or Phi-4-mini if you only have 8GB of VRAM or integrated graphics. Ollama's phi4 models are the quickest way in, with llama.cpp and LM Studio giving more control.

Sources

  1. 01Microsoft, Phi-4 model card (Hugging Face)
  2. 02Microsoft, Phi-4-mini-instruct model card (Hugging Face)
  3. 03Microsoft, Phi-4-reasoning model card (Hugging Face)
  4. 04Microsoft, Phi-4-multimodal-instruct model card (Hugging Face)
  5. 05Ollama, phi4 model tags
  6. 06Ollama, phi4-mini model tags
  7. 07Ollama, phi4-reasoning model tags
  8. 08Ollama, phi4-mini-reasoning model page
  9. 09LM Studio, app documentation
  10. 10Unsloth, Phi-4 GGUF files (Hugging Face)
  11. 11Unsloth, Phi-4-mini-instruct GGUF files (Hugging Face)
  12. 12llama.cpp, server documentation (GitHub)

About the author

Marcus Thorne

Systems & Technical Editor

Marcus writes Forge PC's step-by-step build, troubleshooting and system optimisation guides. His background spans Windows kernel and power-state diagnostics, UEFI/BIOS configuration, NVMe storage arrays, ATX 3.1 power delivery and running local AI and LLM workloads on consumer graphics cards.

More from Marcus Thorne

Read next

Best GPUs for Running Microsoft Phi-4 Locally in 2026

Best Picks

Best GPUs for Running Microsoft Phi-4 Locally in 2026

Phi-4 is a dense 14B model, so VRAM decides how well it runs. We pick the best graphics cards for running Microsoft's Phi-4 locally, from 16GB RTX 5060 Ti and RX 9060 XT cards to the 12GB RTX 5070, the 32GB RTX 5090 and an 8GB card for Phi-4-mini, based on official specs and file sizes.

Hannah Vance4 min

Phi-4 vs Phi-4-mini for Local AI: Which Microsoft Model Suits Your PC?

Versus

Phi-4 vs Phi-4-mini for Local AI: Which Microsoft Model Suits Your PC?

Microsoft's Phi-4 and Phi-4-mini share a name but suit very different PCs. We compare the 14B Phi-4 with the 3.8B Phi-4-mini on Microsoft's benchmark scores, context window, languages, function calling, download sizes and the VRAM each needs, to help you pick the one your hardware can run.

Callum Reid3 min

Best GPUs for GLM-4.7-Flash in 2026: Graphics Cards for Z.ai's 30B Local Model

Best Picks

Best GPUs for GLM-4.7-Flash in 2026: Graphics Cards for Z.ai's 30B Local Model

GLM-4.7-Flash needs about 18GB for a 4-bit version, but its mixture-of-experts design lets part of it sit in system RAM. We pick the best graphics cards for running it locally, from the 32GB RTX 5090 to 16GB NVIDIA and AMD cards, based on official specifications and file sizes.

Hannah Vance4 min