Adding a GPU to a function

Beam offers a fast way to spin up GPU runtimes for development.

You can add a GPU to your runtime by passing a gpu argument to your function decorator. Currently, available GPU options are A10G (24GB), T4 (16GB), or A100-80 (80GB).

Due to ongoing capacity limitations, certain machines may not be available on-demand.

from beam import endpoint


@endpoint(gpu="A100-80")
def handler():
    print("📡 This is running on a GPU!")
    return {}