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
Kimi K2.7 Code Brings Open Weights to GitHub Copilot
GitHub Copilot's first open-weight model, Kimi K2.7 Code, reached Business and Enterprise plans on July 7 — a 1T-parameter MoE with 32B active.
GPT-5.6 Tiers Explained: Which of Sol, Terra, Luna Fits
OpenAI's GPT-5.6 shipped July 9 in three tiers — Sol, Terra, Luna — priced from $1 to $30 per million tokens. Here's how to pick the right one.
Gemma 4 Runs 90% Faster on Apple Silicon in Ollama
Ollama v0.32.0 makes Google's Gemma 4 nearly 90% faster on Apple Silicon via multi-token prediction — local AI on a laptop just got a lot snappier.


