GPU selection & VRAM
How to request hardware — the gpus="MODEL:COUNT" string, the curated GPU catalog, minimum-VRAM filtering, multi-GPU, and per-provider name mapping.
gpu-train requests hardware with a single string: gpus="MODEL:COUNT" (or
"cpu"). This page is the reference for what you can put there, how VRAM
filtering works, and how friendly names map onto each provider.
The gpus string
gpus="A100:4" # GPU model A100, 4 of them on one box
gpus="H100:8" # 8x H100 on one box
gpus="RTX4090:1" # a single RTX 4090
gpus="cpu" # no GPU — local subprocess / CPU fallbackFormat is MODEL:COUNT. Omit the count (gpus="A100") and it defaults to 1.
MODEL is matched against the curated catalog first, then passed to the
provider's own name mapping.
The curated catalog
Rather than hit a slow, credential-gated marketplace query for a dropdown,
gpu-train ships a hand-maintained list of training GPUs with typical VRAM and
where to find them. Read it from the SDK or the HTTP API:
import gpu_train
gpu_train.list_gpus() # the whole catalog (list[GpuModel])
gpu_train.list_gpus("vastai") # narrowed to one provider
gpu_train.list_gpus("local") # [] — local is CPU-only
gpu_train.vram_for("A100") # -> 80
gpu_train.find("rtx4090") # GpuModel(name="RTX4090", vram_gb=24, ...)curl "http://127.0.0.1:8780/v1/gpus?provider=runpod"Each entry is a GpuModel with name, label, vram_gb, providers, and
notes. The dashboard's + New run dialog renders these as provider-aware
preset cards (model + VRAM); selecting one fills the gpus field.
| Model | VRAM | Common providers |
|---|---|---|
H200 | 141 GB | Vast.ai, RunPod |
H100 | 80 GB | Vast.ai, RunPod, GCP |
A100 | 80 GB | Vast.ai, RunPod, GCP, Colab |
A100-PCIe | 40 GB | Vast.ai, GCP |
L40S | 48 GB | Vast.ai, RunPod |
L40 | 48 GB | Vast.ai, RunPod |
A6000 | 48 GB | Vast.ai, RunPod |
A40 | 48 GB | Vast.ai, RunPod |
RTX5090 | 32 GB | Vast.ai |
RTX4090 | 24 GB | Vast.ai, RunPod |
RTX3090 | 24 GB | Vast.ai |
L4 | 24 GB | GCP, Vast.ai |
A10 | 24 GB | Vast.ai, RunPod |
A4000 | 16 GB | Vast.ai |
V100 | 16 GB | GCP, Colab |
T4 | 16 GB | GCP, Colab |
providers is a best-effort availability hint, and the catalog isn't
exhaustive. You can type any token into gpus — if it isn't in the catalog
it's still mapped to the provider's identifiers (or passed through unchanged).
Multiple GPUs on one box
The :COUNT suffix requests that many GPUs on a single instance. The runtime
launches DDP across them automatically — torchrun --nproc_per_node=COUNT:
run(task={"entrypoint": "train.py"}, provider="runpod", gpus="A100:8")This rents one 8-GPU box. Provisioning asks the provider for that GPU count
(Vast.ai num_gpus, RunPod gpuCount); if no single box with that many cards is
available under your price_cap, you get a clear ProvisionError.
gpus="A100:8" is eight GPUs on one machine. To span multiple machines
(e.g. 2 nodes × 8 GPUs) use nodes=2, which only works on multi-node providers
(RunPod, GCP). Vast.ai and Colab are single-node. See
Distributed training.
Filtering by minimum VRAM
Often you care about "any card with at least N GB", not a specific model. Set
min_vram_gb on the run; it's a real provisioning constraint, not just a label:
run(
task={"entrypoint": "train.py"},
provider="vastai",
gpus="A100:2",
min_vram_gb=80, # only offers with ≥80GB per GPU
)On Vast.ai this is pushed into the marketplace search as a gpu_ram ≥ 80×1024 MiB filter, so you don't accidentally rent a 40GB variant. The field is
part of the spec everywhere — SDK run(), POST /jobs, and the dashboard's
launch dialog.
Other spawn settings
| Field | Meaning |
|---|---|
gpus | "MODEL:COUNT" or "cpu". |
min_vram_gb | Minimum per-GPU VRAM (GiB); filters marketplace offers. |
disk_gb | Scratch disk on the box (provider default if unset). |
region | Provider-specific region hint. |
price_cap | Refuse to provision above this $/hr. |
nodes | Number of separate machines (multi-node providers only). |
Per-provider name mapping
The same friendly name resolves to each provider's own identifier:
Friendly gpus | Vast.ai (gpu_name) | RunPod (GPU type id) | GCP (accelerator) |
|---|---|---|---|
A100 | A100 SXM4 | NVIDIA A100 80GB PCIe | nvidia-tesla-a100 |
H100 | H100 SXM | NVIDIA H100 80GB HBM3 | — |
RTX4090 | RTX 4090 | NVIDIA GeForce RTX 4090 | — |
A10 | A10 | A10¹ | — |
L4 | L4 | — | (L4 accelerator) |
T4 | T4 | — | nvidia-tesla-t4 |
¹ RunPod has no dedicated alias for some cards yet, so the token is passed through as-is. If a card doesn't provision on RunPod, try the exact RunPod GPU name. Unknown names everywhere fall back to a sensible transform (e.g. Vast.ai turns underscores into spaces).
See also
- End-to-end setup — the full run walkthrough.
- Providers — connecting each backend.
- Distributed training — DDP & multi-node.