Serving#

AI model serving can be divided into two main components: the Serving Engine (the core execution unit) and the Serving Stack (the orchestration and management layer).

Serving Engine#

The serving engine focuses on maximizing accelerator utilization (GPU/TPU) within a single Pod or VM instance. It is responsible for the actual execution of the model and manages low-level inference logic.

vLLM#

vLLM is a high-throughput and memory-efficient serving engine for LLMs.

  • Role: Core inference executor for Large Language Models.
  • Key Features:
    • PagedAttention: Optimizes KV cache memory management to reduce fragmentation.
    • Continuous Batching: Increases throughput by batching requests at the iteration level.
    • Speculative Decoding: Speeds up inference using smaller drafter models.

Serving Stack#

The serving stack focuses on routing, scaling, and multi-instance orchestration. It provides the infrastructure layer to deploy and manage models across a cluster, often wrapping a serving engine to provide APIs.

KServe#

KServe is a Kubernetes-native model serving platform.

  • Role: Standardized orchestration layer for scalable AI deployments.
  • Key Features:
    • Serverless Scaling: Built on Knative for scale-to-zero capability.
    • Canary Rollouts: Facilitates safe model updates with traffic splitting.
    • Protocol Standardization: Supports V1/V2 inference protocols.

Ray Serve#

Ray Serve is a scalable model serving library built on top of Ray.

  • Role: Flexible, Python-first serving layer for complex inference pipelines.
  • Key Features:
    • Composition: Easily chain multiple models (e.g., preprocessing -> model -> postprocessing).
    • Resource Management: Fine-grained control over GPU/CPU allocation per replica.
    • Dynamic Scaling: Native scaling within a Ray cluster.

NVIDIA Triton Inference Server#

Triton is an open-source inference serving software.

  • Role: Universal serving stack supporting multiple frameworks and hardware.
  • Key Features:
    • Multi-Framework: Supports TensorRT, PyTorch, ONNX, TensorFlow, and more.
    • Model Ensembling: Orchestrates complex pipelines across different frameworks.
    • Concurrent Model Execution: Runs multiple models on a single GPU to maximize utility.

llm-d#

llm-d is a lightweight daemon/wrapper for LLM deployment.

  • Role: Simplifies the deployment of LLMs with a focus on ease of use and portability.
  • Key Features:
    • Simplified API: Provides a consistent interface for various LLM backends.
    • Container-Friendly: Designed for quick integration into containerized environments.