Phi 2 by microsoft

 »  All LLMs  »  microsoft  »  Phi 2   URL Share it on

Phi 2 is an open-source language model by microsoft. Features: 2.8b LLM, VRAM: 5.6GB, Context: 2K, License: mit, HF Score: 61.1, LLM Explorer Score: 0.33, Arc: 61, HellaSwag: 74.9, MMLU: 57.9, TruthfulQA: 44.2, WinoGrande: 73.5, GSM8K: 55.

  Autotrain compatible   Code   En   Endpoints compatible   Phi   Region:us   Safetensors   Sharded   Tensorflow

Phi 2 Benchmarks

Phi 2 Parameters and Internals

Model Type 
text generation, code generation
Use Cases 
Areas:
research
Applications:
QA, chat, code format
Primary Use Cases:
QA format, chat format, code format
Limitations:
Generate Inaccurate Code and Facts, Limited Scope for code, Unreliable Responses to Instruction, Language Limitations, Potential Societal Biases, Toxicity, Verbosity
Additional Notes 
Phi-2 is intended for QA, chat, and code purposes. Model-generated text/code should be treated as a starting point. Users should be cautious when employing these models in applications.
Supported Languages 
en (Standard English)
Training Details 
Data Sources:
Phi-1.5, NLP synthetic texts, filtered websites
Data Volume:
250B tokens
Methodology:
Transformer-based model with next-word prediction objective
Context Length:
2048
Training Time:
14 days
Hardware Used:
96xA100-80G GPUs
Model Architecture:
Transformer-based model with next-word prediction objective
Input Output 
Accepted Modalities:
text
Performance Tips:
Phi-2 has an attention overflow issue (with FP16). If encountering this issue, enable/disable autocast on the PhiAttention.forward() function.
LLM NamePhi 2
Repository 🤗https://huggingface.co/microsoft/phi-2 
Model Size2.8b
Required VRAM5.6 GB
Updated2025-09-23
Maintainermicrosoft
Model Typephi
Model Files  5.0 GB: 1-of-2   0.6 GB: 2-of-2
Supported Languagesen
Model ArchitecturePhiForCausalLM
Licensemit
Context Length2048
Model Max Length2048
Transformers Version4.37.0
Tokenizer ClassCodeGenTokenizer
Vocabulary Size51200
Torch Data Typefloat16

Quantized Models of the Phi 2

Model
Likes
Downloads
VRAM
Phi 2 GGUF232205351 GB
Phi2 Bunny36735 GB
Damysus 2.7B Chat GGUF0671 GB
Phi 2 GGUF62401 GB
Phi 2 GGUF32071 GB
Phi 2 GPTQ301511 GB

Best Alternatives to Phi 2

Best Alternatives
Context / RAM
Downloads
Likes
MFANN3bv0.24128K / 11.1 GB50
MFANN3b128K / 11.1 GB1680
MFANN3bv1.4128K / 11.1 GB80
MFANN Phigments Slerp V3.2128K / 5.6 GB100
MFANN3bv1.3128K / 11.1 GB110
MFANN3bv0.23128K / 11.1 GB60
MFANN3bv1.1128K / 11.1 GB50
MFANN3bv1.5128K / 11.1 GB50
MFANN3b Rebase128K / 11.1 GB70
MFANN Liminerity Slerp 4a128K / 5.6 GB60

Rank the Phi 2 Capabilities

🆘 Have you tried this model? Rate its performance. This feedback would greatly assist ML community in identifying the most suitable model for their needs. Your contribution really does make a difference! 🌟

Instruction Following and Task Automation  
Factuality and Completeness of Knowledge  
Censorship and Alignment  
Data Analysis and Insight Generation  
Text Generation  
Text Summarization and Feature Extraction  
Code Generation  
Multi-Language Support and Translation  

What open-source LLMs or SLMs are you in search of? 53254 in total.

Our Social Media →  
Original data from HuggingFace, OpenCompass and various public git repos.
Check out Ag3ntum — our secure, self-hosted AI agent for server management.
Release v20260328a