June 23, 2026
Inside MAI-Thinking-1: How Microsoft Built a Reasoning Model From Scratch
A technical breakdown of Microsoft AI’s new model family, with a deep dive into the reasoning model, the training loop, and Frontier…

By Dave R - Microsoft Azure & AI MVP☁️
11 min read
A technical breakdown of Microsoft AI's new model family, with a deep dive into the reasoning model, the training loop, and Frontier Tuning.
This article breaks down how Microsoft AI built its new family of models, with most of the attention on MAI-Thinking-1, its first reasoning model. I will walk through the architecture, the data pipeline, the reinforcement learning loop that teaches the model to reason, the safety training, the benchmark results, and how Frontier Tuning lets you adapt the model on your own data. The goal is simple: by the end, you will understand the actual design choices behind these models and be able to reason clearly about how to use or tune them yourself.
Reference here.
The model family at a glance
Microsoft AI shipped seven models at once. They are not seven unrelated experiments; they share one training stack, one data lineage, and one infrastructure backbone. Here is the lineup.
Notice the pattern: most categories ship a maximum quality model alongside a Flash variant tuned for throughput and cost per token. That tells you these models were designed for production budgets, not just leaderboards.
The one design decision that shapes everything: no distillation
Before any architecture, there is a principle, and it is worth taking seriously because it drives real engineering choices. Microsoft trains these models from scratch and refuses to distill from a stronger teacher model.
Distillation copies a bigger model's behavior into a smaller one. It is fast, and plenty of labs do it. The problem is that the teacher's capability becomes the student's practical ceiling, and you never prove your own pipeline can climb from weak performance or make progress in domains where no good teacher exists. Training from scratch is harder, but it means every capability is earned through your own loop instead of borrowed.
There is a second payoff that matters more to enterprises than to researchers: clean provenance. No third party weights, no opaque inherited data, commercially licensed sources only.
Every component can be audited and debugged. If you work somewhere that has to answer hard questions about where training data came from, that traceable lineage is the difference between a model you can deploy and one you cannot.
The product models, briefly
I am going deep on the reasoning model, so here is the short version of the other four, with the relevant insights.
MAI-Image-2.5 is a generation and editing model sitting at number 2 on the image editing leaderboard. Its strength is precise edits: changing lighting, adding objects that match the scene, and editing one region while leaving the rest untouched. The Flash variant runs the same architecture at roughly a third of the cost.
MAI-Voice-2 focuses on prosody, the rhythm and intonation that make speech sound human. The new capability is fine grained emotional control, so you tune not just what is said but how it feels, across 15 languages, with voice cloning from a few seconds of audio. The Flash variant drops latency under 150 ms for voice agents.
MAI-Transcribe-1.5 targets real world audio, noisy rooms, accents, domain terms, multiple speakers, at 3.8% word error rate across 43 languages and up to 5x faster than rival models. It is already wired into Copilot, Teams, GitHub, and Dynamics 365.
MAI-Code-1-Flash is a 5 billion active parameter coding model built for agentic tasks. It scores 71.6% on SWE-Bench Verified and 51.2% on SWE-Bench Pro, and it ships as a default option inside Visual Studio Code through GitHub Copilot.
MAI-Thinking-1: the architecture
MAI-Thinking-1 is a sparse mixture of experts model: 35 billion active parameters out of roughly 1 trillion total, with a 256K context window. The sparse design is the trick that lets it punch above its weight. A mixture of experts activates only a slice of its total parameters per token, so the model carries trillion scale knowledge while paying inference costs closer to a 35 billion parameter model. That is the structural reason a mid sized model can trade blows with much larger systems later in the benchmarks.
The full build comes down to five numbers worth remembering: 30 trillion pre-training tokens, plus 3.55 trillion tokens of STEM focused mid-training, a 256K maximum context window, 35 billion active over roughly 1 trillion total parameters, and 8,000 GB200 GPUs on Azure.
Microsoft also co-designs with its own Maia 200 silicon and reports an early efficiency gain from it. The thread running through all of it is the same: trained from scratch, no teacher, clean and licensed data.
The data pipeline, stage by stage
The data pipeline is the most interesting slide in the whole story, and the harder choice is what got left out. No open-source training sets, no synthetic data, and an active effort to detect and remove AI-generated text from the web, which gets harder every month. Benchmarks are decontaminated, meaning the eval problems were scrubbed from training, so the reported scores reflect generalization rather than memorization.
Here is what the pipeline does. Ingestion pulls from a proprietary crawl plus Common Crawl. HTML goes through text extraction (Trafilatura plus language classification), then content filters strip adult and low quality material, then exact deduplication removes byte identical copies. A second cleaning tier follows: fuzzy deduplication with MinHash and LSH to catch near duplicates, cross source deduplication on URL and content, and embedding generation that turns documents into vectors for routing.
Then the pipeline forks into five sub pipelines, each with its own quality logic. General Web uses attribute models, a top tier quality filter, Gopher style heuristics, and quality binning. STEM runs a multi way topic classifier, an educational value classifier, an education level classifier, an LLM parser, and STEM filters. Code reuses the STEM pipeline tuned for computer science and adds an LLM quality judge. Human-Readable builds a seed inventory, readability labels, an LLM classifier, a relaxed plus LLM gate, and domain thresholds. Target Domains uses custom parsers for high value sources. Everything converges into one central pipeline.
That fork is the point. Routing web, STEM, code, human readable text, and target domains through different quality logic, instead of one generic filter, gives precise control over the data mixture, and a controlled mixture is what makes the later RL climb reproducible. Mid-training then adds 3.55 trillion tokens of curated STEM, math, and code, where answers are verifiable and code either runs or it does not. This phase also extends context to 256K and sets up the reinforcement learning stage.
The training loop: three specialists, then one model
This is where the model actually learns to reason. The strategy is to train three specialist models, each climbing its own reinforcement learning hill, then merge them into one.
The base algorithm is GRPO, Group Relative Policy Optimization. For each problem the model generates a group of rollouts, scores them against a verifiable ground truth, and reinforces the better ones. For math and code the reward is binary, right or wrong.
Running this for thousands of steps on a model this size does not just work, it collapses. So four stabilizers keep the climb steady, and each one fixes a specific failure mode of long horizon RL:
- Adaptive Entropy Control. An integral controller keeps the policy exploring. It widens the trust region when entropy collapses and tightens it when the policy gets too random, so the model neither freezes on one strategy nor drifts into noise.
- Difficulty-Scaled Length Penalty. Hard problems get longer reasoning traces; easy problems are penalized for rambling. This teaches the model to spend tokens where the problem warrants it.
- Top-p Mask Replay. The sampling mask is reused during the gradient update, which prevents the off policy mismatch that builds up across long rollouts.
- Self-Distillation. Periodically the RL progress is baked back in through supervised fine tuning, then the climb restarts. Note the word self: the model is learning from its own improved behavior, which is the opposite of copying a third party teacher. This is what allows thousands of stable steps without breaking the no distillation rule.
The three hills are scoped tightly. The STEM hill (math, physics, coding) trains on 5 million-plus samples, with the hardest 550K pairs driving the climb, 160K coding problems across 17 languages, and live code execution as the reward.
The Agentic hill (software engineering, tool use) turns 102 million public GitHub pull requests into 265K RL environments across 94K repositories, runs them in network isolated containers, and actively blocks reward hacking. The Helpfulness and Safety hill uses a reward model trained on human labels only, with lexicographic and gated rewards and safety as the first priority.
The merge is explicit. A consolidation supervised fine tuning stage blends the specialists by sample, 56% STEM, 11% agentic, 33% helpfulness and safety, into a single model where STEM makes up 89% of tokens through long reasoning traces.
A final consolidation RL pass polishes safety, over refusals, and style. You end with one model that holds three areas of mastery instead of three models you have to route between.
Safety, trained in rather than bolted on
Safety here is not a filter at the end, it is one of the three RL hills. That distinction is the whole argument: because the safety specialist is merged into the final model, helpfulness and safety are optimized together rather than traded off after the fact.
The numbers behind it: 2,170+ adversarial scenarios executed, 25 policy sensitive topic categories tested, a two stage process running an internal red team and then independent external red teamers, with results cross validated. Red teaming runs across early, mid, and late training, not as one pre launch sweep. The reward combines rule based safety checks with judge feedback, and the final RL round specifically targets over refusals so the model stays useful instead of refusing everything.
The proof is a scatter plot of helpfulness against safety across those 25 categories, with helpfulness on non sensitive content on one axis and safety pass rate on high sensitivity content on the other. On roughly five of eight category clusters MAI-Thinking-1 lands above and to the right of a leading competitor, meaning more helpful and safer at the same time. Plotting both axes together is the point: a model that is safe only because it refuses everything is not the goal.
The benchmark numbers
Five headline results: 97.0% on AIME 2025, 94.5% on AIME 2026, 87.7% on LiveCodeBench v6, 52.8% on SWE-Bench Pro, and 84.2% on GPQA Diamond.
The context under each matters as much as the score. AIME 2026 problems were released after the training cutoff, so the model has never seen them. LiveCodeBench keeps adding new problems to resist contamination. SWE-Bench Pro is real GitHub issues on real repositories. GPQA Diamond is graduate level science answered with no search tools.
Benchmark MAI-Thinking-1 Competitor A Competitor B Competitor C AIME 2025 97.0% 95.6% 99.8% 93.1% AIME 2026 94.5% — — — SWE-Bench Pro 52.8% — 53.4% — LiveCodeBench v6 87.7% — — 83.3% GPQA Diamond 84.2% 89.9% 91.3% 82.4%
The claim is not "we win everywhere." It is that a 35 billion active parameter model holds its own against the largest frontier systems, landing within a point of a top competitor on real world software engineering. That is the payoff of the from scratch approach: the capabilities were learned, so they show up on brand new, uncontaminated problems.
Frontier Tuning: running the same loop on your data
The last piece reframes everything. Instead of renting a generic model and hoping it fits, Frontier Tuning lets you run your own version of that hill climbing loop on top of the foundation model.
Four things define it. It is private, your data stays in your environment. It is cost efficient, you do not pay for tokens you do not need. It gets smarter on your actual context. And you control it, with no lock in to anyone else's roadmap. The workflow is four steps: define what good looks like for your task, feed in your data and workflows and domain context, improve through training inside your secure tenant, and deploy through Foundry or Copilot. The loop continues after deployment, real usage feeds the next training cycle, so the model compounds against your objectives rather than a generic benchmark.
The case study makes it concrete. A real customer needed to generate product quality reports from tasting panel discussions. A Frontier Tuned Flash variant of the reasoning model hit an 89.3% quality score, higher than every generic frontier model tested on that task, at 10x better cost efficiency on output tokens per dollar.
The lesson is not that the small model is secretly large. It is that a tuned model can beat the best generalists on a specific workflow at a fraction of the cost.
How to try it
On Microsoft Foundry, the image, voice, and transcription models are available now, and all three are playable in the browser, including on a phone. The reasoning model is in private preview on Foundry, with broader access rolling out. The coding model is available now as a default in Visual Studio Code.
The models are also reaching BaseTen, where you can fine tune the weights yourself, plus OpenRouter and Fireworks. Model cards, API docs, and pricing live on the Foundry site.
Final Thoughts
Microsoft built a clean data pipeline, trained from scratch instead of distilling, made safety one of the training objectives instead of a filter, and then proved a mid-sized model can reach the frontier when the work is done carefully. None of that is flashy. It is just disciplined engineering, measured at every step.
What I find most useful for builders is the shift in where the frontier actually is. For a long time the assumption was that bigger and more general always wins. The Frontier Tuning results push back on that.
A model that knows your workflow, runs in your environment, costs an order of magnitude less, and improves every time your team uses it is a different and often better proposition than the largest general model on the market.
The architecture is impressive, but the part worth acting on is that the same loop Microsoft used to build the model is now something you can run on your own data. That is a practical handle on a fast moving field, and it is a good place to start experimenting.
References and further reading
Official Microsoft AI announcement of the seven model family: https://microsoft.ai/news/building-a-hillclimbing-machine-launching-seven-new-mai-models/
Microsoft Foundry Models overview on Microsoft Learn: https://learn.microsoft.com/en-us/azure/foundry/concepts/foundry-models-overview?WT.mc_id=AZ-MVP-5000671
Foundry Models sold by Azure on Microsoft Learn: https://learn.microsoft.com/en-us/azure/foundry/foundry-models/concepts/models-sold-directly-by-azure?WT.mc_id=AZ-MVP-5000671
Deploy and use MAI image models in Microsoft Foundry on Microsoft Learn: https://learn.microsoft.com/en-us/azure/foundry/foundry-models/how-to/use-foundry-models-mai?WT.mc_id=AZ-MVP-5000671
What is MAI-Voice on Microsoft Learn: https://learn.microsoft.com/en-us/azure/ai-services/speech-service/mai-voices?WT.mc_id=AZ-MVP-5000671
Customize a model with fine tuning in Microsoft Foundry on Microsoft Learn: https://learn.microsoft.com/en-us/azure/foundry/openai/how-to/fine-tuning?WT.mc_id=AZ-MVP-5000671
Official Microsoft Foundry documentation samples on GitHub: https://github.com/microsoft-foundry/foundry-samples