PyTorch 2.13 Brings FlexAttention to Apple Silicon
PyTorch 2.13 landed July 8 with FlexAttention on Apple Silicon — up to 12x faster attention on Mac GPUs and 4x lower memory for LM training.
PyTorch 2.13 Makes Local AI on a Mac Meaningfully Faster
The most useful AI releases are not always the flashiest, and PyTorch 2.13 is a perfect example. Shipped by the PyTorch Foundation on July 8, 2026, this open-source update quietly makes training and running models faster and cheaper for everyone — including the growing crowd of developers who want to do serious machine learning work on a laptop. The headline feature is that FlexAttention now runs on Apple Silicon through Apple's Metal/MPS backend, unlocking major speedups for anyone building on a Mac.
- What released: PyTorch 2.13, the latest version of the world's most widely used open-source deep learning framework, on July 8, 2026
- Apple Silicon win: FlexAttention on Metal/MPS delivers up to roughly 12x speedups over standard scaled-dot-product attention on sparse attention patterns
- Memory savings: A new prototype cross-entropy loss cuts peak GPU memory by up to 4x when training large-vocabulary language models
- Scale of the work: Roughly 3,300 commits from the community, plus a new CUTLASS-based Inductor backend and distributed-training improvements
What Is FlexAttention, and Why Does It Help?
Attention is the core operation inside transformer models, and it is often the most expensive part. FlexAttention lets developers express many different attention patterns — sliding windows, causal masks, custom sparsity — in simple PyTorch code, while the framework compiles them down to efficient GPU kernels. Until now, those benefits were concentrated on NVIDIA hardware. Bringing FlexAttention to Apple's Metal backend means a MacBook's integrated GPU can finally take advantage of the same optimized pathways, with up to ~12x speedups on sparse patterns. For the local AI movement — people running and fine-tuning models on their own machines rather than renting cloud time — that is a direct, tangible boost.
Lower Memory Means Bigger Models on Smaller Boxes
The other standout is a prototype nn.LinearCrossEntropyLoss that trims peak GPU memory usage by as much as 4x during training of models with large vocabularies. Memory is frequently the wall that stops a model from fitting on a given GPU, so a 4x reduction can be the difference between "won't run" and "runs comfortably." Combined with the new CuTeDSL/CUTLASS Inductor backend and continued FSDP2 distributed-training work, PyTorch 2.13 is a broad efficiency release that helps hobbyists and large labs alike.
Open Source That Lifts Everyone
What makes this release worth featuring is that it is free, foundational infrastructure. PyTorch underpins a huge share of modern AI research and tooling, and every performance gain compounds across the entire community — the same democratizing spirit behind efforts to run frontier models on your own hardware. A student on a MacBook, a startup on a single GPU, and a research lab on a cluster all get faster the same day. The PyTorch Foundation has scheduled a live community Q&A for July 22 to walk through the changes. It is exactly the kind of steady, open progress that keeps AI moving forward for the many, not just the few.
Sources: PyTorch Blog — July 8, 2026; PyTorch GitHub Release — July 8, 2026.
More AI Stories

Qwen3.8-Flash-Next Fits in 75GB With No GPU Needed
Qwen's 125B Flash-Next MoE runs locally in 75GB of RAM with no GPU VRAM required, scoring 62.5 on SWE-bench Pro with just 6B active parameters.

Model Hardware Standard Lets AI Agents Run Lab Gear
Anthropic's Model Hardware Standard cuts lab instrument integration from weeks to minutes, with Genentech, Carnegie Mellon and QuEra among first users.

OpenAI Jalapeño Benchmarks: 1.9x Work per Kilowatt
OpenAI published the first Jalapeño inference benchmarks: a 700W part claiming up to 1.9x throughput per kilowatt and 3.6x lower end-to-end latency.
