Monday, 21 September 2026 | Mise à jour quotidienne L'intelligence artificielle au service des constructeurs

Phi-4

Phi-4 — Spécifications

Rédigé par Mustafa Ihsan d’après la documentation officielle du fournisseur · Dernière mise à jour

Développeur Microsoft
Type LLM (dense)
Modalité Texte → Texte
Paramètres 14B
Fenêtre de contexte 16 K
Licence MIT (ouverte)
Poids ouverts Oui
Publié 2025
Prix de l’entrée $0.07 /1M
Prix de la sortie $0.14 /1M
Fournisseurs d'API Azure, OpenRouter, Ollama

Exécutez-le localement

VRAM (4 bits) ~9 Go
GPU minimal RTX 4070 12 Go / RTX 3060 12 Go

Page officielle →

What is Phi-4?

Phi-4 is Microsoft’s compact 14B reasoning model, MIT-licensed, which punches well above
its size on mathematics and logic. It needs about 9 GB of VRAM at 4-bit, running comfortably
on an RTX 4070 or RTX 3060 12GB, and costs $0.07 in / $0.14 out per million tokens
hosted.

The Phi line’s whole thesis is that curated, textbook-quality training data beats raw
scale for reasoning tasks, and Phi-4 is the clearest evidence for it — a 14B model competing
on maths and logic benchmarks with models several times larger. The cost of that focus is the
16K context window, by far the narrowest in this database and a hard limit for any workload
involving documents, long conversations or retrieval. Read it as a specialist: excellent for
structured reasoning over short inputs — maths tutoring, logic and code puzzles, deterministic
extraction from small payloads — and the wrong tool the moment your prompt grows. If you need
Phi-4’s reasoning with room to work, a 128K-context model in the same hardware bracket such
as Qwen3 14B is the better trade.

Phi-4 pricing: API cost per 1M tokens

Entrée (par million de jetons)$0.0700
Sortie (par million de jetons)$0.140
Ratio sortie/entrée
Moyenne pondérée (4:1 entrée:sortie)$0.0840 par 1 million de jetons

What Phi-4 costs per month

Dépense mensuelle réelle pour un ratio entrée-sortie de 4:1 — le rapport effectivement observé dans une charge de travail type (chat ou RAG).

Charge de travailJetons/moisCoût par mois
Projet secondaire 1 million en entrée / 0,25 million en sortie $0.11
Petite équipe 20 millions en entrée / 5 millions en sortie $2.10
Production 200 millions en entrée / 50 millions en sortie $21

Calculez vos propres coûts dans le Calculateur de coûts pour les API IA.

Cheaper alternatives to Phi-4

ModèleCoût combiné par million de dollarsVous économisez
Mistral 7B ouverte $0.0220 74% cheaper
Llama 3.1 8B ouverte $0.0220 74% cheaper
Mistral NeMo 12B ouverte $0.0240 71 % moins cher

Hébergement local ou paiement via API ?

Phi-4 is open-weight, so you can run it yourself. It needs ~9 Go of VRAM at 4-bit (RTX 4070 12GB / RTX 3060 12GB). Self-hosting only beats the API once your volume is high enough to keep that hardware busy — the calculateur auto-hébergement vs API calcule le seuil de rentabilité pour votre volume de jetons.

Questions fréquemment posées

How much does Phi-4 cost per 1M tokens?

Phi-4 costs $0.0700 per 1M input tokens and $0.140 per 1M output tokens. At a typical 4:1 input-to-output mix that blends to about $0.0840 per 1M tokens.

How much does Phi-4 cost per month?

A small-team workload of 20M input and 5M output tokens a month costs about $2.10 on Phi-4. A side project (1M in / 0.25M out) costs roughly $0.11.

What is a cheaper alternative to Phi-4?

Mistral 7B is the strongest cheaper option in our database at $0.0220 per 1M blended — about 74% less than Phi-4. It is also open-weight, so self-hosting is an option.

Can I run Phi-4 locally?

Yes. Phi-4 is open-weight and needs about ~9 GB of VRAM at 4-bit quantisation (RTX 4070 12GB / RTX 3060 12GB).

Why does Phi-4 charge more for output than input?

Output tokens are generated one at a time and cannot be batched the way a prompt can, so they cost the provider more to serve. Phi-4 charges 2× more for output, which is why prompt-heavy workloads are far cheaper to run than generation-heavy ones.

Les prix indiqués correspondent aux tarifs publics officiels pour l’API principale du modèle et sont mis à jour régulièrement à mesure que les fournisseurs les modifient. Les remises liées aux volumes, aux traitements par lots ou aux entrées mises en cache ne sont pas prises en compte. Comparez tous les modèles côte à côte dans le Base de données des modèles IA ou le Classement des grands modèles linguistiques (LLM).

Compare Phi-4 head-to-head

Défiler vers le haut