Sitemap

AI Advances

Democratizing access to artificial intelligence

Running TensorFlow Applications on Apple Silicon Mac

Optimizing Your TensorFlow Application with Metal Performance Shaders (MPS)

8 min readOct 27, 2024

--

Press enter or click to view image in full size
Photo by Joey Banks on Unsplash

In my earlier article, I talked about how to use Apple’s MPS (Metal Performance Shaders) to speed up the inferencing of your Hugging Face models.

MPS, or Metal Performance Shaders, is a framework developed by Apple to provide highly optimized, low-level GPU acceleration for machine learning and graphics tasks on Apple devices, including those with Apple silicon (like the M1, M2, and M3 chips).

What if you are training your own models using TensorFlow? In this short article, I will guide you on how to leverage MPS to accelerate your neural network training. You’ll also discover when using MPS is advantageous and when sticking with the CPU might be the better option.

Creating Virtual Environments

For this article, I will create two virtual environments — one for running TensorFlow on CPU and one for running TensorFlow on MPS.

--

--

AI Advances

Published in AI Advances

Democratizing access to artificial intelligence

Wei-Meng Lee

Written by Wei-Meng Lee

ACLP Certified Trainer | Blockchain, Smart Contract, Data Analytics, Machine Learning, Deep Learning, and all things tech (http://calendar.learn2develop.net).

Responses (3)