ai/phi4

Verified Publisher

By Docker

Updated 10 months ago

Microsoft’s compact model, surprisingly capable at reasoning and code

Model
22

50K+

ai/phi4 repository overview

Phi-4

logo

Phi-4 is a 14-billion parameter language model developed by Microsoft Research. It is part of the Phi model family, emphasizing data quality and reasoning capabilities over pure scale.

Intended uses

Phi-4 is designed for:

  • STEM reasoning and problem-solving (math, physics, coding, logic)
  • Memory and compute-efficient applications
  • Educational and research applications
  • Conversational AI and chatbot experiences

Characteristics

AttributeDetails
ProviderMicrosoft
Architecturephi3
Cutoff dateJune 2024
LanguagesEnglish (primary), German, Spanish, French, Portuguese, Italian, Hindi, Japanese
Tool calling
Input modalitiesText
Output modalitiesText
LicenseMIT

Available model variants

Model variantParametersQuantizationContext windowVRAM¹Size
ai/phi4:latest

ai/phi4:14B-Q4_K_M
15BIQ2_XXS/Q4_K_M16K tokens9.78 GiB8.43 GB
ai/phi4:14B-Q4_015BQ4_016K tokens9.16 GiB7.80 GB
ai/phi4:14B-Q4_K_M15BIQ2_XXS/Q4_K_M16K tokens9.78 GiB8.43 GB
ai/phi4:14B-F1615BF1616K tokens27.97 GiB27.31 GB

¹: VRAM estimated based on model characteristics.

latest14B-Q4_K_M

Use this AI model with Docker Model Runner

First, pull the model:

docker model pull ai/phi4

Then run the model:

docker model run ai/phi4

For more information on Docker Model Runner, explore the documentation.

Considerations

  • Phi-4 is optimized for single-turn queries rather than long multi-turn conversations.
  • Hallucinations may occur, particularly in factual knowledge recall.
  • Instruction-following capabilities are less robust than some larger models.

Benchmark performance

CategoryBenchmarkphi-4phi-3
Popular Aggregated BenchmarkMMLU84.877.9
ScienceGPQA56.131.2
MathMGSM80.653.5
MATH80.444.6
Code GenerationHumanEval82.667.8
Factual KnowledgeSimpleQA3.07.6
ReasoningDROP75.568.3

Tag summary

Content type

Model

Digest

sha256:7e95cd003

Size

7.8 GB

Last updated

10 months ago

docker model pull ai/phi4:14B-Q4_0

This week's pulls

Pulls:

639

Last week