Favicon of Phi-4

Phi-4

An open-source local LLM for reasoning and math. Run it on your own hardware without cloud connectivity, or use Microsoft's hosted inference APIs.

Screenshot of Phi-4 website

Phi-4 is Microsoft's small language model for complex reasoning and math problem solving. It's for developers building generative AI applications who want to run a model on their own hardware, rather than depend on a cloud connection. The original Phi-4 has 14 billion parameters and uses the MIT license; hardware needs depend on the chosen model and precision.

Local deployment gives you control over the model and its environment, and it can run without cloud connectivity. Phi models are available through Ollama and Hugging Face. Microsoft also offers hosted inference through Microsoft Foundry and Azure APIs, where the model runs in the cloud rather than on your device.

You can fine-tune Phi models with domain-specific data to adapt them to an organization's needs. The family emphasizes resource efficiency and low latency for applications that need quick responses, such as real-time guidance and autonomous systems. Phi-4's particular focus is reasoning and mathematics, so it's a candidate for applications where solving problems matters more than handling media inputs.

The related models serve different needs. Phi-4-mini supports function calling and natural-language instructions, while Phi-4-multimodal accepts text, images, and audio. The multimodal model covers speech recognition, translation, and image analysis, including OCR and interpretation of charts and tables.

Similar to Phi-4