DEV.co
Open-Source LLM · microsoft

Phi-mini-MoE-instruct

Phi-mini-MoE is a lightweight 7.6B-parameter mixture-of-experts language model from Microsoft that activates only 2.4B parameters per inference, designed for memory- and compute-constrained environments. It is trained on 400B tokens of filtered public data and synthetic reasoning-focused content, with a 4k token context window. The model is instruction-tuned and safety-trained, released under MIT license without gating.

Source: HuggingFace — huggingface.co/microsoft/Phi-mini-MoE-instruct
7.6B
Parameters
mit
License (OSI-approved)
Unknown
Context (tokens)
196.9k
Downloads (30d)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Developermicrosoft
Parameters7.6B
Context windowUnknown
Licensemit — OSI-approved
Modality / tasktext-generation
Gated on HuggingFaceNo
Downloads196.9k
Likes37
Last updated2025-12-10
Sourcemicrosoft/Phi-mini-MoE-instruct

What Phi-mini-MoE-instruct is

Mixture-of-Experts (MoE) decoder-only Transformer with 7.6B total parameters and 2.4B activated parameters per token. Vocabulary size 32,064. Context length 4,096 tokens. Trained on 400B tokens from Phi-3 datasets (public documents, synthetic reasoning data, supervised chat data) between September 2024 and March 2025 using 64 A100-80G GPUs over 11 days. Data cutoff: October 2023. Benchmarks show competitive performance vs. dense 7.6B models (e.g., Qwen 2.5 7B: 73.47 MMLU vs. Phi-mini-MoE: 70.68 MMLU) with lower compute activation.

Quickstart

Run Phi-mini-MoE-instruct locally

Load the open weights with 🤗 Transformers and generate — the same model, self-hosted.

quickstart.pypython
from transformers import pipelinepipe = pipeline("text-generation", model="microsoft/Phi-mini-MoE-instruct")out = pipe("Explain retrieval-augmented generation in one sentence.",           max_new_tokens=128)print(out[0]["generated_text"])

Swap in vLLM or Ollama for production-grade serving. DEV.co can stand up the inference stack.

Deployment

How you'd run it

A typical self-hosted path — open weights, an inference server, your application.

DEV.co builds each layer — from GPU infrastructure to the application.

Best use cases

Edge and mobile deployment

2.4B activated parameters reduce memory footprint and latency for on-device or edge inference scenarios where full dense models are impractical.

Latency-sensitive API services

Sparse activation pattern enables faster token generation compared to dense models of similar total parameter count, suitable for real-time conversational applications.

Cost-optimized private LLM backends

Lower per-token compute cost compared to larger dense models while maintaining reasonable quality on reasoning and chat tasks, ideal for self-hosted deployments with budget constraints.

Running & fine-tuning it

ESTIMATE: ~15–18 GB VRAM for float16 inference (7.6B parameters × 2 bytes + overhead). Full precision (float32) would require ~31 GB. Quantization (int8, int4) reduces to ~8–10 GB. Training used 64 A100-80GB GPUs over 11 days; fine-tuning estimates require independent validation depending on LoRA/QLoRA configuration.

Card does not state fine-tuning support or constraints. LoRA/QLoRA feasibility is likely given standard transformer architecture and Hugging Face integration, but requires independent testing. MoE models may have sparse expert structure complications; verify gradient flow and expert load-balancing during fine-tuning. No official fine-tuning recipes or parameters documented.

When to avoid it — and what to weigh

  • Multilingual or non-English workloads — Model is trained primarily on English. Card explicitly states worse performance and representation disparities for non-English languages and underrepresented English varieties.
  • High-stakes decision-making without mitigation — Card warns of potential unfairness, stereotype perpetuation, and generation of inappropriate content. Requires evaluation and mitigation before deployment in safety-critical domains (healthcare, legal, financial decisions).
  • Requiring real-time knowledge beyond October 2023 — Static model with October 2023 data cutoff; cannot access or reason about events, trends, or factual updates after training completion.
  • Long-context applications (>4k tokens) — Hard limit of 4,096 token context window limits use in document-heavy RAG, code summarization, or long conversation histories.

