Skip to main content

Templates

The ready-made startup scripts for Mac Studio (MLX) and DGX Spark (CUDA), and how to customise them.

On this page

Templates are ready-made startup scripts we maintain. Each plan recommends the templates that suit its machine, and they appear under Recommended for this plan in the startup script list on the reservation page.

To make your own version, go to Startup Scripts in your dashboard, open the Templates tab and choose Customize. That copies the template into My scripts, where you can edit it freely.

Mac Studio (MLX)

Warm up and benchmark (MLX)

Checks the machine and leaves a benchmark figure behind. It prints the model, chip, core count and memory, installs Apple's MLX framework into a virtual environment at ~/.venvs/mlx, and times a large matrix multiplication on the GPU:

text
FP32 dense matmul (MLX/Metal): … TFLOP/s (n=8192)

It takes a couple of minutes, and nothing is left running.

Download a model (Qwen3-8B, MLX)

Downloads a model's weights into the Hugging Face cache (~/.cache/huggingface), so it's ready when you log in. It installs mlx-lm and the Hugging Face CLI into ~/.venvs/mlx, downloads Qwen/Qwen3-8B (about 16 GB), and prints the command to serve it:

bash
~/.venvs/mlx/bin/mlx_lm.server --model Qwen/Qwen3-8B --port 8080

Change the MODEL= line to download another model. mlx-community/Qwen3-8B-4bit (about 5 GB) and mlx-community/Qwen3-8B-8bit (about 9 GB) are quicker to download and use less memory.

DGX Spark (CUDA)

Warm up and benchmark

Prints the GPU with nvidia-smi, then compiles and runs a small cuBLAS matrix-multiplication benchmark with the CUDA toolkit already on the machine. It works offline, finishes in a couple of minutes, and leaves nothing running.

Download a model (Qwen3-8B)

Downloads Qwen/Qwen3-8B into ~/.cache/huggingface using vLLM's Docker image, without starting a server or opening a port. It prints the docker run command that serves the model with vLLM on port 8000 from the warm cache. That command sets --gpu-memory-utilization 0.85: the GPU shares its memory with the operating system, so leave some headroom.

Gated models and tokens

Some models — Llama, for example — need you to accept a licence on Hugging Face and download with your own access token. The download templates show where a token would go, but a token in a script is stored with your reservation. Read Keeping secrets out of scripts first; the safer option is to log in and download gated models yourself.

Templates change

We improve the templates from time to time. A reservation keeps the script text it was booked with, and your customised copies in My scripts are never changed by us.