LLM Reference

Phi-2 Models by Microsoft Research

Microsoft ResearchMITOpen sourceOpen Source
1 model2023Up to 2k ctxFrom $0.05/1M input

Details

LicenseMIT(OSI)
Commercial useCommercial use allowed
Models1
Released2023
Max context2k

Capabilities

Structured OutputsAll models

About

The Phi family of language models, developed by Microsoft Research, comprises several small language models (SLMs) designed to achieve high performance despite their relatively small size. These models employ a Transformer architecture and are trained on a blend of synthetic and web datasets 12. Emphasizing the quality of training data, the models prioritize "textbook-quality" information to enhance reasoning and understanding capabilities 1. The Phi series includes Phi-1, Phi-1.5, and Phi-2, with each version incorporating advancements in model scaling and data curation 1. Phi-2, the latest in the series, has 2.7 billion parameters and exhibits state-of-the-art performance among base models with fewer than 13 billion parameters across various benchmarks 12. Notably, Phi-2 has not been subjected to reinforcement learning from human feedback (RLHF) or instruction fine-tuning 12, and the models are accessible to researchers to aid exploration of safety challenges and other language model developments 2.

Current Variants

Use-when guidance is derived from seed capabilities, context, release, and replacement fields.

1 in view
Phi-2Current

Use when the workload needs 2k context, 2.7B parameters, and structured outputs.

2023-122k context2.7B parametersstructured outputs

Release Timeline

1 release group
2023-12
1 current
Phi-2
2k context2.7B parametersstructured outputs
Current

Specifications(1 models)

Phi-2 model specifications comparison
ModelReleasedContextParametersStructured Outputs
Phi-22023-122k2.7BYes

Pricing

Phi-2 model pricing by provider
ModelProviderInput / 1MOutput / 1MType
Phi-2Replicate API$0.05$0.25Serverless
Phi-2Microsoft Foundry$0.07$0.07Provisioned
Phi-2Together AI$0.1$0.1Serverless
Phi-2Fireworks AI$0.1$0.1Provisioned

Frequently Asked Questions

What is Phi-2 used for?
Phi-2 is used for structured outputs. The family description and listed model capabilities point to those workloads as the best fit.
How does Phi-2 compare to Harrier?
Phi-2 by Microsoft Research is strongest where you need structured outputs, while Harrier by Microsoft Research is the closest related family to check for embedding. Phi-2 has 1 listed variant and reaches up to 2k context, while Harrier reaches up to 33k context, so compare the specs and pricing tables before choosing a production model.
Which Phi-2 model should I use?
For the lowest listed input price, start with Phi-2 through Replicate API at $0.05/1M input tokens. For the most capable/latest local choice, evaluate Phi-2 with 2k context and structured outputs.