License & commercial use

Released under MIT license. MIT is an OSI-approved permissive license permitting commercial use, modification, and distribution with minimal restrictions (retain license and copyright notice). No additional license restrictions or custom commercial terms stated in the card.

MIT license permits commercial use. However, the model card includes responsible AI caveats: developers are liable for evaluating fairness, safety, and accuracy before deploying in downstream use cases, particularly high-risk scenarios. Legal compliance (privacy, trade regulations) is the developer's responsibility. These are operational, not licensing, restrictions.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationStrong
License clarityClear
Deployment complexityLow
DEV.co fitStrong
Assessment confidenceHigh
Security considerations

Card does not state security posture, vulnerability disclosure process, or data privacy guarantees. No mention of adversarial robustness, jailbreak mitigation, or input sanitization. Responsible AI section warns of potential for generating inappropriate/offensive content and perpetuating stereotypes. Recommend: vet outputs in safety-critical domains, implement input filtering and output guardrails, monitor for bias in deployment. Custom code is used (trust_remote_code=True in example); review before execution.

Alternatives to consider

Phi-3.5-MoE (42B total, 6.6B active)

Larger sibling with higher MMLU (78.36 vs. 70.68) and stronger reasoning. Trade-off: ~3× higher activated parameters; use if accuracy is prioritized over latency/cost.

Qwen 2.5 7B (dense, 7.6B total)

Dense model with comparable parameter count. Slightly higher MMLU (73.47) but requires full 7.6B activation; use if hardware supports full inference and MoE sparse activation is not critical.

Phi-tiny-MoE (3.8B total, 1.1B active)

Smaller SlimMoE variant with 1.1B activated parameters (40% of Phi-mini-MoE). Use for ultra-constrained devices at cost of ~10 MMLU point drop.

Software development agency

Ship Phi-mini-MoE-instruct with senior software developers

Test Phi-mini-MoE in your environment using vLLM or TGI. Start with a 4k-token context chat use case, validate latency/accuracy on your domain data, and assess multi-turn conversation quality. Review the responsible AI section and implement output filtering for production.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

Phi-mini-MoE-instruct FAQ

Can I use Phi-mini-MoE commercially?
Yes. MIT license permits commercial use. However, you are responsible for evaluating fairness, safety, and accuracy in your specific use case and complying with applicable laws (privacy, trade regulations). Microsoft provides no warranty or liability cap beyond the license.
What GPU VRAM do I need to run inference?
Estimate 15–18 GB VRAM for float16 on a single GPU. Quantization (int8/int4) can reduce to 8–10 GB. For production serving at scale, consider distributed serving (vLLM, TGI) to parallelize batch requests across multiple GPUs.
Can I fine-tune Phi-mini-MoE?
Not formally documented. LoRA/QLoRA is plausible given the standard transformer architecture, but MoE sparse structure may complicate gradient flow. Test independently; no official fine-tuning recipes or recommended hyperparameters are provided.
What is the data cutoff date?
October 2023 for publicly available data. Model is static and cannot answer questions about events or facts after that date. Retrain or use retrieval-augmented generation (RAG) for current information.

Work with a software development agency

DEV.co is a software development agency delivering custom software development services to companies building on open source. Our software developers and web developers design, integrate, and ship production systems — spanning web development, APIs, AI, data, and cloud. If Phi-mini-MoE-instruct is part of your open-source llms roadmap, our team can implement, customize, migrate, and maintain it.

Ready to deploy Phi-mini-MoE?

Test Phi-mini-MoE in your environment using vLLM or TGI. Start with a 4k-token context chat use case, validate latency/accuracy on your domain data, and assess multi-turn conversation quality. Review the responsible AI section and implement output filtering for production.