PyTorch 2.15 has been officially released, with its MPS (Metal Performance Shaders) backend receiving the most extensive optimizations to date: for the first time, it natively supports FP8 (float8_e4m3fn) tensor storage and computation on macOS; MoE‑architected language models (such as Qwen3.6‑35B‑A3B) achieve a token generation rate of 61.3 tokens/s on the M3 Ultra, representing a 5–6.5× improvement over version 2.14; Wan2.2’s video VAE decoding sees peak GPU memory usage drop sharply from 270 GiB to approximately 8 GiB; key sampling operations like softmax are accelerated by about 8×; and new support has been added for complex-number linear algebra, grouped matrix multiplication, MPS stream control, and more.
The performance boost stems from a large-scale migration strategy that moves MPSGraph operations to Metal kernels. Hugging Face, in collaboration with PyTorch maintainers, conducted joint testing on real-world models—covering language, image, and video tasks from the Hugging Face Hub—and, after identifying bottlenecks, directly implemented custom Metal kernels to replace the original graph-based execution paths. For example: dedicated GEMV kernels are enabled for single-line linear layers (such as those used during LLM decoding); grouped matrix multiplication (grouped_mm) leverages GPU-native offset reads, eliminating CPU–GPU synchronization overhead; and frequently occurring high‑cost operations like padding, convolution backward, and dropout have all been equipped with Metal‑accelerated execution paths.
This update also fixes several critical bugs: In the Qwen-Image-2.1 image-editing pipeline, the VAE encoder previously silently corrupted images on MPS (with a PSNR of only 10.06 dB); after revising the padding logic, the PSNR has been restored to 29.95 dB, matching the CPU results. Additionally, scaled dot-product attention now correctly handles batch processing and head-dimension broadcasting. Dozens of new operators, including torch.frexp, torch.logspace, and torch.take, have been added for support. All features require macOS 15 or later, Python 3.11+, and are compatible only with Apple Silicon Macs.
Looking ahead to PyTorch 2.16, the key directions include: completely decoupling the attention mechanism from MPSGraph and implementing it entirely in Metal; completing the migration of more operators (such as BatchNorm, MSE loss, and bincount) to Metal (with bincount achieving over a 13,000× speedup in certain scenarios); reducing the size of libtorch_cpu.dylib by 25%; and further lowering LLM decoding latency through finer-grained command buffer submission (submitting once every 16 kernels). The official team emphasizes that all current performance data are based on real‑world testing on devices like the M3 Ultra or M5 Pro, and do not rely on theoretical derivations or cross‑platform comparisons.