Persistent VMs are now available.Learn more

Run GPU training jobs on-demand

Start a training run on cloud GPUs with a decorator and a function call. Beam provisions containers, streams logs to your shell, and stops billing the second the job ends.

Cloud GPU training that feels local

Keep your training loop as it is, and Beam runs the compute.


Start training in three steps

  1. Decorate your function

    Add @function with the GPU, CPU, memory, and image you need. Your code stays plain Python.

  2. Run the file

    Calling .remote() ships your working directory to a fresh container and streams logs back to your terminal.

  3. Serve what you trained

    Checkpoints written to a volume persist after the container exits. Deploy an endpoint that mounts the same volume and your model is serving traffic, without exporting artifacts or moving to a second platform.

terminal
$ python train.py

=> Building image
=> Syncing files
=> Running function: <train:train>
epoch 0: loss=2.113
epoch 1: loss=1.874
...
=> Function complete

# Checkpoints persist after the run
$ beam ls checkpoints
epoch-0.pt
epoch-1.pt

Frequently asked questions

How long can a training job run?

As long as you need. Timeouts are configurable in seconds, and setting timeout=-1 disables them entirely for multi-day runs.

Can jobs keep running after I close my laptop?

Yes. Set headless=True on the function and the task keeps running in the background on Beam after your local process exits.

Where do datasets and checkpoints live?

On persistent storage volumes mounted into the container. They survive across runs and are readable from any other Beam function or endpoint.

Do I pay for provisioning time?

No. Beam only charges for the time your application code is running, never for server spin-up or container image pulls.

Can I run many experiments at once?

Yes. Use .map() to fan a training function out over a list of configs, and each run gets its own container and GPU.

How do I serve the model once training finishes?

Deploy an endpoint that mounts the same volume your checkpoints were written to. Training and serving run on one platform, with no artifact export step in between. The fine-tuning guide walks through the full loop.

Does it work with Weights & Biases and Hugging Face?

Yes. Add wandb or huggingface_hub to your image, store API keys with Beam's secrets manager, and log runs as usual. Beam's fine-tuning examples track training in W&B.

Can I train on multiple GPUs?

Yes. The gpu_count parameter runs your job across multiple GPUs on the same machine. Message us in Slack and we'll enable it on your account.

Pay as you go
billed by the second

Give your agents their own machines

Sign up, install the CLI, and launch a sandbox, VM, or GPU from your terminal or your coding agent.