hn.today

Up to 211% faster matrix multiplication on modern Apple Silicon

github.com8 points1 comments
Screenshot of Up to 211% faster matrix multiplication on modern Apple Silicon

mlx-tachyon is an MLX matrix-multiplication library designed to exploit the Metal 4 Neural Accelerators in Apple’s M5 chips. It combines floating-point and modular-arithmetic algorithms that reduce multiplication work, plus optional lossy INT8 kernels for machine-learning workloads. Users can request an error tolerance and let the library select a computation path, or choose a mode directly; it reports the path and expected accuracy. On M1-M4 Macs and CPUs, it falls back to standard MLX multiplication. Its strongest results include up to 69 effective TFLOP/s for large fp16/bf16 GEMMs, strict float32 results 26-70% faster than the M5’s strict-float32 path, and float64 calculations reported as 12-13.7 times faster than CPU Accelerate for very large matrices.

For LLM training, the INT8 mode trades precision for speed: it reports about 1.2% relative error with unbiased stochastic rounding, while converting eligible model layers yielded 10-20.5% faster end-to-end training steps in tested Qwen3-style workloads, with similar three-seed loss and gradient norms. The most dramatic headline gains - up to 211% - come from explicitly experimental paths with higher error, not the recommended production modes. Benefits depend on large matrices and M5 hardware; small matrices and single-token decoding are directed to native MLX. Results were measured on an M5 Max with a specific macOS and MLX version, so they should not be assumed to transfer to other hardware or workloads.

Read on github.com1 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Hardware

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.