Back to top

PyTorch on a Mac GPU: Using the MPS Backend on a Dedicated Cloud Mac

MacCloud October 2, 2026 0 comments

PyTorch can use the GPU of a Mac with Apple silicon. Instead of CUDA, it uses Apple’s Metal framework through the MPS (Metal Performance Shaders) backend. On a dedicated cloud Mac you can train and run PyTorch models on that GPU around the clock, without buying the hardware yourself.

How PyTorch uses the Mac GPU

Since PyTorch 1.12, the MPS backend sends tensor operations to the Apple silicon GPU. You select it like any other device:

import torch
device = torch.device("mps" if torch.backends.mps.is_available() else "cpu")
model = model.to(device)

Apple silicon has unified memory: the CPU and GPU share the same memory. A Mac with 64 or 128 GB can therefore load models that would not fit on many single graphics cards, without copying data between separate CPU and GPU memory.

What works well, and what to keep in mind

  • Works well: fine-tuning and training small and medium models, inference, experiments and prototypes, and models that need a lot of memory.
  • Keep in mind: not every PyTorch operation is supported on MPS yet; you can let unsupported operations fall back to the CPU with the PYTORCH_ENABLE_MPS_FALLBACK=1 setting. CUDA-only libraries do not run on a Mac. For very large training runs, a cluster of NVIDIA GPUs is usually faster.
  • Alternatives on the same Mac: Apple’s MLX framework is built for Apple silicon, and Core ML is used to run models in apps.

Why run PyTorch on a cloud Mac?

  • A whole Mac for you. JUUZ rents dedicated physical Macs: no other customers share your GPU or memory.
  • Full control. With root access you install the Python, PyTorch and library versions you need.
  • Long jobs keep running when you close your laptop, in our Amsterdam datacenter.
  • A fixed monthly price, with no charges per hour or per GPU.

Which Mac to choose

Use Suggested Mac
Learning, small models, inference Mac mini with 16–24 GB
Fine-tuning and medium-sized models Mac mini M5 Pro with 48–64 GB
Large models and the most GPU cores Mac Studio with a Max chip and up to 128 GB

See models and prices on the Mac mini cloud and Mac Studio cloud pages, and compare the chips in our Mac Studio guide.

Getting started

  1. Order a Mac and receive your login details, usually within 1–2 hours.
  2. Connect over SSH (see remote access to a Mac).
  3. Install Python and PyTorch following the Apple or PyTorch instructions.
  4. Check torch.backends.mps.is_available() and move your model and data to the mps device.
  5. For notebooks, see Jupyter on a remote Mac.

Frequently asked questions

Can I use CUDA on a Mac?

No. Macs with Apple silicon have no NVIDIA GPU. PyTorch uses the Mac GPU through MPS instead.

Is a Mac faster than an NVIDIA GPU for PyTorch?

Usually not for raw training speed. A Mac is strong when you need a lot of memory, low power use and a simple, always-on machine.

Sources

Information checked in October 2026.