Visual Studio Code
Microsoft claims purpose-built models trained directly inside editor harnesses match frontier coding quality at lower latency by activating only 5 billion parameters per token.
AI-assisted summary of How Microsoft AI builds coding models optimized for GitHub Copilot | LIVE158 — original source. Check the original for full context.
Source published:
Key ideas
- Microsoft AI introduced MAI-Code-Flash, a specialized coding model purpose-built from the ground up for GitHub Copilot and Visual Studio Code rather than adapted from a general-purpose base model. (0:12)
- MAI-Code-Flash uses a Mixture-of-Experts architecture featuring 137 billion total parameters, but activates only 5 billion parameters per token inference to maximize throughput and minimize latency. (5:27)
- The model's training pipeline integrates directly into real developer harnesses, using multi-stage curriculum learning and reinforcement learning grounded in actual VS Code environments rather than purely synthetic benchmarks. (2:48)
- Microsoft demonstrated agentic multi-model orchestration by combining MAI-Code-Flash with MAI-Transcribe and MAI-Voice to execute voice-driven code changes, server management, and automated testing. (13:03)
Detailed notes
## Background Published by Visual Studio Code on YouTube on June 5, 2026, as part of Microsoft Build 2026, this session goes behind the scenes with Microsoft AI to examine how purpose-built coding models are engineered for GitHub Copilot. The session covers the training, evaluation, architectural design, and practical developer workflows that distinguish code-specialized models from generic LLMs.
## TL;DR Host Seth Juarez speaks with Microsoft AI research leads Yang Liu and Pengcheng He about MAI-Code-Flash, a specialized coding model engineered specifically for GitHub Copilot and Visual Studio Code. Rather than adapting an off-the-shelf base model, the team developed a multi-stage training pipeline encompassing cold-start supervised fine-tuning, curriculum learning, and reinforcement learning aligned directly within the live VS Code harness. The model uses a Mixture-of-Experts architecture with 137 billion total parameters and 5 billion active parameters per token, balancing low latency and cost with high intelligence across routine multi-language development tasks. Live demonstrations showcase rapid front-end application generation and an experimental multi-model agent system that combines speech recognition, voice synthesis, and autonomous coding agents to execute full-stack developer tasks.
## Atmosphere & style The broadcast blends high-energy developer enthusiasm with grounded, pragmatic machine learning engineering discussions. Host Seth Juarez brings an inquisitive, playful dynamic—trading jokes with the booth crew and pressing into real-world trade-offs—while researchers Yang Liu and Pengcheng He deliver clear, candid technical breakdowns. The conversation feels like an authentic engineering deep dive rather than marketing polish, highlighting the practical thrill of responsive coding tools while remaining honest about parameter scaling limits.
## Bulletin - [00:12](https://www.youtube.com/watch?v=Agc6Ik00R1g&t=12s) Microsoft AI introduced MAI-Code-Flash, a specialized coding model purpose-built from the ground up for GitHub Copilot and Visual Studio Code rather than adapted from a general-purpose base model. - [05:27](https://www.youtube.com/watch?v=Agc6Ik00R1g&t=327s) MAI-Code-Flash uses a Mixture-of-Experts architecture featuring 137 billion total parameters, but activates only 5 billion parameters per token inference to maximize throughput and minimize latency. - [02:48](https://www.youtube.com/watch?v=Agc6Ik00R1g&t=168s) The model's training pipeline integrates directly into real developer harnesses, using multi-stage curriculum learning and reinforcement learning grounded in actual VS Code environments rather than purely synthetic benchmarks. - [13:03](https://www.youtube.com/watch?v=Agc6Ik00R1g&t=783s) Microsoft demonstrated agentic multi-model orchestration by combining MAI-Code-Flash with MAI-Transcribe and MAI-Voice to execute voice-driven code changes, server management, and automated testing.
## Key takeaways - [00:12](https://www.youtube.com/watch?v=Agc6Ik00R1g&t=12s) Purpose-built coding models are designed specifically for end-user development scenarios rather than adapted late from off-the-shelf generalist foundations. - [00:12](https://www.youtube.com/watch?v=Agc6Ik00R1g&t=12s) MAI-Code-Flash emphasizes repository-level context, native tool invocation, low latency, and direct code editing over unnecessary reasoning loops. - [02:48](https://www.youtube.com/watch?v=Agc6Ik00R1g&t=168s) The training pipeline moves through cold-start supervised fine-tuning, curriculum learning from simple to complex tasks, and product-harness reinforcement learning. - [02:48](https://www.youtube.com/watch?v=Agc6Ik00R1g&t=168s) Reinforcement learning is aligned directly against the production VS Code environment, real developer prompts, and authentic toolsets. - [05:27](https://www.youtube.com/watch?v=Agc6Ik00R1g&t=327s) The Mixture-of-Experts design balances compute cost, speed, and intelligence by activating only 5B of its 137B parameters per token inference. - [10:08](https://www.youtube.com/watch?v=Agc6Ik00R1g&t=608s) MAI-Code-Flash is rolling out progressively to developers directly within the standard Visual Studio Code model picker menu. - [11:16](https://www.youtube.com/watch?v=Agc6Ik00R1g&t=676s) Evaluating developer models relies heavily on live online A/B testing—tracking task completion, engagement, and cancellation rates—over theoretical benchmark scores. - [11:16](https://www.youtube.com/watch?v=Agc6Ik00R1g&t=676s) While matching frontier models on standard daily engineering tasks across multiple languages, smaller parameter footprints naturally face constraints on deep reasoning and non-coding tasks like creative writing. - [13:03](https://www.youtube.com/watch?v=Agc6Ik00R1g&t=783s) A multi-model agent demo combined MAI-Transcribe, MAI-Voice, and MAI-Code-Flash to autonomously manage local servers, adjust UI styles, and generate unit tests via voice commands. - [15:14](https://www.youtube.com/watch?v=Agc6Ik00R1g&t=914s) MAI-Code-Flash represents the compact, low-latency end of Microsoft AI's model roadmap, with larger high-capacity coding models planned for future release.
## Detailed walkthrough ### [00:12](https://www.youtube.com/watch?v=Agc6Ik00R1g&t=12s) Introducing MAI-Code-Flash and Purpose-Built Design for GitHub Copilot
Host Seth Juarez opens the session celebrating the announcements at Microsoft Build, noting that while roughly seven MAI models were released, the one that stands out most to him as a developer is MAI-Code-Flash. Joining him to face "the hard-hitting questions" are research leads Yang Liu and Pengcheng He. Seth asks what it truly means when they claim MAI-Code-Flash was built specifically with GitHub Copilot and Visual Studio Code in mind, rather than functioning like an off-the-shelf model.
Pengcheng He explains that a purpose-built model does not follow the traditional route of taking an arbitrary base model and retrofitting it for programming tasks at the finish line:
> “As to me the purpose building model means we didn't take a general purpose model and adapted it for code at the end.”
Instead, the team designed and optimized the model from the ground up for the GitHub Copilot user scenario. Rather than merely spitting out isolated snippets of generic code, the model understands repository-level context, calls tools appropriately, grasps the developer's intent, executes targeted edits, and responds with low latency. Yang Liu adds that being purpose-built means looking far beyond standard synthetic benchmarks: in a real coding environment, the model interacts appropriately, answering simple user queries without unnecessary, elongated thinking loops, and automatically triggering unit tests and diagnostics at the correct moment in the workflow.
[02:48](https://www.youtube.com/watch?v=Agc6Ik00R1g&t=168s) Multi-Stage Training Pipeline and Real-World Reinforcement Learning
Seth probes deeper into the training pipeline, comparing traditional ML—shoving data through linear algebra and calculus—with the specialized approach used for MAI-Code-Flash. Yang and Pengcheng outline how reinforcement learning (RL) and multi-stage alignment operate directly inside the real developer harness. The model trains against the actual VS Code environment, real daily software engineering tasks, real developer prompts, and the identical toolsets used in production, evaluating actions through a tailored reward model.
```mermaid flowchart TD accTitle: MAI-Code-Flash Training Pipeline accDescr: A four-stage progression from cold-start instruction following to in-environment reinforcement learning.
subgraph SFT["Supervised Fine-Tuning Stages"] A["Cold Start SFT<br/>(Instruction format & tools)"] --> B["Curriculum Training<br/>(Simple to complex tasks)"] end
subgraph RL["Environment-Aligned Alignment"] B --> C["Reinforcement Learning<br/>(Real VS Code harness & tools)"] C --> D["Custom Production Benchmark<br/>(Identical workflow testing)"] end ```
Pengcheng He details the progression across the multi-stage training pipeline, emphasizing how alignment spans the entire lifecycle:
> “The final stage is that we use reinforcement to make the model to learn in the real environment as a productive.”
- **Cold Start & Supervised Fine-Tuning (SFT):** The model starts out merely predicting next tokens; an initial "cold start" teaches it instruction following, proper output formatting, and basic tool use. - **Curriculum Learning:** The team trains the model incrementally with diverse datasets, stepping from kindergarten-level simple coding exercises up through complex architectural problems. - **Product-Harness Reinforcement Learning:** The terminal alignment stage places the model into the exact GitHub Copilot and VS Code harness, aligning training, evaluation, and production within the identical workflow.
[05:27](https://www.youtube.com/watch?v=Agc6Ik00R1g&t=327s) Architecture: Mixture-of-Experts and Token Efficiency
Seth raises the paradox of model scaling: developers often believe bigger is inherently better, yet large monolithic models introduce unbearable latency and computational costs. Pengcheng and Yang break down the architecture of MAI-Code-Flash, explaining that while it boasts an aggregate capacity of 137 billion parameters, it relies on a Mixture-of-Experts (MoE) design where only 5 billion parameters are actively engaged per token inference.
Yang Liu explains how this structural balance directly addresses production trade-offs:
> “I think model size plays a very important role here is like it can have a trade off between the model intelligence, the speed and the cost.”
- **Parameter Profile:** 137 billion total parameters across the MoE architecture, but only 5 billion active parameters route through any individual inference step. - **Sub-Network Routing:** Rather than executing the query through a single isolated expert, the MoE dynamically routes tokens across a mixture of experts, keeping compute slim while preserving broad capacity. - **Token & Model Efficiency:** By pairing fast parameter activation with prompt- and token-efficient reasoning paths, the model avoids wasting tokens on prolonged deliberations, acting as an agile "beast at its size."
[09:20](https://www.youtube.com/watch?v=Agc6Ik00R1g&t=560s) Live VS Code Front-End Demo
Moving from technical architecture to practical execution, the team transitions to an on-screen demonstration within Visual Studio Code. Yang Liu shows MAI-Code-Flash generating a complete front-end web application from scratch.
Yang Liu emphasizes the model's throughput and environment familiarity as it streams code directly into the editor:
> “You can see the model is very fast you give it a problem, it do a lot of things like the token on the fly is super quick.”
The model leverages its native VS Code tooling hooks and specialized training to emit code, edit files, and spin up an attractive, fully functional web application in seconds. Yang then previews a second demonstration, prompting the model to construct an application with a distinct retro style.
[10:08](https://www.youtube.com/watch?v=Agc6Ik00R1g&t=608s) Real-World Grounding and Rollout in VS Code
The team wraps up a look at a game demonstration, pointing out that significant effort went into improving the model’s front-end capabilities alongside native training partners so that UI elements render cleanly and efficiently. The hosts highlight that this specialized model—MAI-Code-Flash—is actively making its way into the hands of real developers. Rollout is taking place gradually; users who have received access will spot the model directly inside the VS Code model picker dropdown.
```mermaid flowchart LR accTitle: Real-World Workflow Alignment Pipeline accDescr: Diagram showing how developer feedback and grounding tasks feed directly into model optimization for GitHub Copilot. subgraph Inputs["Inputs & Signals"] A["Real Developer Workflows"] B["10-Minute Grounding Tasks"] end subgraph Optimization["Model Tuning"] C["MAI-Code-Flash Optimization"] end subgraph Delivery["VS Code Integration"] D["Model Picker in VS Code"] E["GitHub Copilot Engine"] end A --> C B --> C C --> D C --> E ```
When asked what has been the most exciting or surprising lesson from training a frontier model targeted at such an exact domain, Pengcheng He emphasizes that optimizing for synthetic benchmarks alone falls short compared to grounding the model in actual programming routines. Pengcheng He reflects on this directly: “Well, learning I think users real workflow is important for us to optimize their model for users purpose, yeah instead of another benchmark.” Without training against real developer scenarios—such as a developer sitting down to ground themselves in a code base during an intensive ten-minute coding window—the model would never have reached the quality bar it demonstrates today within GitHub Copilot.
- **Rollout Mechanism:** Distributed progressively to developers through the standard model picker menu within VS Code. - **Workflow Grounding:** Prioritizes end-user interaction patterns over theoretical scorecards, using real coding sessions to guide training.
---
[11:16](https://www.youtube.com/watch?v=Agc6Ik00R1g&t=676s) Evaluation, Online A/B Testing, and Daily Performance
Evaluating code models requires looking well beyond traditional public benchmarks. While the team notes that the model achieves state-of-the-art results for its parameter class across standard evaluations, the real test occurs in production. The team relies heavily on live online A/B testing to measure genuine user satisfaction: tracking whether the model successfully completes developer requests, whether users stay engaged with its completions, and whether cancellation rates drop.
When discussing how MAI-Code-Flash feels in day-to-day software engineering, the developers describe it as noticeably snappier and faster than giant general-purpose LLMs. For common everyday software engineering—spanning back-end logic, front-end design, and multiple programming languages—its output matches today's massive frontier models. However, the team is candid about the physical realities of parameter scale. Pengcheng He explains: “To me, I think for most of the task, it’s comparable to today’s frontier big models.” He clarifies that while scaling laws mean smaller models still face hurdles on exceptionally deep or complex reasoning challenges, MAI-Code-Flash handles routine daily engineering workflows smoothly. Furthermore, because it is hyper-specialized for code, users should not expect it to write poetry or handle creative prose; specialized tasks outside the developer domain are best left to broader generalist models.
- **Online Evaluation Metrics:** Monitored via active A/B tests focusing on task fulfillment, sustained user engagement, and minimal cancellation clicks. - **Task Strengths:** Multi-language development, front-end user interfaces, and back-end application logic. - **Trade-offs:** Smaller parameter footprints naturally encounter constraints on ultra-challenging reasoning tasks and non-coding tasks like creative writing.
---
[13:03](https://www.youtube.com/watch?v=Agc6Ik00R1g&t=783s) Multi-Model Agent Demo: Combining Transcribe, Voice, and Code Flash
To showcase how specialized models can orchestrate complex tasks together, the team presents a live interactive agent system that features voice-controlled coding agents. Before rolling the demonstration, Seth Juarez checks in with the production booth to ensure the feed audio is configured properly, joking that “Tom's awesome” as the sound team gives the green light.
```mermaid flowchart TD accTitle: Multi-Model Agent Interaction Flow accDescr: Flowchart illustrating the speech-to-code-to-voice pipeline combining MAI-Transcribe, MAI-Code-Flash, and MAI-Voice. subgraph SpeechIn["Audio Input Processing"] U["Developer Voice Request"] --> T["MAI-Transcribe"] end subgraph Execution["Agentic Orchestration"] T --> C["MAI-Code-Flash Agents"] C --> V["Vite Dev Server (Approval Required)"] C --> G["UI Styling (Blue & Green Gradient)"] C --> N["NPM Unit Tests (Profile Header)"] end subgraph SpeechOut["Spoken Feedback"] C --> S["MAI-Voice Synthesis"] S --> R["Spoken Agent Status to Developer"] end ```
The recorded demo illustrates an autonomous developer workflow managed entirely via speech:
1. **Local Server Setup:** The user verbally requests to run the web application locally. The system replies aloud, asks for human approval to boot up the Vite development server, and confirms once it is listening on `localhost`. 2. **Dynamic UI Modification:** The developer commands the assistant to change the web application's background color into a gradient of blue and green; the agent processes the code changes and immediately confirms project files are updated. 3. **Automated Testing:** The developer asks the agent to inspect existing unit tests, identify gaps, and generate the missing coverage. The assistant checks the suite, requests permission to run `npm test`, and synthesizes new unit tests for the application's profile header component. 4. **Agent Inspection:** When the user asks for a real-time status update on what the background agents are doing, the voice agent checks the workspace state and reports that three distinct agents are actively analyzing the application structure, with one planning to refactor components into a reusable architecture.
Yang Liu explains that this experiment was built as a weekend project uniting Microsoft AI's specialized portfolio: “We combined our latest state of art MAI-Transcribe model, MAI-Voice model and MAI-Code-Flash model for this fun project.” By pairing high-fidelity audio transcription, low-latency synthetic speech, and rapid code generation, the system provides a glimpse into the agentic workflows developers could soon use to delegate multi-step software tasks.
---
[15:14](https://www.youtube.com/watch?v=Agc6Ik00R1g&t=914s) Developer Takeaways and the Roadmap Ahead
Wrapping up the session, the team shares their core perspectives on where AI-assisted development is heading next. Pengcheng He highlights the sheer pace of iteration, noting that developer imagination is vital because significantly more advanced capabilities will emerge in the immediate months ahead. Yang Liu reinforces the team's commitment to developer-specific models: “I think my takeaway is we are seriously creating the best model for our product, the best code and other product, and this is just the beginning of our journey.”
Seth Juarez urges developers to experiment with MAI-Code-Flash in their editors and continuously submit feedback through VS Code and Copilot channels. The engineering team relies on telemetry and user sentiment to pinpoint gaps and refine future iterations. As a final preview of what is in store, the team reminds the audience that MAI-Code-Flash represents the compact, highly optimized end of their architecture. Pengcheng He leaves viewers with an eye toward the future: “Just stay tuned for some more powerful beasts.” Seth closes out the broadcast by thanking the researchers and expressing his nerd excitement for the future of developer tooling.
## Notable quotes > [00:12](https://www.youtube.com/watch?v=Agc6Ik00R1g&t=12s) As to me the purpose building model means we didn't take a general purpose model and adapted it for code at the end. — Pengcheng He
## Mentioned GitHub Copilot, MAI-Code-Flash, MAI-Transcribe, MAI-Voice, Microsoft AI, Microsoft Build, Pengcheng He, Pierce Boggan, Seth Juarez, Vite, Visual Studio Code, Yang Liu
## Video description Go behind the scenes with Microsoft AI to learn how to build and optimize coding models for GitHub Copilot. This session will explore what makes code-focused models different—from training and evaluation to performance, safety, and real-world developer feedback. You’ll hear how Microsoft AI is advancing model quality for the workflows developers care about most, and how those innovations show up in GitHub Copilot experiences used by millions of developers.
To learn more, please check out these resources: * https://aka.ms/MAI/GHCP * https://aka.ms/GHCP/automodel
𝗦𝗽𝗲𝗮𝗸𝗲𝗿𝘀: * Seth Juarez * Pierce Boggan * Yang Liu * Pengcheng He
𝗦𝗲𝘀𝘀𝗶𝗼𝗻 𝗜𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻: This is one of many sessions from the Microsoft Build 2026 event. View even more sessions on-demand and learn about Microsoft Build at https://build.microsoft.com
LIVE158 | English (US)
Broadcast Stage
#MSBuild
Chapters: 0:00 - Introduction and Microsoft Build AI Model Overview 00:00:28 - Introducing the Mai Code Flash Team and Project Goals 00:01:00 - Purpose-Built Model for GitHub Copilot and VS Code 00:02:48 - Reinforcement Learning for Real Developer Workflows 00:03:50 - Multi-Stage Training Pipeline and Environment Alignment 00:05:27 - Model Size and Mixture-of-Experts Architecture Explained 00:10:20 - Demonstration of Mai Code Flash in VS Code 00:13:06 - Interactive AI Agents Demo Combining Multiple Mai Models 00:15:16 - Developer Takeaways and Future Model Enhancements 00:16:07 - Closing Remarks and Call for User Feedback
[Source](https://www.youtube.com/watch?v=Agc6Ik00R1g)