Model reference · open weights

phi-4

phi-4 is an open-weight language model from microsoft, listed in the AxForge catalogue. AxForge can bring it up on EU-owned hardware for you on request — with the licence handled where one is required.

LLMs microsoft 1 variants 640k downloads/mo
Request this model on EU hardware All served models Not on the shared API today — deployed on request.

About

What phi-4 is

Phi-4 Model Card Phi-4 Technical Report Model Summary Intended Use Data Overview Training Datasets Our training data is an extension of the data used for Phi-3 and includes a wide variety of sources from: 1. Publicly available documents filtered rigorously for quality, selected high-quality educational data, and code. 2. Newly created synthetic, “textbook-like” data for the purpose of teaching math, coding, common sense reasoning, general knowledge of the world (science, daily activities, theory of mind, etc.). 3. Acquired academic books and Q&A datasets. 4. High quality chat format supervised data covering various topics to reflect human preferences on different aspects such as instruct-following, truthfulness, honesty and helpfulness. Multilingual data constitutes about 8% of our overall data. We are focusing on the quality of data that could potentially improve the reasoning ability for the model, and we filter the publicly available documents to contain the correct level of knowledge. Benchmark datasets We evaluated phi-4 using OpenAI’s SimpleEval and our own internal benchmarks to understand the model’s capabilities, more specifically: MMLU: Popular aggregated dataset for multitask language understanding. MATH: Challenging competition math problems. GPQA: Complex, graduate-level science questions. DROP: Complex comprehension and reasoning. MGSM: Multi-lingual grade-school math. HumanEval: Functional code generation. SimpleQA: Factual responses. Safety Approach phi-4 has adopted a robust safety post-training approach. This approach leverages a variety of both open-source and in-house generated synthetic datasets. The overall technique employed to do the safety alignment is a combination of SFT (Supervised Fine-Tuning) and iterative DPO (Direct Preference Optimization), including publicly available datasets focusing on helpfulness and harmlessness as well as various questions and answers targeted to multiple safety categories. Safety Evaluation and Red-Teaming Prior to release, phi-4 followed a multi-faceted evaluation approach. Quantitative evaluation was conducted with multiple open-source safety benchmarks and in-house tools utilizing adversarial conversat

Summarised from the published model card. Read the full card on the HuggingFace links below.

Specifications

What it is

Makermicrosoft
TypeLanguage models
Parameters (lead)14.7B
Variants1
Runs withtransformers
Released2024-12-11
Popularity640k downloads / month
Likes2,291
LicenceOpen weights

How it works

How language models work

Your prompttext / messagesTransformerattention over tokensNext-token loopgenerate + streamResponsetext · tool callsA language model reads your tokens and predicts the next one, again and again, streaming the reply back.

Variants

Sizes & precisions

Open weights ship in several sizes and precisions. One page, all the variants — pick the one that fits your GPU. VRAM figures are estimates from model size.

VariantParamsPrecisionVRAMFits 16 GBWeights
phi-414.7BBF16~33.7 GBWeights ↗

Using it via the API

Call it like any OpenAI endpoint

Once AxForge deploys phi-4 for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (phi-4 below is illustrative; you get the exact model name on deployment.)

$ curl -sS https://api.axforge.ai/v1/chat/completions \
  -H "Authorization: Bearer $AXFORGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"phi-4","messages":[{"role":"user","content":"Hello"}]}'

Details

Languages, data & research

Languages

en

Tags

transformers safetensors phi3 text-generation phi nlp math code chat conversational en eval-results text-generation-inference endpoints_compatible

Papers

Licence

Open weights

Open weights under mit — commercial use is permitted. Deploy it on AxForge EU hardware on request. Read the licence ↗

Sources

Weights & code

Want phi-4 on EU-owned hardware?

Request this model on EU hardware See what’s served now

Explore

More language models

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms