Skip to main content

Model guide

Phi-4 14B Instruct

The original Phi-4 14B is a text model focused on reasoning-rich tasks such as mathematics and code. Compare it on problems whose answers you can check, rather than using fluent explanations as the score. It is distinct from Phi-4 Reasoning and Phi-4 Mini, which have different training and context characteristics.

14BText chat16,384 token contextView the model card →

At a glance

Parameters
14B
Accepts
Text
Returns
Text
Published context limit
16,384 tokens
Model format
safetensors · GGUF
Software and download hosts
Ollama · Transformers. Follow the exact setup below; this list does not establish support for every format, input type or software version.
Suggested compression
Q4_K_M
Model-weight download
Q4_K_M weights · 9.05 GBbartowski (community conversion)phi-4-Q4_K_M.gguf
Languages
English
License
MIT

Will it fit?

Phi-4 14B Instruct · Q4_K_M download. Fit depends on your computer, the app you run it in and the conversation length you need.

Check on your computer

Best for

  • Check a production-rate calculation against arithmetic you can do independently. Record both the answer and its units.

Choose something else when

  • Choose a vision model for a photograph of the same problem.

First setup

Check a representative task

Use a reasoning problem with a small, independently checkable answer.

A machine makes 18 parts per hour for 2 hours, then 12 parts per hour for 3 hours. Seven parts fail inspection. How many usable parts remain? Show a brief calculation.

Check the result: 18×2 + 12×3 − 7 = 65 usable parts. Check the calculation rather than the fluency of the explanation.

This creates a 4,096-token copy of phi4 named phi-4-14b-instruct-short-context. Save the following as a file named Modelfile in your working folder:

FROM phi4
PARAMETER num_ctx 4096

Then run these commands from that folder:

ollama pull phi4
ollama create phi-4-14b-instruct-short-context -f ./Modelfile
ollama run phi-4-14b-instruct-short-context

Run the task check. While the model is loaded, run ollama ps in another terminal and check CONTEXT and PROCESSOR.

The recorded Ollama package is Q4_K_M: 9.05 GB of model weights. Use Ollama 0.40.18 or a supporting newer release. A Hugging Face GGUF or MLX checkpoint is a separate representation; choose the matching source and runner in the memory calculator.

See Ollama context settings and the Modelfile instructions.

Other models for this task