Open Model Engine (OME)

repository·main·Indexed 19 days ago

https://github.com/ome-projects/ome

A Kubernetes operator for enterprise-grade management and serving of Large Language Models (LLMs). OME automates model management, runtime selection, and resource optimization. It includes features for Prefill-Decode (PD) disaggregation using RDMA/InfiniBand, a built-in registry of 165 models, and a Multi Node Prober for managing vLLM health probes within Ray Clusters.

Tokens
128.4K
Snippets
270
Records
471
Agent score
66%

What's inside OME

  1. What is Multi Node Prober?

    main

    Multi Node Prober is a Golang-based HTTP server designed to manage Kubernetes pod health probes for applications running vLLM within a Ray Cluster. It acts as a proxy that exposes standard Kubernetes probe endpoints by checking the health of the underlying vLLM service.

    It provides three primary endpoints:

    • /healthz (Liveness): Checks if vLLM and its services are running and responsive.
    • /readyz (Readiness): Ensures vLLM is ready to accept traffic (e.g., after model initialization).
    • /startupz (Startup): Verifies the vLLM has started correctly, specifically useful for containers with long startup durations.
  2. Overview of OME-Agent

    main
    OME-Agent is a Golang-based command-line tool designed for OME operators to manage model inference and training tasks. It acts as a 'Swiss Army Knife' for model management, providing consolidated operations for replication, encryption, and decryption.
  3. What is OME (Open Model Engine)?

    main
    OME (Open Model Engine) is a Kubernetes operator designed to simplify and optimize the deployment and management of machine learning models in production environments. It provides a comprehensive solution for model lifecycle management, runtime optimization, service deployment, and intelligent resource scheduling.
  4. Overview of OME features

    main

    OME provides enterprise-grade LLM management with the following core capabilities:

    • Model Management: Automated parsing of architecture and parameters. Supports distributed storage with encryption and multiple formats (SafeTensors, PyTorch, TensorRT, ONNX).
    • Intelligent Runtime Selection: Automatically matches models to optimal runtimes (like SGLang, vLLM, or Triton) based on weighted scoring of architecture, format, and quantization.
    • Optimized Deployments: Supports prefill-decode disaggregation, multi-node inference, and advanced scaling.
    • Resource Optimization: Specialized GPU bin-packing and hardware-aware scheduling via AcceleratorClass (supporting policies like BestFit, Cheapest, or MostCapable).
    • Kubernetes Integration: Works with Kueue (gang scheduling), LeaderWorkerSet (multi-node resilience), KEDA (autoscaling), and Gateway API (traffic routing and inference endpoints).
    • Automated Benchmarking: Uses BenchmarkJob to perform systematic performance comparisons.
  5. Goals and Non-Goals of Accelerator-Aware Runtime Selection

    main

    Goals

    • Reduce runtime proliferation: Use a single runtime definition across multiple GPU types.
    • Vendor-agnostic design: Support NVIDIA, AMD, Intel, and future accelerators without code changes.
    • Kueue integration: Work seamlessly with existing Kueue ResourceFlavor deployments.
    • Progressive disclosure: Provide simple interfaces for basic use cases and powerful ones for advanced scenarios.
    • Automatic optimization: Select the optimal GPU based on model requirements and availability.
    • Clear override hierarchy: Ensure predictable configuration precedence.

    Non-Goals

    • GPU virtualization: Does not address GPU sharing or MIG (Multi-Instance GPU) configuration.
    • Cost optimization: Does not implement cost models for scheduling (though it enables cost-aware scheduling).
    • Dynamic runtime generation: Does not automatically create new runtime configurations based on discovered GPUs.
    • Replacing existing APIs: This is an extension of current runtime selection mechanisms, not a replacement.
  6. What is a Base Model in OME?

    main
    A Base Model is a Kubernetes resource that acts as a blueprint for foundation AI models (e.g., Llama, Mistral). It defines where the model files are located, how they should be downloaded, and where they should be stored on cluster nodes. When a BaseModel resource is created, OME automatically handles downloading, parsing configuration, and distributing the model across the cluster for inference workloads.
  7. What is a FineTunedWeight and how does it work?

    main

    A FineTunedWeight is a cluster-scoped Kubernetes resource that represents weights fine-tuned from an existing Base Model. Instead of a standalone model, it contains only the artifacts and metadata specific to the fine-tuning process (e.g., a LoRA adapter or a distilled variant) and points back to a base model.

    Key characteristics:

    • Independence: You can manage multiple customizations of the same base model independently, each with its own storage, metadata, and lifecycle.
    • Composition: When an InferenceService references one or more FineTunedWeight resources, OME serves them on top of the referenced base model.
    • Scope: Being cluster-scoped, it is available to workloads in any namespace.
  8. What is Accelerator-Aware Runtime Selection?

    main

    Accelerator-Aware Runtime Selection is a feature in OME that allows for efficient model deployment in heterogeneous GPU environments. It introduces two primary abstractions:

    1. AcceleratorClass (Cluster-scoped): Defines specific accelerator capabilities (e.g., memory, compute capability) and discovery patterns (e.g., nodeSelector).
    2. ServingRuntime and InferenceService extensions: Allow users to specify accelerator requirements, preferences, and GPU-specific optimizations.

    This system enables the automatic matching of model requirements with the optimal available hardware, allowing platform engineers to define universal runtimes that automatically apply specific optimizations (like FP8 or speculative decoding) based on the detected GPU type.

  9. What is a BenchmarkJob

    main

    A BenchmarkJob is an OME resource used to automate performance benchmarking of inference services or OCI Generative AI Service endpoints. It leverages genai-bench to evaluate model serving performance under different traffic patterns and load conditions.

    A BenchmarkJob consists of four core components:

    1. Endpoint Configuration: The target service being tested.
    2. Traffic Patterns: The load testing scenarios (e.g., constant load, bursty load).
    3. Resource Configuration: The environment where the benchmark runs (pod resources, images).
    4. Output Management: Where the resulting benchmark data is stored.
  10. What is an InferenceService?

    main
    An InferenceService is the central Kubernetes resource in OME used to orchestrate the complete lifecycle of model serving. It acts as a declarative deployment blueprint that combines models (via BaseModel/ClusterBaseModel), runtimes (via ServingRuntime/ClusterServingRuntime), and infrastructure configuration to deploy, scale, and serve AI workloads across a cluster.
  11. What is a ClusterServingRuntime?

    main

    A ClusterServingRuntime is a cluster-scoped resource in OME that defines the templates for Pods used to serve one or more specific models. It acts as a reusable configuration that specifies the runtime environment, including the container image, supported model formats, and hardware requirements.

    By using ClusterServingRuntime (cluster-scoped) or its namespace-scoped counterpart, users can customize or define new runtimes without modifying the OME controller code. This allows for high flexibility in managing different serving engines like SGLang or VLLM across the cluster.

  12. Understand the MCP Support Design (OEP-0005)

    main

    OEP-0005 introduces support for the Model Context Protocol (MCP) within OME. The design centers around two primary Custom Resource Definitions (CRDs):

    1. MCPServer: Defines the tool server. It can represent a hosted server within the cluster or a RemoteMCPServer accessed via a URL.
    2. MCPRoute: Provides user-facing routing configuration, allowing users to define how tool requests are routed to specific backends.

    An internal Gateway (auto-managed by OME) handles the actual traffic, and these resources integrate with InferenceService to provide LLMs with access to tools.

    Current Implementation Status (v1alpha1):

    • Authentication: Remote servers are expected to handle their own authentication (Option A).
    • Status Fields: Minimal status is provided, including ready conditions and basic error messages.
    • Routing: Uses custom MCPRoute and MCPServer CRDs rather than the Kubernetes Gateway API to validate specific MCP patterns like tool-based routing and permission profiles.
    • Discovery: Limited to single-cluster discovery.
    • Security: HTTPS is required for all remote servers.
    • Failover: The system currently follows a "fail-fast" approach (returning 503 if backends are unhealthy).