Favicon of Phi-4

Phi-4

An open-source local LLM for reasoning and math that runs offline, supports fine-tuning, and is available through Ollama and Hugging Face.

Screenshot of Phi-4 website

Phi-4 is Microsoft's language model for developers building applications that need complex reasoning and math problem solving. It can run on your own hardware without a cloud connection.

  • Reasoning and mathematics: Use the model for tasks that require working through problems and generating text answers.
  • Domain fine-tuning: Adapt the model with specialized data for your organization's tasks.
  • Local deployment: Run inference on device or on your own infrastructure, with control over the model and its environment.

Phi-4 is open source under the MIT license and is available through Ollama, Hugging Face and Microsoft Foundry. Microsoft also offers hosted inference APIs, which run the model in the cloud.

Choose the variant according to the inputs your application needs. Phi-4 focuses on reasoning and mathematics; the separate Phi-4-mini supports function calling, while Phi-4-multimodal accepts text, images and audio.

Similar to Phi-4