---
title: "MPS in PyTorch 2.15"
description: "PyTorch 2.15 adds FP8 (float8_e4m3fn) tensors and scaled_mm on Apple's MPS backend and replaces many MPSGraph paths with dedicated Metal kernels."
url: "https://swe.quest/articles/mps-in-pytorch-2-15-b68893e8d3c0039f"
canonical: "https://huggingface.co/blog/mps-pytorch-2-15"
source: "Hugging Face"
published: "2026-10-20"
difficulty: "medium"
kind: "Release"
reading_minutes: 11
tags: ["inference","performance","python","hardware"]
---

# MPS in PyTorch 2.15

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2026-10-20, 11 min read, Release. Original: [https://huggingface.co/blog/mps-pytorch-2-15](https://huggingface.co/blog/mps-pytorch-2-15)

## Summary

PyTorch 2.15 adds FP8 (float8\_e4m3fn) tensors and scaled\_mm on Apple's MPS backend and replaces many MPSGraph paths with dedicated Metal kernels. A native GPU grouped matmul with a small-group decode kernel makes MoE decoding 5–6.5× faster than 2.14 (Qwen3.6-35B-A3B goes from 9.4 to 61.3 tokens/s on an M3 Ultra). GEMV-backed F.linear gives a 1.23× geomean speedup on decode shapes, and Metal softmax is about 8× faster over large vocabularies. Moving constant padding to Metal cuts Wan2.2 tiled VAE decode peak driver memory from 270 GiB to 8 GiB and fixes Qwen-Image VAE corruption. The release also adds complex LU and triangular solves, Python-level MPS streams, and requires macOS 15 and Python 3.11. Previewed 2.16 work includes all-Metal attention and periodic command-buffer commits that add up to 19% decode throughput.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Python](https://swe.quest/tags/python.md) (Languages)
- [Hardware](https://swe.quest/tags/hardware.md) (Infrastructure)

## Prerequisites

- PyTorch tensors and devices
- LLM prefill vs decode ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- GPU kernels basics ([easy posts on Hardware](https://swe.quest/tags/hardware.md?difficulty=easy))

## Keywords

PyTorch, MPS, Metal, MPSGraph, FP8, Apple silicon, grouped\_mm, torch.compile

## Related posts

- [Hugging Face ❤️ TorchTPU: TPUs, Natively](https://swe.quest/articles/hugging-face-torchtpu-tpus-natively-25e58a9bb63cbf24.md): Hugging Face · 2026-10-20 · Medium · 6 min read · Inference & serving, Hardware, Python, Machine learning
  TorchTPU is a native PyTorch backend that makes TPU an ordinary device, replacing the lazy-tensor torch\_xla path and making Optimum TPU unnecessary for running Hugging Face models.
- [Introducing 🤗 Accelerate](https://swe.quest/articles/introducing-accelerate-aaf88192c9f162b5.md): Hugging Face · 2021-04-16 · Medium · 7 min read · Model training, Python, Machine learning
  🤗 Accelerate lets PyTorch users keep their own training loops while running the same script on CPU, single or multi-GPU, multi-node, TPU, and with mixed precision, by adding about five lines: an Accelerator object, accelerator.prepare() for model/optimizer/dataloader, and accelerator.backward(). prepare() wraps the model in the right container such as DistributedDataParallel, wraps the optimizer for mixed precision, and shards any sampler's indices per process using synchronized RNGs instead of requiring DistributedSampler.
- [Profiling in PyTorch (Part 3): Attention is all you profile](https://swe.quest/articles/profiling-in-pytorch-part-3-attention-is-all-you-profile-44c4f73b7586bec2.md): Hugging Face · 2026-07-10 · Medium · 21 min read · Performance engineering, Inference & serving, Python, Hardware, LLMs
  Profiling attention variants in PyTorch on an A100 shows how each implementation appears in profiler traces.
- [Accelerate 1.0.0](https://swe.quest/articles/accelerate-1-0-0-3876b57c9168d12c.md): Hugging Face · 2024-09-13 · Medium · 5 min read · Model training, Python, Machine learning
  Hugging Face has published the first release candidates for Accelerate 1.0.0.
- [Learn the Hugging Face Kernel Hub in 5 Minutes](https://swe.quest/articles/learn-the-hugging-face-kernel-hub-in-5-minutes-049114b1e85677a7.md): Hugging Face · 2025-06-12 · Medium · 13 min read · Inference & serving, Performance engineering, Python, Hardware
  Hugging Face's Kernel Hub and \`kernels\` library let PyTorch code download pre-compiled, optimized GPU kernels such as FlashAttention, activations, RMSNorm and quantization kernels with a single \`get\_kernel\` call.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
