beta9 README

The project's README from github.com/beam-cloud/beta9. As one markdown file: README.md.

Logo Logo

Run AI Workloads at Scale

Colab ⭐ Star the Repo Documentation Join Slack Twitter AGPL

Beam is a fast, open-source runtime for serverless AI workloads. It gives you a Pythonic interface to deploy and scale AI applications with zero infrastructure overhead.

Watch the demo

✨ Features

📦 Installation

pip install beam-client

⚡️ Quickstart

  1. Create an account here
  2. Follow our Getting Started Guide

Creating a sandbox

Spin up isolated containers to run LLM-generated code:

from beam import Image, Sandbox


sandbox = Sandbox(image=Image()).create()
response = sandbox.process.run_code("print('I am running remotely')")

print(response.result)

Deploy a serverless inference endpoint

Create an autoscaling endpoint for your custom model:

from beam import Image, endpoint
from beam import QueueDepthAutoscaler

@endpoint(
    image=Image(python_version="python3.11"),
    gpu="A10G",
    cpu=2,
    memory="16Gi",
    autoscaler=QueueDepthAutoscaler(max_containers=5, tasks_per_container=30)
)
def handler():
    return {"label": "cat", "confidence": 0.97}

Run background tasks

Schedule resilient background tasks (or replace your Celery queue) by adding a simple decorator:

from beam import Image, TaskPolicy, schema, task_queue


class Input(schema.Schema):
    image_url = schema.String()


@task_queue(
    name="image-processor",
    image=Image(python_version="python3.11"),
    cpu=1,
    memory=1024,
    inputs=Input,
    task_policy=TaskPolicy(max_retries=3),
)
def my_background_task(input: Input, *, context):
    image_url = input.image_url
    print(f"Processing image: {image_url}")
    return {"image_url": image_url}


if __name__ == "__main__":
    # Invoke a background task from your app (without deploying it)
    my_background_task.put(image_url="https://example.com/image.jpg")

    # You can also deploy this behind a versioned endpoint with:
    # beam deploy app.py:my_background_task --name image-processor

Self-Hosting vs Cloud

Beta9 is the open-source engine powering Beam, our fully-managed cloud platform. You can self-host Beta9 for free or choose managed cloud hosting through Beam.

👋 Contributing

We welcome contributions big or small. These are the most helpful things for us:

❤️ Thanks to Our Contributors

beta9 (beam-cloud/beta9)

paas
Searching Database…

1.8K ·GitHub
What is this?An open-source runtime for serverless AI workloads — it runs Python code in autoscaling GPU containers that scale to zero. It's also the engine powering Beam, a fully managed cloud.
Is this a cloud service, or do I run it myself?Either. Beta9 is the open-source engine you can self-host for free; Beam is the fully managed cloud built on top of it if you'd rather not run the infrastructure yourself.
What's the quickest way to get something running?Fastest route is the managed cloud: create an account, then follow the Getting Started guide. To run the engine yourself, self-host Beta9 via the Installation section of the repo.
Do I write Python to use it, or do I need to know Go?You write Python: decorated Python functions get deployed and scaled as containers. Go is just the language the engine itself is written in.
Is the self-hosted route really free — what's the catch?Self-hosting is free, but the license is AGPL-3.0: modify Beta9 and offer it as a service, and you must release your source. Managed hosting through Beam is the no-ops alternative.
Which GPUs can I run my workloads on?On Beam's managed cloud you can run on 4090s, H100s and more; you can also bring your own GPUs.
What can I actually build on it?Three main workload types: autoscaling inference endpoints for custom models, isolated sandboxes for running LLM-generated code, and scheduled background tasks — the README pitches it as a Celery queue replacement.
How fast do containers start, and how far can workloads scale?Containers launch in under a second thanks to a custom container runtime, scheduler and embedded caching. Workloads fan out to hundreds of containers in parallel and scale to zero when idle.
What comes built in for day-to-day development?Hot-reloading, webhooks and scheduled jobs are first-class features, and you can mount distributed storage volumes for persistent or shared state across containers.
Creator
beam-cloud
Size
35.5 MB
Stars
1.8K
Age
2y
Commits · 90 Days