How to run Phi-4 locally

Phi-4 (Microsoft, 14B) runs on your own machine for $0 if you have about 13 GB of VRAM. Here's how to run it with Ollama, LM Studio, or llama.cpp — and what it would cost the other ways.

VRAM to run
~13 GB
Download
~9.1 GB
Quant
Q4_K_M
Context
16.4K

Three ways to run Phi-4 locally

1. Ollama — the one-liner

Auto-downloads a 4-bit quant and starts a chat — the simplest option.

ollama run phi4

First run downloads ~9.1 GB, then it's offline and free. Get Ollama at ollama.com.

2. LM Studio — point-and-click

Open LM Studio, search “Phi-4”, and download a quant that fits your VRAM (≈13 GB at Q4_K_M). Load it and chat — fully offline. It also serves a local OpenAI-compatible API you can point Spanvero at.

3. llama.cpp — maximum control

Grab a community GGUF build of Phi-4 from Hugging Face (search “Phi-4 GGUF” — bartowski and unsloth publish reliable ones), then run:

./llama-cli -m <Q4_K_M-file>.gguf -p "Hello" -ngl 99

Or serve it with ./llama-server -m <file>.gguf for an OpenAI-compatible API on :8080.

What it costs — $0 markup

License: commercial use OK.

Browse: Phi-4 cost · models for your GPU · all models

Open the free Spanvero advisor → — it detects your hardware and confirms what fits.

Prices as of 2026-06-17. $0 markup, your own accounts, we never resell compute. © 2026 Cynosure LLC.