Skip to main content

Mac Studio environment

What's on a Mac Studio when you log in: macOS, Homebrew's git, Python and uv, what you can install in your home folder, MLX, and the remote desktop.

On this page

A Mac Studio reservation is a whole Apple silicon Mac running macOS, and it's yours alone for the reservation. You log in over SSH as renter, a standard account with no admin rights:

bash
ssh -p 2211 renter@ssh.gputorent.com

Your port is on the reservation page and in the email sent when the reservation goes live (2211 is an example). Most work happens in the terminal, like on a Linux server, and there's a remote desktop when you need the screen.

What's installed

  • macOS with its standard command-line tools: zsh (the default shell), bash, ssh, scp, rsync and curl.
  • Homebrew, with git, python (as python3) and uv. It's on the PATH for everyone.
  • Metal, Apple's GPU interface, which MLX and PyTorch's mps backend use.

Homebrew belongs to the machine's administrator, so brew install doesn't work for you. If you need a system-level package, ask us and we can add it between rentals.

What you can install

Everything else installs in your home folder, without admin rights:

  • Python environments: python3 -m venv, then pip install; or uv (uv venv, uv pip install, uv run).
  • MLX and mlx-lm, for running and serving models on the GPU (see below).
  • PyTorch with the mps device.
  • Hugging Face models, which download into ~/.cache/huggingface.

Each reservation starts from a clean machine, so a startup script is the easiest way to set up the same tools every time.

Setting up MLX

MLX is Apple's array framework for Apple silicon, and mlx-lm runs and serves language models with it. Install both in a virtual environment:

bash
python3 -m venv ~/.venvs/mlx
source ~/.venvs/mlx/bin/activate
pip install --upgrade pip mlx-lm

Generate text from a 4-bit model (downloaded from Hugging Face on first use):

bash
mlx_lm.generate --model mlx-community/Qwen3-8B-4bit --prompt "Explain unified memory in one paragraph."

Chat with it interactively:

bash
mlx_lm.chat --model mlx-community/Qwen3-8B-4bit

Or serve an OpenAI-compatible API on port 8080:

bash
mlx_lm.server --model mlx-community/Qwen3-8B-4bit --port 8080

Reaching a server on the machine

Only the SSH port reaches the machine from the internet. A server you run on it, such as mlx_lm.server or Jupyter, is reachable through SSH port forwarding. On your own computer, run:

bash
ssh -p 2211 -N -L 8080:localhost:8080 renter@ssh.gputorent.com

Leave it running, and the server is at http://localhost:8080 on your computer. VS Code and Jupyter has more. Our blog post Running Qwen3 and Llama with MLX covers model choice, quantisation and speed.

Memory

The CPU and GPU share the unified memory, and so does macOS itself. By default macOS lets the GPU use roughly three quarters of it — about 96 GB on a 128 GB machine — which is the practical budget for a model's weights plus its KV cache. Watch memory use with:

bash
memory_pressure | tail -1
top -l 1 -s 0 | grep PhysMem

If a model barely fits, pick a smaller quantisation (4-bit instead of 8-bit) or a shorter maximum context.

Other frameworks

  • PyTorch runs on the GPU through its mps device: pip install torch, then use device="mps".
  • llama.cpp and tools built on it support Metal and GGUF models.
  • Hugging Face Transformers works with PyTorch on mps, but MLX is usually faster for inference on a Mac.

The remote desktop

The Mac's desktop is available through Screen Sharing (VNC), carried inside your SSH connection: no VNC port is open to the internet. You read a password once, open a tunnel and point a viewer at localhost:5901. Remote desktop on a Mac Studio has the steps for macOS, Windows and Linux.

No Apple ID, no admin rights

  • There's no Apple ID on the machine. You can't sign in to iCloud or the App Store, or turn on Find My, because those need an administrator.
  • renter has no sudo and can't change system settings, other accounts or the SSH configuration. What's allowed on the machine lists the rules.

Things that work differently from Linux

  • There's no apt, and no brew install for you: install Python tools with pip or uv, or download them into your home folder.
  • nvidia-smi and CUDA don't exist on a Mac. The GPU is used through Metal.
  • The shell is zsh; your scripts can still use #!/bin/bash.
  • Paths such as /home don't exist; your home folder is under /Users.