Phi-4-mini-instruct

Maintained By
microsoft

Phi-4-mini-instruct

PropertyValue
Parameters3.8B
Context Length128K tokens
LicenseMIT
Release DateFebruary 2025
Training Data5T tokens
Supported Languages23 languages including English, Chinese, Arabic, etc.

What is Phi-4-mini-instruct?

Phi-4-mini-instruct is Microsoft's latest lightweight language model that achieves remarkable performance despite its relatively small size. Built with a focus on efficiency and reasoning capabilities, it employs a dense decoder-only Transformer architecture with grouped-query attention and shared input/output embeddings. The model demonstrates strong performance across various benchmarks, particularly in mathematical reasoning and multilingual tasks.

Implementation Details

The model utilizes a 200K vocabulary and incorporates advanced features like Flash Attention for optimal performance. It's designed to run efficiently on modern GPUs like NVIDIA A100, A6000, and H100, with specific accommodations available for older hardware.

  • Trained on 512 A100-80G GPUs over 21 days
  • Implements grouped-query attention architecture
  • Supports both chat and function-calling formats
  • Extensive safety post-training and red-teaming across multiple languages

Core Capabilities

  • Strong performance in mathematical reasoning (88.6% on GSM8K)
  • Robust multilingual support across 23 languages
  • 128K token context length for handling long inputs
  • Efficient function calling and tool integration
  • Competitive performance against larger models in reasoning tasks

Frequently Asked Questions

Q: What makes this model unique?

Its ability to achieve performance comparable to much larger models while maintaining a compact 3.8B parameter size, particularly excelling in mathematical reasoning and multilingual capabilities.

Q: What are the recommended use cases?

The model is ideal for memory/compute constrained environments, latency-bound scenarios, and applications requiring strong reasoning capabilities, especially in mathematics and logic. It's particularly suitable for deployment in commercial and research applications where efficiency is crucial.

🍰 Interesting in building your own agents?
PromptLayer provides Huggingface integration tools to manage and monitor prompts with your whole team. Get started here.