Templates
The ready-made startup scripts for Mac Studio (MLX) and DGX Spark (CUDA), what each one does, 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.
Like every startup script, a template runs once as renter, without admin rights, and writes its output to ~/startup.log. How startup scripts run explains the limits.
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:
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:
~/.venvs/mlx/bin/mlx_lm.server --model Qwen/Qwen3-8B --port 8080Change 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 (about 16 GB) into ~/.cache/huggingface, so it's ready to serve when you log in. The download runs directly on the machine, as you: no container and no GPU are used, and no server is started or port opened. If the Hugging Face hf CLI isn't already there, the template installs it into ~/.local/bin in your home folder, without admin rights.
When it's done, it prints the command that serves the model with vLLM on port 8000 from the warm cache. docker on the machine runs rootless Podman as you, so the container never has admin rights:
docker run -d --name model-serve --shm-size=16g -p 8000:8000 \
--device nvidia.com/gpu=all \
-v ~/.cache/huggingface:/root/.cache/huggingface \
docker.io/vllm/vllm-openai:latest \
Qwen/Qwen3-8B --gpu-memory-utilization 0.85 --max-num-seqs 4Two flags matter: the GPU shares one memory pool with the CPU and the operating system, so keep --gpu-memory-utilization around 0.85 rather than close to 1.0, and --max-num-seqs 4 keeps the number of parallel requests small. Reach the server from your computer through SSH port forwarding; DGX Spark environment shows how.
Change the MODEL= line to download another model. Smaller variants such as Qwen/Qwen3-4B download faster; a much larger model may not finish within the one-hour limit.
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.