Skip to main content
Spot capacity runs a job on GPUs that would otherwise sit idle, wherever they are in your organization. Use it when you need more than your dedicated capacity allows, or you don’t want to wait in the queue, for example to run extra experiments while your dedicated GPUs are busy.

Prerequisites

  • Spot capacity turned on for your organization. Contact us to request access.

How spot capacity is counted

Spot jobs must fit within your organization’s spot quota, counting dedicated and spot usage across every team. They also need available GPUs on an eligible cluster. Your team’s quota and the shared pool don’t apply. That has two effects:
  • A team at its quota with an empty pool doesn’t stop a spot job. The job runs on capacity that belongs to another team’s quota.
  • When your organization’s entire dedicated capacity is in use, spot jobs keep running in the band between the on-demand quota and the spot quota.
Available spot capacity is your spot quota minus everything running now, on-demand and spot. In the GPU capacity example, 3 of 8 L4 GPUs are in use, so spot can add 5 more. Spot reaches all 8 when nothing else is running, and 4 when the organization’s on-demand capacity is full.

Run a job on spot capacity

Baseten can reclaim spot capacity whenever it needs that capacity for dedicated work. A reclaimed job moves to the TRAINING_JOB_PREEMPTED state and doesn’t resume on its own, so save checkpoints as the job runs.
To run a job on spot capacity:
Pass --spot to baseten train push:
--spot overrides the config for that push, while availability_model applies to every push of that config. Without either, a job runs on dedicated capacity. The API sets the same value in compute.availability_model when it creates a job, and a PATCH request changes it only while the job is pending. To check which capacity a job runs on, describe it:
The Availability: line reads spot for spot jobs and standard for dedicated ones.

Move a queued job onto spot capacity

A job that waits in TRAINING_JOB_PENDING for dedicated capacity can move to spot capacity without resubmitting. You can change its capacity only while the job is pending. To move a pending job onto spot capacity:
Run the following command:
The command prints the job ID and the change, as in Set training job <job_id> availability model to spot.

When Baseten reclaims spot capacity

You can’t predict or control when Baseten reclaims spot capacity, or which of your spot jobs stops first, so treat every spot job as interruptible. To continue the work, start a new job that loads the latest checkpoint.

Next steps