Try Kling Image V4 Long for Page Mockups from Kling AI →
Models
Agents
Workflows
Studio
PricingBlogDocs
ExploreDiscover models by categoryDiscoverModels and effects built by WiroBrowse All ModelsBrowse the complete catalogSee FavoritesSign in to view saved models
Generative Media AgentCreate and edit media by chattingWorkflow AgentBuild visual workflows with Agent
OverviewThe platform at a glanceLearnSkills, knowledge, guardrailsAnatomyWhat makes agents reasonBuild Your AgentPick connectors and skills, choose a plan, deploy
Pre-built AgentsBrowse the catalog
Agent Usecases
Ad Campaign ManagerApp Event ManagerApp Review RepliesBarber BookingCustomer Win-BackEcommerce ListingsRestaurant Reviews
Sign InStart Building
Explore models/
LLM & ChatActive

Phi-4

bymicrosoft

Microsoft's 14B-parameter open model for English math and reasoning, built for memory- or compute-limited setups and trained with synthetic textbook-style data. MIT licensed.

ChatLLMRAGPhi4 ChatBf16
Model ID
phi-4
Provider
microsoft
Updated
Oct 24, 2026, 14:56
phi-4
0
Comments
Average rating : 0 (0 users)
Providermicrosoft
Modelphi-4
ChatLLMRAGPhi4 Chat
wiro playground—microsoft/phi-4

Prompt to send to the model.

Your request will cost $0.0006 per second.

Running this model on Wiro costs approximately $0.078 in total.

(Total cost varies depending on the request's execution time.)
Sample outputs
Loading preview…
microsoft-phi-4-sample-1.txt
Updated Oct 24, 2026, 14:56

Overview

Phi-4 is a 14B-parameter dense decoder-only Transformer from Microsoft Research, released on December 12, 2024. Its open weights are MIT licensed. Its 9.8T training tokens extend the Phi-3 data with synthetic "textbook-like" text written to teach math and coding, plus acquired academic books and Q&A sets. Public data in the mix stops at June 2024.

The card aims it at English-language systems that need reasoning and logic on limited memory or compute. Microsoft reports 84.8 on MMLU and 82.6 on HumanEval, measured with OpenAI's simple-evals.

Choosing a variant: Phi-4 is the newer and larger of the two Phi models on Wiro, and the better fit for English math or code. For other languages use Phi-3.5 Mini Instruct, a 3.8B model with 23 listed languages; Phi-4's card says it is not intended for multilingual use.

What you can build

  • Math tutors that work through a solution line by line. MATH shows the biggest gain over the earlier 14B Phi-3 in Microsoft's table, 80.4 against 44.6.
  • Science study aids. Microsoft reports 56.1 on GPQA's graduate-level questions, against 31.2 for Phi-3.
  • Python helpers for scripts that stick to common packages such as collections and itertools.

Inputs

Only the prompt is required; a system prompt can set the persona or answer format. Give a user_id and session_id to have earlier turns stored and replayed, or leave both blank so each request starts fresh.

Sampling is on by default at temperature 0.7 (range 0 to 5), top_p 0.95 and seed 123456. You can also set top_k, the repetition and length penalties, min_tokens and semicolon-separated stop_sequences. Quantization, also on by default, loads reduced-precision weights to save memory.

Outputs

Plain text. The sample answers the default Tower of London question with six numbered events, including Anne Boleyn's 1536 execution and the Princes in the Tower, each with a story idea.

Recommended settings

  • Turn do_sample off for math and code, so each step takes the most likely token.
  • Change the seed (default 123456) to get a different sampled answer.
  • In long prompts, put the question first, since an over-long message is cut from the end.
  • At the default max_tokens of 0, a prompt of up to 2,048 tokens gets up to 2,048 tokens of reply. Set it higher for long reports.

Limitations

  • The checkpoint's 16K-token context has to hold the system prompt, stored history, new message and reply. Over the input limit, the oldest history goes first, then the end of the latest message.
  • Languages other than English perform worse. Multilingual text is about 8% of the training data.
  • Factual recall is weak: Microsoft reports 3.0 on SimpleQA, below Phi-3's 7.6. Pass source text in the prompt for factual answers.
  • Most of its code training data is Python, so check calls to less common packages.

Safety & compliance

Phi-4 is MIT licensed. Microsoft says it was not designed or evaluated for every downstream purpose and asks developers to check accuracy and safety in their own setting. The card asks for further assessment before use in decisions on housing, employment or loans, and for safeguards around legal or health advice. End users should be told they are talking to an AI system.

API quick start

Run phi-4 with a single API call.

POST https://api.wiro.ai/v1/Run/microsoft/phi-4
{
  "prompt": "What are some interesting historical even…",
  "user_id": "...",
  "session_id": "...",
  "system_prompt": "You are a helpful, respectful and honest …"
}
curl
curl -X POST "https://api.wiro.ai/v1/Run/microsoft/phi-4" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_WIRO_API_KEY" \
  --data-binary @- <<'JSON'
{
  "prompt": "What are some interesting historical even…",
  "user_id": "...",
  "session_id": "...",
  "system_prompt": "You are a helpful, respectful and honest …"
}
JSON

Other models you might like

Explore similar llm & chat models.

View all
Phi-3.5-mini-instruct
Chat

Phi-3.5-mini-instruct

microsoft

Qwen2.5-7B-Instruct
Chat

Qwen2.5-7B-Instruct

qwen

Qwen3-Coder-30B-A3B-Instruct
Chat

Qwen3-Coder-30B-A3B-Instruct

qwen

Mathstral-7B-v0.1
Chat

Mathstral-7B-v0.1

mistralai

  • Qwen2.5-Coder-32B-Instructqwen
  • EuroLLM-9B-Instructutter-project
  • rag-chatwiro
  • Llama-3.2-3B-Instructmeta-llama
  • Qwen2.5-3B-Instructqwen
  • internlm3-8b-instructinternlm
  • Qwen2.5-0.5B-Instructqwen
  • rag-chat-youtubewiro

Discover, test, and run AI models, build workflows and agents with one unified API.

All systems operational
WiroModelsAgentsMCP ServerLLM GatewayBrowser ExtensionIntegrationsPricingAboutBlogCareersContactPartnerChangelogStatusFAQ
CategoriesText to ImageImage to ImageImage EditingImage to TextText to VideoImage to VideoVideo to VideoText to SpeechSpeech to TextSpeech to SpeechVoice CloneRealtime ConversationMusic GenerationLLMUtilities
ModelsNano Banana 2GPT Image 2.5Seedream V5 ProSeedance 2.5Veo 3.1Kling V3FLUX 3FLUX.2 ProWan 3.0 PrimeGrok Imagine 1.5
PartnersGoogleOpenAIByteDanceBlack Forest LabsKling AIQwenAlibabaxAIMiniMaxElevenLabs
Getting StartedWiro ModelsWiro EffectsIntroductionAuthenticationProjectsCode ExamplesWiro MCP ServerSelf-Hosted MCPn8n IntegrationLLMs.txt
API ReferenceModelsRun a ModelModel ParametersTasksLLM & Chat StreamingWebSocketRealtime VoiceFiles
© 2026 Wiro AI. All rights reserved.
PrivacyTermsData Deletion