Advancing the Quality-Efficiency Frontier for Coding AI on Windows PCs Microsoft's MAI-Code-1.1-Flash, a 137.9-billion-parameter mixture-of-experts coding model, runs locally on NVIDIA RTX Spark Windows PCs at a median of 51.12 tokens per second with a 120K-token input context, the company reported. Mixed-precision quantization cut the model's weight footprint from roughly 276 GB at 16-bit precision to a 53.0 GiB checkpoint at 3.31 bits per weight, with a more compact 46.1 GiB (2.87 bpw) variant also developed; the 53.0 GiB checkpoint ships through Microsoft Foundry and as the local model in GitHub Copilot. The work targets unmetered on-device coding without per-token cloud charges, with Copilot auditing a codebase for unused code, imports, dependencies and obsolete feature flags and producing a cleanup plan from the locally running model. Powered by NVIDIA RTX Spark, we are bringing the promise of unmetered local intelligence to increasingly demanding coding workloads—giving developers greater freedom to experiment, delegate, and iterate on their own hardware, without per-token cloud charges. Highly capable mixture-of-experts MoE models are making this opportunity tangible. These models tackle complex coding tasks spanning reasoning, implementation, testing, and debugging, while advances in efficiency are bringing more of that capability onto local devices. With 128 GB of unified memory, RTX Spark PCs enables us to ask a crucial question: how much useful coding intelligence can we deliver within a developer’s machine? Low-bit compute is a key enabler for this opportunity. Reducing precision lowers model memory requirements and can reduce inference bandwidth demands, creating room for larger models and longer contexts. But smaller is not automatically better: practical gains depend on preserving quality while coordinating model precision, inference runtimes, kernels, and memory management. The goal is more useful intelligence within the available resources, not fewer bits at the expense of accuracy or responsiveness. MAI-Code-1.1-Flash https://microsoft.ai/news/mai-code-1-1-flash-br-better-faster-at-a-quarter-of-the-cost/ reduces its weight footprint from 276 GB at 16-bit precision to a 53 GB mixed-precision checkpoint, delivering a median of 51.12 tokens per second with a 120K-token input context on RTX Spark in our measured configuration. This shows how model and systems advances can turn smaller footprints into more capable local AI. After the user starts the task, Copilot audits the codebase for unused code, imports, dependencies, and obsolete feature flags, investigates findings across the repository, and produces an actionable cleanup plan, with the low-bit model running locally on RTX Spark PCs. Balancing Quality, Footprint, and Responsiveness Running a large coding model locally requires balancing quality, footprint, and responsiveness within one device budget. Quantization reduces the bytes occupied by each weight, but the target model, KV cache, and runtime must still fit within the available allocation. Because every token streams the active weights through memory, the design must also account for memory-bandwidth pressure. These constraints create three coupled problems. At the model level, mixed precision and careful calibration are needed to preserve quality under low-bit quantization. At the inference level, low-bit formats need efficient kernels to improve responsiveness. At the system level, KV-cache memory grows with context length and competes with model weights for the available device footprint. The practical objective is therefore not simply to minimize precision. Model quality, weight and KV-cache footprint, and decoding responsiveness must be optimized together within the available device resources. MAI-Code-1.1-Flash provides one concrete example of this approach. How Low-Bit Models and Systems Engineering Enable Local AI: The MAI-Code-1.1-Flash Example MAI-Code-1.1-Flash https://microsoft.ai/news/mai-code-1-1-flash-br-better-faster-at-a-quarter-of-the-cost/ is a 137.9-billion-parameter mixture-of-experts model. To enable practical on-device coding, we addressed three coupled challenges: fitting the model weights, accelerating decoding, and supporting long coding contexts within the device’s memory budget. Quantization reduced the weight footprint from roughly 276 GB at 16-bit precision to 53.0 GiB 3.31 bpw , with a more compact 46.1 GiB 2.87 bpw variant also developed. The released 53.0 GiB checkpoint is available through Microsoft Foundry and as the local model in GitHub Copilot; it is the baseline for this section’s system measurements unless otherwise noted. We tackled the first challenge—fitting the model weights—through mixed-precision quantization. MoE experts contain approximately 96.6% of MAI-Code-1.1-Flash’s parameters and therefore dominate its weight footprint, but sensitivity to quantization varies across tensor roles and layers. To reach these smaller footprints while preserving coding quality, we explored precision allocations guided by two complementary signals: tensor role and calibration-derived sensitivity. Optimizing Mixed Precision for Coding Quality and Model Footprint Tensor-role-based allocation assigns different precisions to expert projections and other model components. In Q2-XXS , expert gate and up projections account for 64.4% of parameters and use about 2 bits per weight, while expert down projections account for 32.2% and use about 4 bits per weight. The remaining 3.4%—attention, dense feed-forward, embedding, output, routing, and normalization weights—retain higher precision where needed. The resulting weight artifact occupies 46.1 GiB at an average of 2.87 bpw ; this excludes KV-cache and other runtime memory. Calibration-derived layer sensitivity provides another way to generate candidate allocations. Quantization error depends on both the weight perturbation and the activation flowing through it: Δy = ŵ − w x. Because each expert sees only the tokens routed to it, we collect activation statistics from representative coding trajectories while preserving the observed routing. These sensitivity signals helped us generate and screen candidate tensors more amenable to quantization but did not directly determine the final recipe for precision allocation. Layer sensitivity varied substantially, and more aggressive layer-level precision reduction did not consistently improve the quality-size tradeoff. We therefore selected the final quantized models through end-to-end evaluation, as shown in Figure 3. End-to-end evaluation revealed several variants with similar coding quality at different model sizes, making selection a tradeoff between quality and footprint. We therefore compared candidates across a broad set of coding and non-coding benchmarks rather than relying on a single metric. Figure 3 illustrates this with SWE-Bench Verified and Terminal-Bench 2.1: variants that appear nearly equivalent on one benchmark can separate on another. This led to two useful on-device operating points. Q2-XS 53.0 GiB, 3.31 bpw retains a larger weight footprint, while Q2-XXS 46.1 GiB, 2.87 bpw pushes compression further. The two designs occupy different points on the quality-size frontier rather than representing a single universally optimal precision assignment. The broader lesson is that precision allocation is an empirical model-design problem. Calibration and sensitivity analysis can narrow the search space, but the final operating point must be validated on the workloads the model is expected to execute. Accelerating Decoding Speed for Long Coding Tasks Quantization reduces the model footprint; speculative decoding improves throughput by letting a smaller draft propose token blocks for the target model to verify in one pass. For MAI-Code-1.1-Flash, we trained a draft model from scratch using the open DFlash2 https://inco.ai/blog/dflash2/ architecture, built on DFlash https://arxiv.org/abs/2602.06036 . It uses target-model internal information and block diffusion to predict token blocks, with grouped dynamic convolutions to share information across neighboring positions and a lightweight selector to choose a coherent candidate sequence. Across held-out BigCodeBench, HumanEval, and LiveCodeBench benchmarks, candidate selection raised mean accepted tokens MAT from 4.26 to 4.43 with the same draft. Speedup also depends on drafting and verification costs: latency per token is t