Model reference · open weights

Phi-4-reasoning

Available as managed deployment LLMs microsoft Text gen 1 variants 27k dl/mo

Phi-4-reasoning is an open-weight language model from microsoft. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.

Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.

What it is

Released bymicrosoft
TypeLanguage models
TaskText gen
Parameters (lead)14.7B
Context32k tokens
Runs withtransformers
Based onmicrosoft/phi-4
Released2025-04-09
Popularity27k downloads / month
LicenceOpen weights

About

What Phi-4-reasoning is

Read the full model card

Model Summary

DevelopersMicrosoft Research
DescriptionPhi-4-reasoning is a state-of-the-art open-weight reasoning model finetuned from Phi-4 using supervised fine-tuning on a dataset of chain-of-thought traces and reinforcement learning. The supervised fine-tuning dataset includes a blend of synthetic prompts and high-quality filtered data from public domain websites, focused on math, science, and coding skills as well as alignment data for safety and Responsible AI. The goal of this approach was to ensure that small capable models were trained with data focused on high quality and advanced reasoning.
ArchitectureBase model same as previously released Phi-4, 14B parameters, dense decoder-only Transformer model
InputsText, best suited for prompts in the chat format
Context length32k tokens
GPUs32 H100-80G
Training time2.5 days
Training data16B tokens, ~8.3B unique tokens
OutputsGenerated text in response to the input. Model responses have two sections, namely, a reasoning chain-of-thought block followed by a summarization block
DatesJanuary 2025 – April 2025
StatusStatic model trained on an offline dataset with cutoff dates of March 2025 and earlier for publicly available data
Release dateApril 30, 2025
LicenseMIT

Intended Use

Primary Use CasesOur model is designed to accelerate research on language models, for use as a building block for generative AI powered features. It provides uses for general purpose AI systems and applications (primarily in English) which require:1. Memory/compute constrained environments.2. Latency bound scenarios.3. Reasoning and logic.
Out-of-Scope Use CasesThis model is designed and tested for math reasoning only. Our models are not specifically designed or evaluated for all downstream purposes. Developers should consider common limitations of language models as they select use cases, and evaluate and mitigate for accuracy, safety, and fairness before using within a specific downstream use case, particularly for high-risk scenarios. Developers should be aware of and adhere to applicable laws or regulations (including privacy, trade compliance laws, etc.) that are relevant to their use case, including the model’s focus on English. Review the Responsible AI Considerations section below for further guidance when choosing a use case. Nothing contained in this Model Card should be interpreted as or deemed a restriction or modification to the license the model is released under.

Usage

[!IMPORTANT] To fully take advantage of the model's capabilities, inference must use temperature=0.8, top_k=50, top_p=0.95, and do_sample=True. For more complex queries, set max_new_tokens=32768 to allow for longer chain-of-thought (CoT).

Input Formats

Given the nature of the training data, always use ChatML template with the following system prompt for inference:

You are Phi, a language model trained by Microsoft to help users. Your role as an assistant involves thoroughly exploring questions through a systematic thinking process before providing the final precise and accurate solutions. This requires engaging in a comprehensive cycle of analysis, summarizing, exploration, reassessment, reflection, backtracing, and iteration to develop well-considered thinking process. Please structure your response into two main sections: Thought and Solution using the specified format:  {Thought section}  {Solution section}. In the Thought section, detail your reasoning process in steps. Each step should include detailed considerations such as analysing questions, summarizing relevant findings, brainstorming new ideas, verifying the accuracy of the current steps, refining any errors, and revisiting previous steps. In the Solution section, based on various attempts, explorations, and reflections from the Thought section, systematically present the final solution that you deem correct. The Solution section should be logical, accurate, and concise and detail necessary steps needed to reach the conclusion. Now, try to solve the following question through the above guidelines:
What is t

From the published model card. Full card on the HuggingFace links in the sidebar.

Using it via the API

Call it like any OpenAI endpoint

Once AxForge deploys phi-4-reasoning for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (phi-4-reasoning below is illustrative; you get the exact model name on deployment.)

$ curl -sS https://api.axforge.ai/v1/chat/completions \
  -H "Authorization: Bearer $AXFORGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"phi-4-reasoning","messages":[{"role":"user","content":"Hello"}]}'

Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms