New Tool Radar

Local AI

How to Run Phi-4 with Ollama for a First Chat

Run Microsoft's Phi-4 locally with Ollama and test a small model that punches above its size.

Schematic illustration with three step boxes for How to Run Phi-4 with Ollama for a First Chat.

Phi-4 is Microsoft’s 14B open-weight model, known for strong reasoning at a modest size. Ollama ships it under the plain phi4 tag. This guide pulls it, asks a question that needs a worked answer, and shows how to judge whether a 14B model is enough for your task.

Before you start

  • Ollama installed and running.
  • At least 16 GB of free RAM for the 14B build, plus about 9 GB of free disk.
  • A terminal and an internet connection for the first download only.

Pull the model

Download Phi-4:

ollama pull phi4

Then start a chat:

ollama run phi4

Ask a question with a checkable answer

Ask for a short explanation of a technical idea you already understand, so you can judge the answer. For example, ask it to explain how a hash table works in four sentences.

Decide whether the size fits your work

If the answers are accurate and fast enough, 14B is your size. If they are thin or wrong on your real tasks, note which tasks failed: that tells you whether to try a bigger model or a different family.

Worked example

Sample prompt:

Explain how a hash table works in four sentences, and give one example of a collision.

A good answer names keys, buckets, a hash function, and a collision where two keys land in the same bucket. If the example is wrong, the model is not reliable for that topic.

Expected result

UNTESTED in this guide: no chat was run while writing it. The expected result is that Phi-4 explains hash tables in four sentences and gives a correct collision example.

Limitations

Phi-4 is 14B, so it needs more memory than an 8B model and is slower on a plain CPU. Its answers are generated text: verify technical claims against a reference before using them.

Sources

See all