Chapter 1. Deploying models by using Distributed Inference with llm-d


Distributed Inference with llm-d is a Kubernetes-native, open-source framework designed for serving large language models (LLMs) at scale. You can use Distributed Inference with llm-d to simplify the deployment of generative AI, focusing on high performance and cost-effectiveness across various hardware accelerators.

Key features of Distributed Inference with llm-d include:

  • Efficiently handles large models using optimizations such as prefix-cache aware routing and disaggregated serving.
  • Integrates into a standard Kubernetes environment, where it leverages specialized components like the Envoy proxy to handle networking and routing, and high-performance libraries such as vLLM and NVIDIA Inference Transfer Library (NIXL).
  • Tested recipes and well-known presets reduce the complexity of deploying inference at scale, so users can focus on building applications rather than managing infrastructure.

1.1. Enabling Distributed Inference with llm-d

This procedure describes how to create a custom resource (CR) for an LLMInferenceService resource. You replace the default InferenceService with the LLMInferenceService.

Prerequisites

  • You have enabled the model serving platform.
  • You have access to an OpenShift cluster running version 4.19.9 or later.
  • OpenShift Service Mesh v2 is not installed in the cluster.
  • Verify that you have a GatewayClass and a Gateway named openshift-ai-inference in the openshift-ingress namespace as described in Gateway API with OpenShift Container Platform networking.

    Important

    Review the Gateway API deployment topologies. Only use shared Gateways across trusted namespaces.

  • If you are running OpenShift on a bare-metal cluster, your cluster administrator has an external entry point for the openshift-ai-inference Gateway service.

    Note

    By default, the Inference Gateway uses type: LoadBalancer. If the cluster does not already include support for LoadBalancer services, you can use the OpenShift option described in Load balancing with MetalLB.

  • Optional: Your cluster administrator has installed the LeaderWorkerSet Operator in OpenShift. This is an optional dependency because it is only a requirement for inference deployments where a single server has any from of parallelism (tensor, pipeline, data) that is more than 8 accelerators and so is classified as multi-node. For more information, see the Leader Worker Set Operator documentation.
  • You have enabled authentication as described in Configuring authentication for Distributed Inference with llm-d.

Procedure

  1. Log in to the OpenShift console as a developer.
  2. Create the LLMInferenceService CR with the following information:

    apiVersion: serving.kserve.io/v1alpha1
    kind: LLMInferenceService
    metadata:
      name: sample-llm-inference-service
    spec:
      replicas: 2
      model:
        uri: hf://RedHatAI/Qwen3-8B-FP8-dynamic
        name: RedHatAI/Qwen3-8B-FP8-dynamic
      router:
        route: {}
        gateway: {}
        scheduler: {}
        template:
          containers:
          - name: main
            resources:
              limits:
                cpu: '4'
                memory: 32Gi
                nvidia.com/gpu: "1"
              requests:
                cpu: '2'
                memory: 16Gi
                nvidia.com/gpu: "1"

    Customize the following parameters in the spec section of the inference service:

    • replicas - Specify the number of replicas.
    • model - Specify the URI to the model based on how the model is stored (uri) and the model name to use in chat completion requests (name).

      • S3 bucket: s3://<bucket-name>/<object-key>
      • Persistent volume claim (PVC): pvc://<claim-name>/<pvc-path>
      • OCI container image: oci://<registry_host>/<org_or_username>/<repository_name><tag_or_digest>
      • HuggingFace: hf://<model>/<optional-hash>
    • router - Provide an HTTPRoute and gateway, or leave blank to automatically create one.
  3. Save the file.
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat Documentation

Legal Notice

Theme

© 2026 Red Hat
Back to top