ServerlessLLM is a free, open source machine learning infrastructure project written in Python and released under Apache-2.0. It has 715 GitHub stars, 76 forks and 45 open issues, and was last pushed 14 days ago. On this registry it ranks #52 of 57 tracked projects in Machine Learning Infrastructure, with 5 head-to-head comparisons available.

What is ServerlessLLM?

ServerlessLLM is an Apache-2.0, Python-based system for running many large language models on shared GPUs, aimed at teams that want serverless-style multi-model serving without provisioning a separate GPU for every model.

What it is

ServerlessLLM is an open-source LLM serving stack built around a custom checkpoint format and a storage-aware scheduler. It lives in the PyTorch and HuggingFace Transformers ecosystem, shares GPUs across models, and exposes an OpenAI-compatible HTTP API. The project ships as two pieces: a cluster (head node plus GPU worker) and ServerlessLLM Store, a standalone fast loader usable inside existing Python code. It was published at OSDI'24 and is developed under the ServerlessLLM organisation.

The concrete problem it solves is checkpoint load latency. Standard loaders, including the SafeTensors checkpoint loader, are slow enough that a model must stay resident once loaded, which forces one GPU per model. ServerlessLLM replaces that loader with a custom binary format optimised for sequential reads, O_DIRECT I/O that bypasses the OS page cache, a pinned memory pool for DMA-accelerated GPU transfers, and parallel multi-threaded loading. Reported results on NVIDIA H100 with NVMe SSD show Qwen/Qwen3-32B loading in 3.2s versus 20.6s, and Llama-3.1-8B-Instruct in 0.7s versus 4.4s. Faster loading is what makes scale-to-zero and rapid model switching practical.

Key capabilities

  • Ultra-fast checkpoint loading with the custom binary format and O_DIRECT I/O, reported at 6-10x faster than the SafeTensors loader.
  • ServerlessLLM Store as a standalone package, pip install serverless-llm-store, with sllm-store save to convert a model and sllm-store start --storage-path ~/models --mem-pool-size 4GB to run the store server.
  • Python API via from sllm_store.transformers import load_model, which returns a normal PyTorch/Transformers model callable with model.generate.
  • GPU multiplexing: run 10 or more models on one GPU with fast switching, storage-aware scheduling, and auto-scaling per model down to zero when idle.
  • Live migration for zero-downtime resource optimisation during deployment.
  • Unified inference and fine-tuning: serve a base model alongside hundreds of LoRA adapters, with serverless LoRA fine-tuning and on-demand adapter deployment.
  • OpenAI-compatible endpoint at http://127.0.0.1:8343/v1/chat/completions, plus support for NVIDIA and AMD GPUs (a separate ROCm guide), vLLM, Transformers, and custom models.

Who uses it and how

  • Teams serving many models behind one interface, where the README's "Random" scenario simulates serverless multi-model serving across a shared GPU pool.
  • Deployments that must scale idle models to zero to cut GPU cost, using per-model auto-scaling and live migration instead of fixed allocations.
  • Fine-tuning workflows that mix a base model with hundreds of LoRA adapters on the same hardware, deploying adapters for inference on demand.
  • Existing PyTorch users who only want the loader, running sllm-store start and switching from_pretrained to load_model with no cluster involved.
  • Cluster operators running the head node plus a GPU worker described in the compose example, with models held on a local MODEL_FOLDER.

Getting started

The quick start downloads examples/docker/docker-compose.yml, sets MODEL_FOLDER, runs docker compose up -d, then deploys with sllm deploy --model Qwen/Qwen3-0.6B --backend transformers. For a Docker-free path, install serverless-llm-store and use the Python loader directly.

How it compares

Against SafeTensors, whose loader it benchmarks against and replaces, ServerlessLLM trades a converted on-disk format for materially faster cold loads. It sits alongside vLLM and Transformers rather than excluding them, working with both as backends while adding storage-aware scheduling and multiplexing. Where it differs from a plain inference server is the assumption that models will be loaded and evicted repeatedly, not pinned permanently.

When to use it — and when not to

Self-hosting the full cluster means operating Docker, a head node, at least one GPU worker, and local model storage; the published benchmarks also assume NVMe SSD and H100-class hardware, so results on slower disks will be smaller. Anyone serving a single model continuously on a dedicated GPU gains little, since the scheduling and load-eviction machinery adds components without removing a bottleneck. Be aware that the project carries 45 open issues, and its store path works best when models are pre-converted with sllm-store save.

project readme (upstream, from github) — read inline

ServerlessLLM

Load models 10x faster. Serve 10 models with 1 GPU.

PyPI Downloads Discord WeChat License

DocsQuick StartOSDI'24 Paper


⚡ Performance

ServerlessLLM loads models 6-10x faster than SafeTensors, enabling true serverless deployment where multiple models efficiently share GPU resources.

Model Scenario SafeTensors ServerlessLLM Speedup
Qwen/Qwen3-32B Random 20.6s 3.2s 6.40x
Cached 12.5s 1.3s 9.95x
DeepSeek-R1-Distill-Qwen-32B Random 19.1s 3.2s 5.93x
Cached 10.2s 1.2s 8.58x
Llama-3.1-8B-Instruct Random 4.4s 0.7s 6.54x

