HyperAIHyperAI

Command Palette

Search for a command to run...

PyTorch 2.15 adds FP8 and Metal kernels to accelerate MPS on Macs

The Hugging Face PyTorch team detailed major MPS backend updates in PyTorch 2.15 for Apple Silicon Macs, moving workloads from MPSGraph to dedicated Metal kernels to reduce memory growth, unsupported operations and performance cliffs common in early 2026. The release adds FP8 support via float8_e4m3fn tensors, storing values in one byte, half the space of BF16, and supporting scaled matrix multiplication with tensorwise and rowwise scaling. Language model decoding improves significantly. Single row linear layers use specialized matrix vector kernels with fused bias handling, yielding a 1.23 times geometric mean speedup across common BF16 shapes. Mixture of experts layers gain native grouped matrix multiplication on the GPU, avoiding CPU synchronization and group loops. On an M3 Ultra, Qwen3.6-35B-A3B rises from 9.4 to 61.3 tokens per second versus version 2.14. Softmax and log softmax are about eight times faster for large vocabularies, with a 128K vocabulary row dropping from 57 microseconds to 7 microseconds. Linear algebra also expands. Complex float32 LU factorization, LU solve and triangular solve run on MPS, enabling related determinants and gradients. Small matrix inversions, blocked QR decomposition, triangular solves and more robust singular value decomposition improve geometry, transformation and numerical workloads. Audio, video and training paths receive new Metal implementations. Convolution, padding, dropout, upsampling backward and channels last convolution backward gain efficiency. A major video decode improvement reduces peak driver memory for Wan2.2's video VAE from about 270 GiB to 8 GiB by running constant padding on Metal. Developers gain Python access to MPS streams, stream synchronization and allocator tracking across streams. The update adds operations including frexp, logspace, take, heaviside and polynomial functions, and fixes batch and head broadcasting in scaled dot product attention. MPS now requires macOS 15 or later and Python 3.11 or later, with clearer diagnostics when hardware or OS support is unavailable. PyTorch 2.16 is expected to move scaled dot product attention fully to Metal, accelerate decoding by committing command buffers during kernel encoding, continue replacing MPSGraph operations, and shrink installation size with Metal 3.1 shader builds.

Related Links