Flash beta: Run Python functions on cloud GPUs
[Flash](/flash/overview) is now in public beta. Flash is a Python SDK that lets you run functions on Runpod Serverless GPUs with a single decorator:
```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
from runpod_flash import Endpoint, GpuType
@Endpoint(
name="hello-gpu",
gpu=GpuType.NVIDIA_GEFORCE_RTX_4090,
dependencies=["torch"]
)
async def hello(): # This function runs on Runpod
import torch
gpu_name = torch.cuda.get_device_name(0)
print(f"Hello from your GPU! ({gpu_name})")
return {"gpu": gpu_name}
asyncio.run(hello())
print("Done!") # This runs locally
```
**Key features:**
* **Remote execution**: Mark functions with `@Endpoint` to run on GPUs/CPUs automatically.
* **Auto-scaling**: Workers scale from 0 to N based on demand.
* **Dependency management**: Packages install automatically on remote workers.
* **Two patterns**: Queue-based endpoints for batch work, load-balanced endpoints for REST APIs
* **Flash apps**: Build production-ready APIs with `flash init`, `flash dev`, and `flash deploy`
**Get started:**
<CardGroup cols={2}>
<Card title="Overview" href="/flash/overview" icon="book">
Learn more about Flash.
</Card> …