Favicon of LitServe

LitServe

A Python framework for self-hosted AI inference APIs, with custom model pipelines, batching, streaming, and multi-GPU support.

Screenshot of LitServe website

LitServe is a Python framework for developers who need to serve AI models with their own request handling and inference logic. It runs locally or on a self-hosted server and suits applications that combine models, databases, or agent steps in one API.

  • Custom pipelines: Build APIs for agents, retrieval-augmented generation (RAG), and multimodal applications, with control over how models and data work together.
  • Model and engine support: Serve models built with PyTorch, JAX, or TensorFlow, or use vLLM for LLM inference; examples include Llama, BERT, and Whisper.
  • Batching and streaming: Process requests in batches, stream responses, and distribute work across multiple GPUs and workers.
  • API compatibility: Expose OpenAI-compatible endpoints for applications that use that API format, alongside custom inference APIs.

LitServe is open source under Apache 2.0 and supports self-managed Docker deployment. Lightning AI offers a separate managed hosting option.

You'll need to write Python inference code and supply the models or inference engine for your pipeline. For optimized LLM serving, you can integrate vLLM or LitGPT, or implement your own serving optimizations.

Similar to LitServe