Phi-3 Medium 128K
Phi-3 Medium 128K is worth evaluating for coding, long context, and classification when its provider route and context window match the workload.
Use it for
- Teams evaluating coding, long context, and classification
- Workloads that can use a 128k context window
- Buyers comparing 2 tracked provider routes
Do not use it for
- Vision or document-understanding workloads
- Strict JSON or tool-calling flows
Advancing the state-of-the-art in AI and computing.
Cheapest of 2 routes · Microsoft Foundry
About
The Phi-3 Medium 128K is an open-source, 14-billion parameter language model by Microsoft, designed for efficient operation in resource-limited environments. Noted for its state-of-the-art performance on reasoning tasks, it excels in language understanding, code generation, and logical reasoning while offering a long context window of up to 128,000 tokens, making it ideal for applications like summarizing lengthy documents. Its dense decoder-only Transformer architecture has been refined with supervised fine-tuning and preference optimization to enhance instruction-following capabilities. Additionally, Phi-3 Medium 128K is optimized for diverse hardware platforms, ensuring broad accessibility and performance 12.
Phi-3 Medium 128K is an open-source model in the Phi-3 family. The structured metadata tracks a 128k-token context window. This page tracks provider routes through Microsoft Foundry and NVIDIA NIM, with the cheapest tracked route listed at $0.5 input and $1.5 output per 1M tokens. Headline tracked benchmarks include HumanEval 52.2, Massive Multitask Language Understanding 75.3, and MMLU PRO 51.9.
Top use-case fit: coding, agents, and build tasks
Coding
Q/$ C1 relevant benchmark in the decision map.
Long context
Included by capability and metadata signals in the decision map.
Classification
Q/$ D2 relevant benchmarks in the decision map.
Provider price ladder
Compare all 2Compare API pricing across 2 providers for input and output tokens, batch, and cached reads when available.
| Provider | Input / 1M | Output / 1M | Route |
|---|---|---|---|
| Microsoft Foundry | $0.500 | $1.50 | ServerlessProvisioned |
| NVIDIA NIM | - | - | ProvisionedPartial |
Available via routers & gateways(6)
LiteLLM
GatewayOpen-source Python SDK and proxy server that unifies 100+ LLM APIs behind a single OpenAI-compatible interface, with load balancing, cost tracking, and configurable failover.
Portkey
GatewayProduction AI gateway routing to 1,600+ LLMs with failover, load balancing, semantic caching, and guardrails; Apache 2.0 core is fully self-hostable with the complete feature set.
Azure AI Foundry Model Router
RouterMicrosoft Azure AI Foundry's native model router that uses a trained ML model to route each prompt in real time to the optimal Azure-hosted model, with Balanced/Cost/Quality mode selection and automatic failover.
Helicone
GatewayObservability-first AI gateway with routing, caching, rate limiting, and request tracing; Apache 2.0 open-source core with a managed hosted tier for logging and analytics.
Kong AI Gateway
GatewayMulti-LLM AI gateway built on Kong Gateway 3.x, adding semantic routing, load balancing, guardrails, and MCP traffic analytics as plugins over Kong's existing API management platform.
NVIDIA LLM Router Blueprint
RouterNVIDIA's open-source AI blueprint for LLM routing that selects the optimal model per prompt via intent classification or neural auto-routing; being deprecated 2026-06-20.
Capabilities
No model capability flags are currently sourced.
Benchmark peer barsfor Coding
Benchmark scores(3)
| Benchmark | Score | Version | Source |
|---|---|---|---|
| HumanEval | 52.2 | pass@1 | https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard |
| Massive Multitask Language Understanding | 75.3 | 5-shot | https://huggingface.co/spaces/open-llm-leaderboard/open_llm_leaderboard |
| MMLU PRO | 51.9 | — | https://huggingface.co/spaces/TIGER-Lab/MMLU-Pro |
Migration checks
No linked migration route is available for this model yet.
Compare Phi-3 Medium 128K with other models
Comparison and alternatives
Browse all comparisons →Frequently asked questions
What is the context window of Phi-3 Medium 128K?
Phi-3 Medium 128K has a context window of 128k tokens.
How much does Phi-3 Medium 128K cost?
Phi-3 Medium 128K is available at $0.5/1M input tokens through Microsoft Foundry.
When was Phi-3 Medium 128K released?
Phi-3 Medium 128K was released on 2024-05-21.
Which providers offer Phi-3 Medium 128K?
Phi-3 Medium 128K is available from 2 providers: Microsoft Foundry, NVIDIA NIM.
What benchmarks has Phi-3 Medium 128K been tested on?
Phi-3 Medium 128K has been evaluated on 3 benchmarks, including HumanEval, Massive Multitask Language Understanding, MMLU PRO.
Advancing the state-of-the-art in AI and computing.
Cheapest of 2 routes · Microsoft Foundry