Results obtained on NVIDIA H100 GPUs with NVMe SSD. "Random" simulates serverless multi-model serving; "Cached" shows repeated loading of the same model.

What is ServerlessLLM?

ServerlessLLM is a fast, low-cost system for deploying multiple AI models on shared GPUs, with three core innovations:

  1. ⚡ Ultra-Fast Checkpoint Loading: Custom storage format with O_DIRECT I/O loads models 6-10x faster than state-of-the-art checkpoint loaders
  2. 🔄 GPU Multiplexing: Multiple models share GPUs with fast switching and intelligent scheduling
  3. 🎯 Unified Inference + Fine-Tuning: Seamlessly integrates LLM serving with LoRA fine-tuning on shared resources

Result: Serve 10 models on 1 GPU, fine-tune on-demand, and serve a base model + 100s of LoRA adapters.


🚀 Quick Start (90 Seconds)

Start ServerlessLLM Cluster

Don't have Docker? Jump to Use the Fast Loader in Your Code for a Docker-free example.

# Download the docker-compose.yml file
curl -O https://raw.githubusercontent.com/ServerlessLLM/ServerlessLLM/main/examples/docker/docker-compose.yml

# Set model storage location
export MODEL_FOLDER=/path/to/models

# Launch cluster (head node + worker with GPU)
docker compose up -d

# Wait for the cluster to be ready
docker logs -f sllm_head

Deploy a Model

docker exec sllm_head /opt/conda/envs/head/bin/sllm deploy --model Qwen/Qwen3-0.6B --backend transformers

Query the Model

curl http://127.0.0.1:8343/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "Qwen/Qwen3-0.6B",
    "messages": [{"role": "user", "content": "What is ServerlessLLM?"}],
    "temperature": 0.7
  }'

That's it! Your model is now serving requests with an OpenAI-compatible API.


💡 Use the Fast Loader in Your Code

Use ServerlessLLM Store standalone to speed up torch-based model loading.

Install

pip install serverless-llm-store

Convert a Model

sllm-store save --model Qwen/Qwen3-0.6B --backend transformers

Start the Store Server

# Start the store server first
sllm-store start --storage-path ~/models --mem-pool-size 4GB

Load it 6-10x Faster in Your Python Code

from sllm_store.transformers import load_model

# Load model (6-10x faster than from_pretrained!)
model = load_model(
    "Qwen/Qwen3-0.6B",
    device_map="auto",
    torch_dtype="float16"
)

# Use as a normal PyTorch/Transformers model
output = model.generate(**inputs)

How it works:

  • Custom binary format optimized for sequential reads
  • O_DIRECT I/O bypassing OS page cache
  • Pinned memory pool for DMA-accelerated GPU transfers
  • Parallel multi-threaded loading

🎯 Key Features

⚡ Ultra-Fast Model Loading

  • 6-10x faster than the SafeTensors checkpoint loader
  • Supports both NVIDIA and AMD GPUs
  • Works with vLLM, Transformers, and custom models

📖 Docs: Fast Loading Guide | ROCm Guide


🔄 GPU Multiplexing

  • Run 10+ models on 1 GPU with fast switching
  • Storage-aware scheduling minimizes loading time
  • Auto-scale instances per model (scale to zero when idle)
  • Live migration for zero-downtime resource optimization

📖 Docs: Deployment Guide


🎯 Unified Inference + LoRA Fine-Tuning

  • Integrates LLM serving with serverless LoRA fine-tuning
  • Deploys fine-tuned adapters for inference on-demand
  • Serves a base model + 100s of LoRA adapters efficiently

📖 Docs: Fine-Tuning Guide


🔍 Embedding Models for RAG

  • Deploy embedding models alongside LLMs
  • Provides an OpenAI-compatible /v1/embeddings endpoint

💡 Example: RAG Example


🚀 Production-Ready

  • OpenAI-compatible API (drop-in replacement)
  • Docker and Kubernetes deployment
  • Multi-node clusters with distributed scheduling

📖 Docs: Deployment Guide | API Reference


💻 Supported Hardware

  • NVIDIA GPUs: Compute capability 7.0+ (V100, A100, H100, RTX 3060+)
  • AMD GPUs: ROCm 6.2+ (MI100, MI200 series) - Experimental

More Examples: ./examples/


🤝 Community

Maintained by 10+ contributors worldwide. Community contributions are welcome!


📄 Citation

If you use ServerlessLLM in your research, please cite our OSDI'24 paper:

@inproceedings{fu2024serverlessllm,
  title={ServerlessLLM: Low-Latency Serverless Inference for Large Language Models},
  author={Fu, Yao and Xue, Leyang and Huang, Yeqi and Brabete, Andrei-Octavian and Ustiugov, Dmitrii and Patel, Yuvraj and Mai, Luo},
  booktitle={OSDI'24},
  year={2024}
}

📝 License

Apache 2.0 - See LICENSE


⭐ Star this repo if ServerlessLLM helps you!

Frequently asked questions

Is ServerlessLLM free to use?

ServerlessLLM is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does ServerlessLLM do?

Serverless LLM Serving for Everyone.

What is ServerlessLLM written in?

ServerlessLLM is primarily written in Python. Its source is publicly available at https://github.com/ServerlessLLM/ServerlessLLM, and it has 715 GitHub stars.