Serve embedding models for your RAG stack
Host embedding and reranking models on your own autoscaling endpoints instead of per-token third-party APIs. Beam runs the GPUs; your RAG pipeline just calls HTTPS.
Your retrieval stack, your terms
Embeddings, rerankers, and the LLM itself — each piece deployed and scaled independently, all from Python.
Stand up retrieval in three steps
Wrap your embedding model
A few lines turn any sentence-transformers model into an endpoint definition with a GPU attached.
Deploy it
beam deploy gives you an authenticated HTTPS URL that autoscales with query volume.
Point your pipeline at it
Call it for query-time embeddings, and use .map() to backfill your corpus in parallel.
$ beam deploy app.py:embed
=> Deployed 🎉
=> https://embeddings-abc123.app.beam.cloud
# Backfill your corpus in parallel
from beam import function
@function(gpu="T4")
def embed_chunk(chunk: list):
return model.encode(chunk).tolist()
for vectors in embed_chunk.map(chunks):
index.upsert(vectors)Frequently asked questions
Which embedding models work?
Any model sentence-transformers or transformers can load — BGE, GTE, E5, and your own fine-tuned variants included.
Do I need a specific vector database?
No. Beam serves the compute; your endpoint returns vectors and you store them anywhere — Postgres with pgvector, Pinecone, Qdrant, or your own index.
How do I keep query latency low?
Models load once per container with on_start, and keep_warm_seconds keeps containers hot so query-time embeddings skip the cold path entirely.
Can I host the LLM side of RAG too?
Yes. Run an OpenAI-compatible vLLM server on Beam next to your embedding endpoint, so the whole stack lives on one platform.
Can I serve a fine-tuned embedding model?
Yes — load weights from a persistent volume or the Hugging Face Hub exactly like any other model. Fine-tune it on Beam too, if you like.
Related use cases
Deploy open-source LLMs
Serve open-source LLMs behind an autoscaling, OpenAI-compatible API.
Training & Fine-tuningFine-tune models on GPUs
LoRA and QLoRA fine-tuning on serverless GPUs.
SandboxesGive your AI agents a safe place to run code
Isolated sandboxes for agent-generated code, booting in seconds.
Start shipping on infra
you won’t outgrow.
Run sandboxes and GPU workloads on your cloud, and scale out to ours when you need to. No infra to manage.