From 3ad27d5fef941fdcaa5cb079d70d2f1eda9251ef Mon Sep 17 00:00:00 2001 From: Ben Date: Sun, 8 Nov 2026 19:52:27 +0000 Subject: [PATCH 01/15] docs(patterns): add vLLM Ray Inference Server sandbox pattern Add an overview page and a getting-started page for the rhvp-vllm-ray-inference-server sandbox pattern, plus its architecture diagram. --- .../_index.adoc | 101 +++++++++ .../getting-started.adoc | 206 ++++++++++++++++++ .../architecture.svg | 1 + 3 files changed, 308 insertions(+) create mode 100644 content/patterns/rhvp-vllm-ray-inference-server/_index.adoc create mode 100644 content/patterns/rhvp-vllm-ray-inference-server/getting-started.adoc create mode 100644 static/images/rhvp-vllm-ray-inference-server/architecture.svg diff --git a/content/patterns/rhvp-vllm-ray-inference-server/_index.adoc b/content/patterns/rhvp-vllm-ray-inference-server/_index.adoc new file mode 100644 index 000000000..6059f0c8d --- /dev/null +++ b/content/patterns/rhvp-vllm-ray-inference-server/_index.adoc @@ -0,0 +1,101 @@ +--- +# The directory name, the aliases, and the GitHub links in this page set use the +# current repository name, rhvp-vllm-ray-inference-server. That name can change, +# pending two open questions to the Validated Patterns team: whether the "rhvp-" +# prefix is acceptable under the Red Hat trademark guidelines, and whether the +# repository moves to the validatedpatterns-sandbox organization. If either +# changes, rename the directory, the aliases, the image folder, and every link +# in both pages together. +title: vLLM Ray Inference Server +date: 2026-11-08 +validated: false +tier: sandbox +summary: This pattern deploys an OpenAI-compatible large language model (LLM) server that runs vLLM on Ray Serve with one GPU, built inside the cluster from upstream packages and managed by OpenShift GitOps. +rh_products: + - Red Hat OpenShift Container Platform + - Red Hat OpenShift GitOps +# partners: left out on purpose. The pattern deploys software from NVIDIA (the +# GPU Operator and the CUDA base image) and from the Ray and vLLM projects, but +# no partner organization takes part in the pattern. A partners entry suggests a +# partnership, and the site prints a partner trademark notice for it. Add an +# entry only when a partner organization joins the pattern. +industries: + - General +focus_areas: + - AI +aliases: /rhvp-vllm-ray-inference-server/ +links: + github: https://github.com/eugo-inc/rhvp-vllm-ray-inference-server + install: getting-started + arch: /images/rhvp-vllm-ray-inference-server/architecture.svg + bugs: https://github.com/eugo-inc/rhvp-vllm-ray-inference-server/issues + feedback: https://docs.google.com/forms/d/e/1FAIpQLScI76b6tD1WyPu2-d_9CCVDr3Fu5jYERthqLKJDUGwqBg7Vcg/viewform +--- +:toc: +:imagesdir: /images +:_content-type: ASSEMBLY +include::modules/comm-attributes.adoc[] +:vllm-ray-pattern: vLLM Ray Inference Server pattern + +// The pattern name can change. See the comment at the top of the front matter. + +[id="about-vllm-ray-inference-server-pattern"] += About the {vllm-ray-pattern} + +The {vllm-ray-pattern} deploys a private, OpenAI-compatible large language model (LLM) endpoint on {rh-ocp}. {rh-gitops} deploys every component from your fork of the pattern repository, and the cluster builds the server image itself from upstream packages. Eugo maintains the pattern as community content in the {sandbox-tier-first}. + +[WARNING] +==== +On {AWS}, the default installation creates one billable GPU instance: a `g6.2xlarge` instance with one NVIDIA L4 GPU. AWS bills the instance for as long as it runs. To skip the instance, set `global.gpuMachineSet: none` in the `values-global.yaml` file in your fork, and push the change before you install the pattern. On other platforms, the pattern creates no instance. Uninstalling the pattern does not delete the instance. For the steps to delete it, see link:getting-started/#uninstalling-the-vllm-ray-pattern[Uninstalling the pattern]. +==== + +[id="background-vllm-ray"] +== Background + +A team that wants a private, OpenAI-compatible LLM endpoint on its own {ocp} cluster usually assembles the parts by hand: GPU enablement, a serving runtime, a model cache, a secret for gated models, and a way to rebuild the server image when the software stack changes. This pattern describes all of these parts in one Git repository. You fork the repository, set the model, and push the change, and the cluster converges to a running endpoint. + +The pattern pins every Python package by hash and the base image by digest, so each rebuild installs the same software stack, and each change is a reviewable commit. The pattern uses upstream open source components only: vLLM, Ray Serve, and Python wheels from PyPI, on the NVIDIA CUDA image that is based on Red{nbsp}Hat Universal Base Image 9. + +[id="architecture-vllm-ray"] +== Architecture + +.Architecture of the {vllm-ray-pattern} +image::/images/rhvp-vllm-ray-inference-server/architecture.svg[Diagram of the vLLM Ray Inference Server pattern. The Validated Patterns Operator and OpenShift GitOps deploy secrets management, GPU enablement, the inference server, and the notebook from your Git fork.] + +The pattern works in the following way: + +* The {validated-patterns-op} installs {rh-gitops} and points the Argo CD instance at your fork. The `clustergroup` Helm chart then creates every application that the `prod` variant lists. +* {hashicorp-vault} and the {eso-op} deliver an optional Hugging Face token to the server as a Kubernetes secret. The default model is not gated and needs no token. +* The {rh-nfd} and the NVIDIA GPU Operator prepare the GPU node. On AWS, an imperative job creates the GPU node. +* A `BuildConfig` object builds the server image inside the cluster. The server deployment runs one pod with a Ray head, Ray Serve, and the vLLM engine on one GPU. The pod reports `Ready` only after the model loads. +* A persistent volume claim keeps the model weights across pod restarts. +* A JupyterLab notebook runs behind the OpenShift OAuth proxy. Only users who can edit the `rhvp-notebook` namespace can open it. The notebook sends requests to the server through the in-cluster service. + +[id="components-vllm-ray"] +== Components that the pattern deploys + +The pattern deploys the following Operators: + +* {rh-gitops} +* The {validated-patterns-op}, a community Operator +* The {eso-op} for Red{nbsp}Hat OpenShift +* The {rh-nfd} +* The NVIDIA GPU Operator, from the certified Operators catalog + +The pattern deploys the following applications: + +* {hashicorp-vault}, from the {solution-name-upstream} Helm chart. +* The inference server. Ray Serve LLM runs the vLLM engine and serves an OpenAI-compatible API on port 8000. The default model is `Qwen/Qwen2.5-0.5B-Instruct`. The server image turns off the usage statistics of Ray and vLLM. +* The notebook. A JupyterLab notebook measures the running server: the time from pod start to `Ready`, the time to first token, and the token throughput at several concurrency levels. + +The link:https://github.com/eugo-inc/rhvp-vllm-ray-inference-server#what-is-in-the-stock-stack[pattern README] lists the exact version of each component. + +[id="support-vllm-ray"] +== Support + +The {vllm-ray-pattern} is community content in the {sandbox-tier-first}. Eugo maintains the pattern and supports it on a best-effort basis through link:https://github.com/eugo-inc/rhvp-vllm-ray-inference-server/issues[GitHub issues] in the pattern repository. The maintainers do not guarantee a response time. Red{nbsp}Hat does not produce, support, or validate this pattern. For an issue with a product that the pattern deploys, contact the vendor of that product. + +[id="next-steps-vllm-ray"] +== Next steps + +* link:getting-started[Getting started] diff --git a/content/patterns/rhvp-vllm-ray-inference-server/getting-started.adoc b/content/patterns/rhvp-vllm-ray-inference-server/getting-started.adoc new file mode 100644 index 000000000..9d1592400 --- /dev/null +++ b/content/patterns/rhvp-vllm-ray-inference-server/getting-started.adoc @@ -0,0 +1,206 @@ +--- +# The pattern name in this page can change. See the comment at the top of the +# front matter in _index.adoc in this folder. +title: Getting started +weight: 10 +aliases: /rhvp-vllm-ray-inference-server/getting-started/ +--- + +:toc: +:imagesdir: /images +:_content-type: ASSEMBLY +include::modules/comm-attributes.adoc[] +:vllm-ray-pattern: vLLM Ray Inference Server pattern + +[id="deploying-the-vllm-ray-pattern"] +== Deploying the {vllm-ray-pattern} + +You deploy the pattern from your own fork of the pattern repository. {rh-gitops} deploys the content of your fork on GitHub, not the files on your workstation, so commit and push every change before you install the pattern. + +.Prerequisites + +* An {ocp} 4.18 or later cluster, and cluster administrator access. To create a cluster, go to the link:https://console.redhat.com/[{hybrid-console-first}] and select *Services -> Containers -> Create cluster*. +* A storage class that provisions persistent volumes dynamically. The model cache uses one persistent volume claim. +* The {ocp-registry} in the `Managed` state, and the `Build` and `ImageRegistry` cluster capabilities enabled. The cluster builds the server image and the notebook image itself. On bare metal and on vSphere, the registry starts in the `Removed` state. To check the registry state, run the following command: ++ +[source,terminal] +---- +$ oc get configs.imageregistry.operator.openshift.io cluster -o jsonpath='{.spec.managementState}' +---- +* A GPU node: +** On AWS, the pattern creates one `g6.2xlarge` node with one NVIDIA L4 GPU by default. AWS bills this instance for as long as it runs. +** On an AWS cluster that was installed into existing subnets, the job that creates the GPU node fails. Set `global.gpuMachineSet: none` and add a GPU node yourself. +** On other platforms, add a node with an NVIDIA GPU that the NVIDIA GPU Operator supports. +* The server runs on `amd64` nodes by default. If your GPU node is an `arm64` node, read the prerequisites in the link:https://github.com/eugo-inc/rhvp-vllm-ray-inference-server/blob/main/AGENTS.md#prerequisites[AGENTS.md file] in the pattern repository before you install. +* On your workstation, Podman 4.3 or later, Git, and the `oc` CLI, logged in to the cluster. If you set the `KUBECONFIG` environment variable, it must point to a file in your home directory. For the other installation tool dependencies, see link:https://validatedpatterns.io/learn/quickstart/[Patterns quick start]. + +.Procedure + +. Fork the link:https://github.com/eugo-inc/rhvp-vllm-ray-inference-server[rhvp-vllm-ray-inference-server] repository on GitHub. + +. Clone your fork: ++ +[source,terminal,subs="+quotes"] +---- +$ git clone https://github.com/____/rhvp-vllm-ray-inference-server.git +---- + +. Go to the root directory of the repository: ++ +[source,terminal] +---- +$ cd rhvp-vllm-ray-inference-server +---- + +. Edit the `values-global.yaml` file: +** Set `global.gpuMachineSet` to `create` to let the pattern create one AWS `g6.2xlarge` GPU node, or to `none` to use a GPU node that you provide. +** Optional: To serve a different model from Hugging Face, set `global.model.id`, `global.model.source`, and `global.model.revision`. + +. Commit and push the change: ++ +[source,terminal] +---- +$ git commit -am "Configure the pattern" +$ git push +---- + +. Optional: To serve a gated model, create the secrets file for the pattern and add your Hugging Face token: +.. Copy the secrets template: ++ +[source,terminal] +---- +$ mkdir -p ~/.config/validated-patterns +$ cp values-secret.yaml.template \ + ~/.config/validated-patterns/values-secret-rhvp-vllm-ray-inference-server.yaml +---- +.. In the copied file, set the `value` of the `hftoken` field to your Hugging Face token, which starts with `hf_`. Do not commit this file. + +. Log in to the cluster: ++ +[source,terminal,subs="+quotes"] +---- +$ oc login --token=____ --server=____ +---- + +. Install the pattern: ++ +[source,terminal] +---- +$ ./pattern.sh make install +---- ++ +The installer waits up to 60 minutes for every Argo CD application to report `Synced` and `Healthy`. A first installation can take longer, because the cluster builds a large server image, the GPU node joins the cluster, and the server downloads the model. If the wait times out, the pattern stays installed. Check the progress with the commands in the next step, and then run `./pattern.sh make argo-healthcheck`. + +. Watch the deployment: ++ +[source,terminal] +---- +$ oc get applications.argoproj.io -A +$ oc get builds -n rhvp-inference +$ oc get pods -n rhvp-inference -w +---- ++ +The server pod stays in the `Pending` state until a node advertises the `nvidia.com/gpu` resource. The pod reports `Ready` after it loads the model. + +[id="verifying-the-vllm-ray-pattern"] +== Verifying the inference server + +The server is reachable inside the cluster at `http://ray-serve-llm.rhvp-inference.svc:8000`. To send a test request from your workstation, forward the server port. + +.Procedure + +. Forward the server port to your workstation: ++ +[source,terminal] +---- +$ oc port-forward svc/ray-serve-llm 8000:8000 -n rhvp-inference +---- + +. In another terminal, list the models that the server serves: ++ +[source,terminal] +---- +$ curl -s http://localhost:8000/v1/models +---- + +. Send a chat request: ++ +[source,terminal] +---- +$ curl -s http://localhost:8000/v1/chat/completions \ + -H 'Content-Type: application/json' \ + -d '{ + "model": "qwen2.5-0.5b-instruct", + "messages": [{"role": "user", "content": "Say hello in one sentence."}], + "max_tokens": 64 + }' +---- ++ +The `model` field takes the value of `global.model.id`. Any OpenAI-compatible client works with the base URL `http://localhost:8000/v1`. + +[id="opening-the-notebook-vllm-ray"] +== Opening the notebook + +The notebook pod runs JupyterLab behind the OpenShift OAuth proxy. Users who can edit the `rhvp-notebook` namespace, and cluster administrators, can open it. + +.Procedure + +. Get the URL of the notebook route: ++ +[source,terminal] +---- +$ oc get route -n rhvp-notebook +---- + +. Open the URL in a browser and log in with your OpenShift account. + +. Open the `stock_vs_eugo_inference.ipynb` notebook and run all cells. The notebook pod copies the notebook folder to a scratch directory each time that it starts, so download any change that you want to keep. + +. Optional: To give another user access to the notebook, grant the `edit` role in the `rhvp-notebook` namespace: ++ +[source,terminal,subs="+quotes"] +---- +$ oc adm policy add-role-to-user edit ____ -n rhvp-notebook +---- + +[id="uninstalling-the-vllm-ray-pattern"] +== Uninstalling the pattern + +The {solution-name-upstream} framework marks uninstallation as experimental. Uninstalling the pattern leaves the {validated-patterns-op} and {rh-gitops} installed, and it does not delete the AWS GPU node. AWS bills the GPU instance until you delete its machine set. + +.Procedure + +. Uninstall the pattern: ++ +[source,terminal] +---- +$ ./pattern.sh make uninstall +---- + +. List the machine sets with their instance types: ++ +[source,terminal] +---- +$ oc get machinesets -n openshift-machine-api \ + -o custom-columns=NAME:.metadata.name,TYPE:.spec.template.spec.providerSpec.value.instanceType +---- + +. Delete the machine set of the `g6.2xlarge` instance type. Delete it only after the uninstallation finishes, or after the `global.gpuMachineSet: none` setting syncs. Otherwise, the job creates the machine set again. ++ +[source,terminal,subs="+quotes"] +---- +$ oc delete machineset ____ -n openshift-machine-api +---- + +. Check for a leftover persistent volume from the `rhvp-inference/ray-serve-llm-models` claim: ++ +[source,terminal] +---- +$ oc get pv +---- + +[id="next-steps-vllm-ray-getting-started"] +== Next steps + +* For the web console installation, private forks, updates, and troubleshooting, see the link:https://github.com/eugo-inc/rhvp-vllm-ray-inference-server/blob/main/AGENTS.md[AGENTS.md file] in the pattern repository. +* For the pattern overview, see link:../[{vllm-ray-pattern}]. diff --git a/static/images/rhvp-vllm-ray-inference-server/architecture.svg b/static/images/rhvp-vllm-ray-inference-server/architecture.svg new file mode 100644 index 000000000..9ddcbee4b --- /dev/null +++ b/static/images/rhvp-vllm-ray-inference-server/architecture.svg @@ -0,0 +1 @@ +OpenShift clusterNamespacerhvp-notebookNamespacerhvp-inferenceGPU enablementSecretsGithftokenSecrethuggingface-secretmodel weights at/modelsOpenAI-compatible HTTPYour fork of this repositoryYou, in a browserValidated Patterns OperatorOpenShift GitOps: Argo CD instancevp-gitopsclustergroup app-of-apps, variant prodHashiCorp VaultExternal Secrets OperatorNode Feature DiscoveryNVIDIA GPU OperatorMachineSet job, AWS only: oneg6.2xlarge with one NVIDIA L4BuildConfig ray-serve-llmImageStream ray-serve-llmDeployment ray-serve-llm: Ray head +Ray Serve + vLLM, one GPUPVC ray-serve-llm-modelsService ray-serve-llm, port 8000BuildConfig and ImageStreamrhvp-notebookNotebook pod: JupyterLab +oauth-proxyRoute with OpenShift login \ No newline at end of file From 4faa817797bdb0d8673128d9a40fc1f3799d1a41 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 11 Nov 2026 22:46:08 +0000 Subject: [PATCH 02/15] docs(patterns): rename to vllm-ray-inference-server, list Eugo as a partner, apply review notes The pattern repository is now named vllm-ray-inference-server. Move both page folders and the image folder to that name, and update the aliases, the architecture image path, the GitHub links, the clone and cd commands, the secrets file name and the notebook name to match. List Eugo, the maintainer, under partners, so the overview page prints the partner trademark notice. Apply the review notes: drop the front matter comments about a possible rename and the left-out partners entry, and drop validated: false. --- .../_index.adoc | 31 ++++++------------- .../getting-started.adoc | 18 +++++------ .../architecture.svg | 0 3 files changed, 17 insertions(+), 32 deletions(-) rename content/patterns/{rhvp-vllm-ray-inference-server => vllm-ray-inference-server}/_index.adoc (70%) rename content/patterns/{rhvp-vllm-ray-inference-server => vllm-ray-inference-server}/getting-started.adoc (87%) rename static/images/{rhvp-vllm-ray-inference-server => vllm-ray-inference-server}/architecture.svg (100%) diff --git a/content/patterns/rhvp-vllm-ray-inference-server/_index.adoc b/content/patterns/vllm-ray-inference-server/_index.adoc similarity index 70% rename from content/patterns/rhvp-vllm-ray-inference-server/_index.adoc rename to content/patterns/vllm-ray-inference-server/_index.adoc index 6059f0c8d..c1e3b0cd7 100644 --- a/content/patterns/rhvp-vllm-ray-inference-server/_index.adoc +++ b/content/patterns/vllm-ray-inference-server/_index.adoc @@ -1,34 +1,23 @@ --- -# The directory name, the aliases, and the GitHub links in this page set use the -# current repository name, rhvp-vllm-ray-inference-server. That name can change, -# pending two open questions to the Validated Patterns team: whether the "rhvp-" -# prefix is acceptable under the Red Hat trademark guidelines, and whether the -# repository moves to the validatedpatterns-sandbox organization. If either -# changes, rename the directory, the aliases, the image folder, and every link -# in both pages together. title: vLLM Ray Inference Server date: 2026-11-08 -validated: false tier: sandbox summary: This pattern deploys an OpenAI-compatible large language model (LLM) server that runs vLLM on Ray Serve with one GPU, built inside the cluster from upstream packages and managed by OpenShift GitOps. rh_products: - Red Hat OpenShift Container Platform - Red Hat OpenShift GitOps -# partners: left out on purpose. The pattern deploys software from NVIDIA (the -# GPU Operator and the CUDA base image) and from the Ray and vLLM projects, but -# no partner organization takes part in the pattern. A partners entry suggests a -# partnership, and the site prints a partner trademark notice for it. Add an -# entry only when a partner organization joins the pattern. +partners: + - Eugo industries: - General focus_areas: - AI -aliases: /rhvp-vllm-ray-inference-server/ +aliases: /vllm-ray-inference-server/ links: - github: https://github.com/eugo-inc/rhvp-vllm-ray-inference-server + github: https://github.com/eugo-inc/vllm-ray-inference-server install: getting-started - arch: /images/rhvp-vllm-ray-inference-server/architecture.svg - bugs: https://github.com/eugo-inc/rhvp-vllm-ray-inference-server/issues + arch: /images/vllm-ray-inference-server/architecture.svg + bugs: https://github.com/eugo-inc/vllm-ray-inference-server/issues feedback: https://docs.google.com/forms/d/e/1FAIpQLScI76b6tD1WyPu2-d_9CCVDr3Fu5jYERthqLKJDUGwqBg7Vcg/viewform --- :toc: @@ -37,8 +26,6 @@ links: include::modules/comm-attributes.adoc[] :vllm-ray-pattern: vLLM Ray Inference Server pattern -// The pattern name can change. See the comment at the top of the front matter. - [id="about-vllm-ray-inference-server-pattern"] = About the {vllm-ray-pattern} @@ -60,7 +47,7 @@ The pattern pins every Python package by hash and the base image by digest, so e == Architecture .Architecture of the {vllm-ray-pattern} -image::/images/rhvp-vllm-ray-inference-server/architecture.svg[Diagram of the vLLM Ray Inference Server pattern. The Validated Patterns Operator and OpenShift GitOps deploy secrets management, GPU enablement, the inference server, and the notebook from your Git fork.] +image::/images/vllm-ray-inference-server/architecture.svg[Diagram of the vLLM Ray Inference Server pattern. The Validated Patterns Operator and OpenShift GitOps deploy secrets management, GPU enablement, the inference server, and the notebook from your Git fork.] The pattern works in the following way: @@ -88,12 +75,12 @@ The pattern deploys the following applications: * The inference server. Ray Serve LLM runs the vLLM engine and serves an OpenAI-compatible API on port 8000. The default model is `Qwen/Qwen2.5-0.5B-Instruct`. The server image turns off the usage statistics of Ray and vLLM. * The notebook. A JupyterLab notebook measures the running server: the time from pod start to `Ready`, the time to first token, and the token throughput at several concurrency levels. -The link:https://github.com/eugo-inc/rhvp-vllm-ray-inference-server#what-is-in-the-stock-stack[pattern README] lists the exact version of each component. +The link:https://github.com/eugo-inc/vllm-ray-inference-server#what-is-in-the-stock-stack[pattern README] lists the exact version of each component. [id="support-vllm-ray"] == Support -The {vllm-ray-pattern} is community content in the {sandbox-tier-first}. Eugo maintains the pattern and supports it on a best-effort basis through link:https://github.com/eugo-inc/rhvp-vllm-ray-inference-server/issues[GitHub issues] in the pattern repository. The maintainers do not guarantee a response time. Red{nbsp}Hat does not produce, support, or validate this pattern. For an issue with a product that the pattern deploys, contact the vendor of that product. +The {vllm-ray-pattern} is community content in the {sandbox-tier-first}. Eugo maintains the pattern and supports it on a best-effort basis through link:https://github.com/eugo-inc/vllm-ray-inference-server/issues[GitHub issues] in the pattern repository. The maintainers do not guarantee a response time. Red{nbsp}Hat does not produce, support, or validate this pattern. For an issue with a product that the pattern deploys, contact the vendor of that product. [id="next-steps-vllm-ray"] == Next steps diff --git a/content/patterns/rhvp-vllm-ray-inference-server/getting-started.adoc b/content/patterns/vllm-ray-inference-server/getting-started.adoc similarity index 87% rename from content/patterns/rhvp-vllm-ray-inference-server/getting-started.adoc rename to content/patterns/vllm-ray-inference-server/getting-started.adoc index 9d1592400..2e8e07f4c 100644 --- a/content/patterns/rhvp-vllm-ray-inference-server/getting-started.adoc +++ b/content/patterns/vllm-ray-inference-server/getting-started.adoc @@ -1,9 +1,7 @@ --- -# The pattern name in this page can change. See the comment at the top of the -# front matter in _index.adoc in this folder. title: Getting started weight: 10 -aliases: /rhvp-vllm-ray-inference-server/getting-started/ +aliases: /vllm-ray-inference-server/getting-started/ --- :toc: @@ -31,25 +29,25 @@ $ oc get configs.imageregistry.operator.openshift.io cluster -o jsonpath='{.spec ** On AWS, the pattern creates one `g6.2xlarge` node with one NVIDIA L4 GPU by default. AWS bills this instance for as long as it runs. ** On an AWS cluster that was installed into existing subnets, the job that creates the GPU node fails. Set `global.gpuMachineSet: none` and add a GPU node yourself. ** On other platforms, add a node with an NVIDIA GPU that the NVIDIA GPU Operator supports. -* The server runs on `amd64` nodes by default. If your GPU node is an `arm64` node, read the prerequisites in the link:https://github.com/eugo-inc/rhvp-vllm-ray-inference-server/blob/main/AGENTS.md#prerequisites[AGENTS.md file] in the pattern repository before you install. +* The server runs on `amd64` nodes by default. If your GPU node is an `arm64` node, read the prerequisites in the link:https://github.com/eugo-inc/vllm-ray-inference-server/blob/main/AGENTS.md#prerequisites[AGENTS.md file] in the pattern repository before you install. * On your workstation, Podman 4.3 or later, Git, and the `oc` CLI, logged in to the cluster. If you set the `KUBECONFIG` environment variable, it must point to a file in your home directory. For the other installation tool dependencies, see link:https://validatedpatterns.io/learn/quickstart/[Patterns quick start]. .Procedure -. Fork the link:https://github.com/eugo-inc/rhvp-vllm-ray-inference-server[rhvp-vllm-ray-inference-server] repository on GitHub. +. Fork the link:https://github.com/eugo-inc/vllm-ray-inference-server[vllm-ray-inference-server] repository on GitHub. . Clone your fork: + [source,terminal,subs="+quotes"] ---- -$ git clone https://github.com/____/rhvp-vllm-ray-inference-server.git +$ git clone https://github.com/____/vllm-ray-inference-server.git ---- . Go to the root directory of the repository: + [source,terminal] ---- -$ cd rhvp-vllm-ray-inference-server +$ cd vllm-ray-inference-server ---- . Edit the `values-global.yaml` file: @@ -71,7 +69,7 @@ $ git push ---- $ mkdir -p ~/.config/validated-patterns $ cp values-secret.yaml.template \ - ~/.config/validated-patterns/values-secret-rhvp-vllm-ray-inference-server.yaml + ~/.config/validated-patterns/values-secret-vllm-ray-inference-server.yaml ---- .. In the copied file, set the `value` of the `hftoken` field to your Hugging Face token, which starts with `hf_`. Do not commit this file. @@ -154,7 +152,7 @@ $ oc get route -n rhvp-notebook . Open the URL in a browser and log in with your OpenShift account. -. Open the `stock_vs_eugo_inference.ipynb` notebook and run all cells. The notebook pod copies the notebook folder to a scratch directory each time that it starts, so download any change that you want to keep. +. Open the `inference_timings.ipynb` notebook and run all cells. The notebook pod copies the notebook folder to a scratch directory each time that it starts, so download any change that you want to keep. . Optional: To give another user access to the notebook, grant the `edit` role in the `rhvp-notebook` namespace: + @@ -202,5 +200,5 @@ $ oc get pv [id="next-steps-vllm-ray-getting-started"] == Next steps -* For the web console installation, private forks, updates, and troubleshooting, see the link:https://github.com/eugo-inc/rhvp-vllm-ray-inference-server/blob/main/AGENTS.md[AGENTS.md file] in the pattern repository. +* For the web console installation, private forks, updates, and troubleshooting, see the link:https://github.com/eugo-inc/vllm-ray-inference-server/blob/main/AGENTS.md[AGENTS.md file] in the pattern repository. * For the pattern overview, see link:../[{vllm-ray-pattern}]. diff --git a/static/images/rhvp-vllm-ray-inference-server/architecture.svg b/static/images/vllm-ray-inference-server/architecture.svg similarity index 100% rename from static/images/rhvp-vllm-ray-inference-server/architecture.svg rename to static/images/vllm-ray-inference-server/architecture.svg From 60102f448a6ef2745f9187a7ea12146e2f4ebd72 Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 12 Nov 2026 00:05:57 +0000 Subject: [PATCH 03/15] docs(patterns): follow the pattern's namespace rename and list decode speed The pattern's namespaces are now vllm-inference (the server) and vllm-notebook (the notebook). Update the oc commands, the in-cluster server URL, the notebook access text and the leftover-volume check on both pages, and the namespace labels in the architecture diagram, whose notebook build box now names the BuildConfig and ImageStream notebook. The overview page's notebook entry also lists the single-stream decode speed that the notebook measures. --- .../vllm-ray-inference-server/_index.adoc | 4 ++-- .../getting-started.adoc | 18 +++++++++--------- .../vllm-ray-inference-server/architecture.svg | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/content/patterns/vllm-ray-inference-server/_index.adoc b/content/patterns/vllm-ray-inference-server/_index.adoc index c1e3b0cd7..e6b637f4c 100644 --- a/content/patterns/vllm-ray-inference-server/_index.adoc +++ b/content/patterns/vllm-ray-inference-server/_index.adoc @@ -56,7 +56,7 @@ The pattern works in the following way: * The {rh-nfd} and the NVIDIA GPU Operator prepare the GPU node. On AWS, an imperative job creates the GPU node. * A `BuildConfig` object builds the server image inside the cluster. The server deployment runs one pod with a Ray head, Ray Serve, and the vLLM engine on one GPU. The pod reports `Ready` only after the model loads. * A persistent volume claim keeps the model weights across pod restarts. -* A JupyterLab notebook runs behind the OpenShift OAuth proxy. Only users who can edit the `rhvp-notebook` namespace can open it. The notebook sends requests to the server through the in-cluster service. +* A JupyterLab notebook runs behind the OpenShift OAuth proxy. Only users who can edit the `vllm-notebook` namespace can open it. The notebook sends requests to the server through the in-cluster service. [id="components-vllm-ray"] == Components that the pattern deploys @@ -73,7 +73,7 @@ The pattern deploys the following applications: * {hashicorp-vault}, from the {solution-name-upstream} Helm chart. * The inference server. Ray Serve LLM runs the vLLM engine and serves an OpenAI-compatible API on port 8000. The default model is `Qwen/Qwen2.5-0.5B-Instruct`. The server image turns off the usage statistics of Ray and vLLM. -* The notebook. A JupyterLab notebook measures the running server: the time from pod start to `Ready`, the time to first token, and the token throughput at several concurrency levels. +* The notebook. A JupyterLab notebook measures the running server: the time from pod start to `Ready`, the time to first token, the decode speed of one stream, and the token throughput at several concurrency levels. The link:https://github.com/eugo-inc/vllm-ray-inference-server#what-is-in-the-stock-stack[pattern README] lists the exact version of each component. diff --git a/content/patterns/vllm-ray-inference-server/getting-started.adoc b/content/patterns/vllm-ray-inference-server/getting-started.adoc index 2e8e07f4c..3a2206316 100644 --- a/content/patterns/vllm-ray-inference-server/getting-started.adoc +++ b/content/patterns/vllm-ray-inference-server/getting-started.adoc @@ -94,8 +94,8 @@ The installer waits up to 60 minutes for every Argo CD application to report `Sy [source,terminal] ---- $ oc get applications.argoproj.io -A -$ oc get builds -n rhvp-inference -$ oc get pods -n rhvp-inference -w +$ oc get builds -n vllm-inference +$ oc get pods -n vllm-inference -w ---- + The server pod stays in the `Pending` state until a node advertises the `nvidia.com/gpu` resource. The pod reports `Ready` after it loads the model. @@ -103,7 +103,7 @@ The server pod stays in the `Pending` state until a node advertises the `nvidia. [id="verifying-the-vllm-ray-pattern"] == Verifying the inference server -The server is reachable inside the cluster at `http://ray-serve-llm.rhvp-inference.svc:8000`. To send a test request from your workstation, forward the server port. +The server is reachable inside the cluster at `http://ray-serve-llm.vllm-inference.svc:8000`. To send a test request from your workstation, forward the server port. .Procedure @@ -111,7 +111,7 @@ The server is reachable inside the cluster at `http://ray-serve-llm.rhvp-inferen + [source,terminal] ---- -$ oc port-forward svc/ray-serve-llm 8000:8000 -n rhvp-inference +$ oc port-forward svc/ray-serve-llm 8000:8000 -n vllm-inference ---- . In another terminal, list the models that the server serves: @@ -139,7 +139,7 @@ The `model` field takes the value of `global.model.id`. Any OpenAI-compatible cl [id="opening-the-notebook-vllm-ray"] == Opening the notebook -The notebook pod runs JupyterLab behind the OpenShift OAuth proxy. Users who can edit the `rhvp-notebook` namespace, and cluster administrators, can open it. +The notebook pod runs JupyterLab behind the OpenShift OAuth proxy. Users who can edit the `vllm-notebook` namespace, and cluster administrators, can open it. .Procedure @@ -147,18 +147,18 @@ The notebook pod runs JupyterLab behind the OpenShift OAuth proxy. Users who can + [source,terminal] ---- -$ oc get route -n rhvp-notebook +$ oc get route -n vllm-notebook ---- . Open the URL in a browser and log in with your OpenShift account. . Open the `inference_timings.ipynb` notebook and run all cells. The notebook pod copies the notebook folder to a scratch directory each time that it starts, so download any change that you want to keep. -. Optional: To give another user access to the notebook, grant the `edit` role in the `rhvp-notebook` namespace: +. Optional: To give another user access to the notebook, grant the `edit` role in the `vllm-notebook` namespace: + [source,terminal,subs="+quotes"] ---- -$ oc adm policy add-role-to-user edit ____ -n rhvp-notebook +$ oc adm policy add-role-to-user edit ____ -n vllm-notebook ---- [id="uninstalling-the-vllm-ray-pattern"] @@ -190,7 +190,7 @@ $ oc get machinesets -n openshift-machine-api \ $ oc delete machineset ____ -n openshift-machine-api ---- -. Check for a leftover persistent volume from the `rhvp-inference/ray-serve-llm-models` claim: +. Check for a leftover persistent volume from the `vllm-inference/ray-serve-llm-models` claim: + [source,terminal] ---- diff --git a/static/images/vllm-ray-inference-server/architecture.svg b/static/images/vllm-ray-inference-server/architecture.svg index 9ddcbee4b..012e72bf3 100644 --- a/static/images/vllm-ray-inference-server/architecture.svg +++ b/static/images/vllm-ray-inference-server/architecture.svg @@ -1 +1 @@ -OpenShift clusterNamespacerhvp-notebookNamespacerhvp-inferenceGPU enablementSecretsGithftokenSecrethuggingface-secretmodel weights at/modelsOpenAI-compatible HTTPYour fork of this repositoryYou, in a browserValidated Patterns OperatorOpenShift GitOps: Argo CD instancevp-gitopsclustergroup app-of-apps, variant prodHashiCorp VaultExternal Secrets OperatorNode Feature DiscoveryNVIDIA GPU OperatorMachineSet job, AWS only: oneg6.2xlarge with one NVIDIA L4BuildConfig ray-serve-llmImageStream ray-serve-llmDeployment ray-serve-llm: Ray head +Ray Serve + vLLM, one GPUPVC ray-serve-llm-modelsService ray-serve-llm, port 8000BuildConfig and ImageStreamrhvp-notebookNotebook pod: JupyterLab +oauth-proxyRoute with OpenShift login \ No newline at end of file +OpenShift clusterNamespacevllm-notebookNamespacevllm-inferenceGPU enablementSecretsGithftokenSecrethuggingface-secretmodel weights at/modelsOpenAI-compatible HTTPYour fork of this repositoryYou, in a browserValidated Patterns OperatorOpenShift GitOps: Argo CD instancevp-gitopsclustergroup app-of-apps, variant prodHashiCorp VaultExternal Secrets OperatorNode Feature DiscoveryNVIDIA GPU OperatorMachineSet job, AWS only: oneg6.2xlarge with one NVIDIA L4BuildConfig ray-serve-llmImageStream ray-serve-llmDeployment ray-serve-llm: Ray head +Ray Serve + vLLM, one GPUPVC ray-serve-llm-modelsService ray-serve-llm, port 8000BuildConfig and ImageStreamnotebookNotebook pod: JupyterLab +oauth-proxyRoute with OpenShift login \ No newline at end of file From 55fd71dc5bece9ae9c5961b87f64122db764052a Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 12 Nov 2026 04:03:49 +0000 Subject: [PATCH 04/15] docs(patterns): frame the vLLM Ray Inference Server beside Red Hat AI products - Background: say that the pattern does not replace or integrate with the Red Hat AI products, such as Red Hat OpenShift AI, which parts are pinned and which are not, the one-time install step and what OpenShift GitOps does not do after it, and what the notebook measures. Drop the claims that each rebuild installs the same software stack and that the pattern uses upstream open source components only. - Prerequisites: use a cluster that does not already run the Node Feature Discovery Operator or the NVIDIA GPU Operator. The pattern installs both itself and can conflict with existing installations. It has not been tested on a cluster that runs Red Hat OpenShift AI. --- .../patterns/vllm-ray-inference-server/_index.adoc | 12 ++++++++++-- .../vllm-ray-inference-server/getting-started.adoc | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/content/patterns/vllm-ray-inference-server/_index.adoc b/content/patterns/vllm-ray-inference-server/_index.adoc index e6b637f4c..d90094b4a 100644 --- a/content/patterns/vllm-ray-inference-server/_index.adoc +++ b/content/patterns/vllm-ray-inference-server/_index.adoc @@ -39,9 +39,17 @@ On {AWS}, the default installation creates one billable GPU instance: a `g6.2xla [id="background-vllm-ray"] == Background -A team that wants a private, OpenAI-compatible LLM endpoint on its own {ocp} cluster usually assembles the parts by hand: GPU enablement, a serving runtime, a model cache, a secret for gated models, and a way to rebuild the server image when the software stack changes. This pattern describes all of these parts in one Git repository. You fork the repository, set the model, and push the change, and the cluster converges to a running endpoint. +The {vllm-ray-pattern} does not replace the Red{nbsp}Hat AI products, such as {rhoai}, and it does not integrate with them. The pattern is a small, community-maintained reference point: the upstream vLLM engine on Ray Serve, built from known versions and measured the same way each time. The pattern does not need a {rhoai} subscription. -The pattern pins every Python package by hash and the base image by digest, so each rebuild installs the same software stack, and each change is a reviewable commit. The pattern uses upstream open source components only: vLLM, Ray Serve, and Python wheels from PyPI, on the NVIDIA CUDA image that is based on Red{nbsp}Hat Universal Base Image 9. +Your fork of the pattern repository describes the whole deployment: GPU enablement, the server, a model cache, a secret for gated models, and a timing notebook. You run the `./pattern.sh make install` command once. After that, {rh-gitops} syncs each commit on your branch. It does not delete the objects that a commit removes, and it does not change the image of the running server or notebook. A job in the cluster starts new image builds: every 10 minutes, it starts a build when the server or notebook folder changed and no build of that image is running. For details, see link:https://github.com/eugo-inc/vllm-ray-inference-server/blob/main/AGENTS.md#updating-a-running-install[Updating a running install] in the pattern repository. + +The pattern pins every Python package by hash and installs wheels only. It pins the base images of the server and the notebook by digest, and the default model by its Hugging Face commit. Some parts are not pinned, among them the system packages that the server image installs with `dnf`, the Operator versions, and the patch versions of the Validated Patterns Helm charts. Two builds from the same commit therefore install the same Python packages, but their system packages can differ. + +The notebook measures the server in your cluster: the time from pod start to `Ready`, the time to first token, the decode speed of one stream, and the token throughput at 1, 8, and 32 concurrent requests. The notebook chooses its prompts from a fixed seed, and every request uses a temperature of 0 and a fixed number of output tokens. The time to `Ready` is in whole seconds and can trail the server by up to about 2 seconds. + +The server runs Ray Serve LLM and the vLLM engine in one pod of a standard deployment, without KServe or KubeRay. Ray, vLLM, and PyTorch come from PyPI and run on the NVIDIA CUDA image that is based on Red{nbsp}Hat Universal Base Image 9. The pattern creates no KServe `InferenceService` or `ServingRuntime` resource. + +The pattern installs the {rh-nfd} and the NVIDIA GPU Operator itself. On a cluster that already runs these Operators, the pattern can conflict with them, and the pattern has not been tested on a cluster that runs {rhoai}. Install the pattern on a cluster that does not run these Operators. [id="architecture-vllm-ray"] == Architecture diff --git a/content/patterns/vllm-ray-inference-server/getting-started.adoc b/content/patterns/vllm-ray-inference-server/getting-started.adoc index 3a2206316..ff220e8a6 100644 --- a/content/patterns/vllm-ray-inference-server/getting-started.adoc +++ b/content/patterns/vllm-ray-inference-server/getting-started.adoc @@ -18,6 +18,7 @@ You deploy the pattern from your own fork of the pattern repository. {rh-gitops} .Prerequisites * An {ocp} 4.18 or later cluster, and cluster administrator access. To create a cluster, go to the link:https://console.redhat.com/[{hybrid-console-first}] and select *Services -> Containers -> Create cluster*. +* A cluster that does not already run the {rh-nfd} or the NVIDIA GPU Operator. The pattern installs both Operators itself, with its own `OperatorGroup` objects and settings, and can conflict with existing installations of these Operators. The pattern has not been tested on a cluster that runs {rhoai}. * A storage class that provisions persistent volumes dynamically. The model cache uses one persistent volume claim. * The {ocp-registry} in the `Managed` state, and the `Build` and `ImageRegistry` cluster capabilities enabled. The cluster builds the server image and the notebook image itself. On bare metal and on vSphere, the registry starts in the `Removed` state. To check the registry state, run the following command: + From d98e6932bc7cc665afee9851ed6b88a47ccfa531 Mon Sep 17 00:00:00 2001 From: Ben Date: Thu, 12 Nov 2026 04:06:30 +0000 Subject: [PATCH 05/15] docs(patterns): say one time instead of once in the vLLM Ray Inference Server background --- content/patterns/vllm-ray-inference-server/_index.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/patterns/vllm-ray-inference-server/_index.adoc b/content/patterns/vllm-ray-inference-server/_index.adoc index d90094b4a..9f03307a5 100644 --- a/content/patterns/vllm-ray-inference-server/_index.adoc +++ b/content/patterns/vllm-ray-inference-server/_index.adoc @@ -41,7 +41,7 @@ On {AWS}, the default installation creates one billable GPU instance: a `g6.2xla The {vllm-ray-pattern} does not replace the Red{nbsp}Hat AI products, such as {rhoai}, and it does not integrate with them. The pattern is a small, community-maintained reference point: the upstream vLLM engine on Ray Serve, built from known versions and measured the same way each time. The pattern does not need a {rhoai} subscription. -Your fork of the pattern repository describes the whole deployment: GPU enablement, the server, a model cache, a secret for gated models, and a timing notebook. You run the `./pattern.sh make install` command once. After that, {rh-gitops} syncs each commit on your branch. It does not delete the objects that a commit removes, and it does not change the image of the running server or notebook. A job in the cluster starts new image builds: every 10 minutes, it starts a build when the server or notebook folder changed and no build of that image is running. For details, see link:https://github.com/eugo-inc/vllm-ray-inference-server/blob/main/AGENTS.md#updating-a-running-install[Updating a running install] in the pattern repository. +Your fork of the pattern repository describes the whole deployment: GPU enablement, the server, a model cache, a secret for gated models, and a timing notebook. You run the `./pattern.sh make install` command one time. After that, {rh-gitops} syncs each commit on your branch. It does not delete the objects that a commit removes, and it does not change the image of the running server or notebook. A job in the cluster starts new image builds: every 10 minutes, it starts a build when the server or notebook folder changed and no build of that image is running. For details, see link:https://github.com/eugo-inc/vllm-ray-inference-server/blob/main/AGENTS.md#updating-a-running-install[Updating a running install] in the pattern repository. The pattern pins every Python package by hash and installs wheels only. It pins the base images of the server and the notebook by digest, and the default model by its Hugging Face commit. Some parts are not pinned, among them the system packages that the server image installs with `dnf`, the Operator versions, and the patch versions of the Validated Patterns Helm charts. Two builds from the same commit therefore install the same Python packages, but their system packages can differ. From ad90260cf9bb4a407c3e5f727f5eeb836f1313c7 Mon Sep 17 00:00:00 2001 From: Ben Date: Sat, 14 Nov 2026 20:18:22 +0000 Subject: [PATCH 06/15] docs(patterns): add Eugo's partner results to the vLLM Ray Inference Server page Add a "Partner results: Eugo" section before Support: the start-up time and start-up reliability of Eugo's next vLLM image (release pending) against the upstream vLLM image, and a link to the matching section of the pattern README. --- content/patterns/vllm-ray-inference-server/_index.adoc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/content/patterns/vllm-ray-inference-server/_index.adoc b/content/patterns/vllm-ray-inference-server/_index.adoc index 9f03307a5..d8b8a088e 100644 --- a/content/patterns/vllm-ray-inference-server/_index.adoc +++ b/content/patterns/vllm-ray-inference-server/_index.adoc @@ -85,6 +85,16 @@ The pattern deploys the following applications: The link:https://github.com/eugo-inc/vllm-ray-inference-server#what-is-in-the-stock-stack[pattern README] lists the exact version of each component. +[id="partner-results-vllm-ray"] +== Partner results: Eugo + +Eugo measured its next vLLM image (release pending) against the upstream `vllm/vllm-openai` v0.33.0 image on one NVIDIA DGX Spark that other jobs kept busy, in paired rounds with an exact sign test. + +* *Time for a new server to serve.* With Qwen2.5-0.5B-Instruct in plain `vllm serve` containers, the software caches empty and the model files already in memory, a new Eugo server served its first token a median of 20.2 seconds (22%) sooner than the upstream image with `--attention-backend FLASHINFER`, in 6 of 6 rounds (p = 0.031). +* *Starts that succeed first time.* The vLLM start-up memory check stopped 4 of 12 upstream starts and none of 28 Eugo starts. Eugo's vLLM carries a fix that mitigates this. + +For details, see the link:https://github.com/eugo-inc/vllm-ray-inference-server#partner-results-eugo[Partner results: Eugo] section of the pattern README. + [id="support-vllm-ray"] == Support From 1878e28ae76fa58a92bb206f2b360e94dfca8b8b Mon Sep 17 00:00:00 2001 From: Ben Date: Sun, 15 Nov 2026 17:50:40 +0000 Subject: [PATCH 07/15] docs(patterns): say which attention kernels the vLLM Ray Inference Server start-up result compared Add one sentence to the start-up bullet of "Partner results: Eugo": Eugo's image picked Triton attention by itself, upstream with --attention-backend TRITON_ATTN was not measured, and the lead against it is likely smaller. --- content/patterns/vllm-ray-inference-server/_index.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/patterns/vllm-ray-inference-server/_index.adoc b/content/patterns/vllm-ray-inference-server/_index.adoc index d8b8a088e..13a092912 100644 --- a/content/patterns/vllm-ray-inference-server/_index.adoc +++ b/content/patterns/vllm-ray-inference-server/_index.adoc @@ -90,7 +90,7 @@ The link:https://github.com/eugo-inc/vllm-ray-inference-server#what-is-in-the-st Eugo measured its next vLLM image (release pending) against the upstream `vllm/vllm-openai` v0.33.0 image on one NVIDIA DGX Spark that other jobs kept busy, in paired rounds with an exact sign test. -* *Time for a new server to serve.* With Qwen2.5-0.5B-Instruct in plain `vllm serve` containers, the software caches empty and the model files already in memory, a new Eugo server served its first token a median of 20.2 seconds (22%) sooner than the upstream image with `--attention-backend FLASHINFER`, in 6 of 6 rounds (p = 0.031). +* *Time for a new server to serve.* With Qwen2.5-0.5B-Instruct in plain `vllm serve` containers, the software caches empty and the model files already in memory, a new Eugo server served its first token a median of 20.2 seconds (22%) sooner than the upstream image with `--attention-backend FLASHINFER`, in 6 of 6 rounds (p = 0.031). Eugo's image picked Triton attention by itself; upstream with `--attention-backend TRITON_ATTN` was not measured, and the lead against it is likely smaller. * *Starts that succeed first time.* The vLLM start-up memory check stopped 4 of 12 upstream starts and none of 28 Eugo starts. Eugo's vLLM carries a fix that mitigates this. For details, see the link:https://github.com/eugo-inc/vllm-ray-inference-server#partner-results-eugo[Partner results: Eugo] section of the pattern README. From 001e672971f0cdabb23d9b52975711276865441f Mon Sep 17 00:00:00 2001 From: Ben Date: Sun, 15 Nov 2026 18:05:13 +0000 Subject: [PATCH 08/15] docs(patterns): say upstream with Triton attention was not part of the start-up runs The start-up bullet said upstream with --attention-backend TRITON_ATTN "was not measured". The README section it links to describes a separate upstream-only check of that setting, so the bullet now says it was not part of these runs, matching the README. --- content/patterns/vllm-ray-inference-server/_index.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/patterns/vllm-ray-inference-server/_index.adoc b/content/patterns/vllm-ray-inference-server/_index.adoc index 13a092912..90477b8ad 100644 --- a/content/patterns/vllm-ray-inference-server/_index.adoc +++ b/content/patterns/vllm-ray-inference-server/_index.adoc @@ -90,7 +90,7 @@ The link:https://github.com/eugo-inc/vllm-ray-inference-server#what-is-in-the-st Eugo measured its next vLLM image (release pending) against the upstream `vllm/vllm-openai` v0.33.0 image on one NVIDIA DGX Spark that other jobs kept busy, in paired rounds with an exact sign test. -* *Time for a new server to serve.* With Qwen2.5-0.5B-Instruct in plain `vllm serve` containers, the software caches empty and the model files already in memory, a new Eugo server served its first token a median of 20.2 seconds (22%) sooner than the upstream image with `--attention-backend FLASHINFER`, in 6 of 6 rounds (p = 0.031). Eugo's image picked Triton attention by itself; upstream with `--attention-backend TRITON_ATTN` was not measured, and the lead against it is likely smaller. +* *Time for a new server to serve.* With Qwen2.5-0.5B-Instruct in plain `vllm serve` containers, the software caches empty and the model files already in memory, a new Eugo server served its first token a median of 20.2 seconds (22%) sooner than the upstream image with `--attention-backend FLASHINFER`, in 6 of 6 rounds (p = 0.031). Eugo's image picked Triton attention by itself; upstream with `--attention-backend TRITON_ATTN` was not part of these runs, and the lead against it is likely smaller. * *Starts that succeed first time.* The vLLM start-up memory check stopped 4 of 12 upstream starts and none of 28 Eugo starts. Eugo's vLLM carries a fix that mitigates this. For details, see the link:https://github.com/eugo-inc/vllm-ray-inference-server#partner-results-eugo[Partner results: Eugo] section of the pattern README. From db32a571beea477a392823fc88bb6fcf5de6287c Mon Sep 17 00:00:00 2001 From: Ben Date: Sun, 15 Nov 2026 18:22:49 +0000 Subject: [PATCH 09/15] docs(patterns): say the Eugo build in the start-up runs picked Triton attention The start-up bullet said Eugo's image picked Triton attention by itself. That is true of the build these runs used, but the section calls the measured image Eugo's next vLLM image (release pending), and the sentence could be read as that image's default. It now says the Eugo build in these runs picked Triton attention by itself, matching the README. No number changed. --- content/patterns/vllm-ray-inference-server/_index.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/patterns/vllm-ray-inference-server/_index.adoc b/content/patterns/vllm-ray-inference-server/_index.adoc index 90477b8ad..a385d7626 100644 --- a/content/patterns/vllm-ray-inference-server/_index.adoc +++ b/content/patterns/vllm-ray-inference-server/_index.adoc @@ -90,7 +90,7 @@ The link:https://github.com/eugo-inc/vllm-ray-inference-server#what-is-in-the-st Eugo measured its next vLLM image (release pending) against the upstream `vllm/vllm-openai` v0.33.0 image on one NVIDIA DGX Spark that other jobs kept busy, in paired rounds with an exact sign test. -* *Time for a new server to serve.* With Qwen2.5-0.5B-Instruct in plain `vllm serve` containers, the software caches empty and the model files already in memory, a new Eugo server served its first token a median of 20.2 seconds (22%) sooner than the upstream image with `--attention-backend FLASHINFER`, in 6 of 6 rounds (p = 0.031). Eugo's image picked Triton attention by itself; upstream with `--attention-backend TRITON_ATTN` was not part of these runs, and the lead against it is likely smaller. +* *Time for a new server to serve.* With Qwen2.5-0.5B-Instruct in plain `vllm serve` containers, the software caches empty and the model files already in memory, a new Eugo server served its first token a median of 20.2 seconds (22%) sooner than the upstream image with `--attention-backend FLASHINFER`, in 6 of 6 rounds (p = 0.031). The Eugo build in these runs picked Triton attention by itself; upstream with `--attention-backend TRITON_ATTN` was not part of these runs, and the lead against it is likely smaller. * *Starts that succeed first time.* The vLLM start-up memory check stopped 4 of 12 upstream starts and none of 28 Eugo starts. Eugo's vLLM carries a fix that mitigates this. For details, see the link:https://github.com/eugo-inc/vllm-ray-inference-server#partner-results-eugo[Partner results: Eugo] section of the pattern README. From 5a7f9c9fe03d19fd9acf329a73a59b386313338e Mon Sep 17 00:00:00 2001 From: Ben Date: Sun, 15 Nov 2026 19:29:56 +0000 Subject: [PATCH 10/15] docs(patterns): describe image comparison and scale out on the vLLM Ray Inference Server page The overview page left both optional features to the pattern README. A new section says what each one does, that both are off by default, that a comparison scales the inference server to zero pods for its run, and that neither has run on OpenShift yet, and it links the README sections. It says nothing that the README on main does not say, and it adds no partner result. --- content/patterns/vllm-ray-inference-server/_index.adoc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/content/patterns/vllm-ray-inference-server/_index.adoc b/content/patterns/vllm-ray-inference-server/_index.adoc index a385d7626..39b40b98f 100644 --- a/content/patterns/vllm-ray-inference-server/_index.adoc +++ b/content/patterns/vllm-ray-inference-server/_index.adoc @@ -85,6 +85,16 @@ The pattern deploys the following applications: The link:https://github.com/eugo-inc/vllm-ray-inference-server#what-is-in-the-stock-stack[pattern README] lists the exact version of each component. +[id="compare-scale-out-vllm-ray"] +== Image comparison and scale out + +The pattern has two optional features, and both are off by default: + +* *Image comparison.* A job in the cluster runs two server images through the same benchmark, on the same GPU, with the same model and requests. The job records the time to ready, the time to first answer, and, at each load level, the time to first token, the inter-token latency, the output tokens per second, and the output tokens per joule of GPU energy. Each round also starts an identical copy of each image. A rule that is fixed before the first launch counts a difference between the images only when it is larger than the gap between two starts of one image and significant in an exact sign test over the paired rounds. Each case ends with a verdict, such as FASTER, SLOWER, or TIE, or with NO VERDICT and a reason. A run scales the inference server to zero pods for its whole length. +* *Scale out.* Ray Serve can add vLLM replicas inside the server pod. With `global.scaleOut.mode: keda`, the Red{nbsp}Hat Custom Metrics Autoscaler, the supported build of KEDA, adds whole server pods when the vLLM count of waiting requests per pod rises above a set limit, and removes them after a cooldown. The image comparison also has a scale-out mode: at a fixed request rate, it starts a second replica of each image at a fixed time, and measures how soon that replica gives its first answer and what share of the requests meets the latency goals. For now, this mode runs only with Docker on one machine, not in the cluster. + +No image comparison has run on {ocp} yet, and neither autoscaler has added a real vLLM replica or pod yet. For the settings, the steps, and what has not been checked, see the link:https://github.com/eugo-inc/vllm-ray-inference-server#compare-two-images[Compare two images] and link:https://github.com/eugo-inc/vllm-ray-inference-server#scale-out[Scale out] sections of the pattern README. + [id="partner-results-vllm-ray"] == Partner results: Eugo From 8963719d4bf38260d070df75e0e33bf73955ece6 Mon Sep 17 00:00:00 2001 From: Ben Date: Sun, 15 Nov 2026 20:07:46 +0000 Subject: [PATCH 11/15] docs(patterns): give the vLLM Ray Inference Server start-up result for three upstream attention settings The start-up bullet of "Partner results: Eugo" gave one result, 20.2 seconds (22%) sooner than upstream with FlashInfer attention, from an earlier build, and a sentence saying the lead against upstream with Triton attention was likely smaller. It now gives the result against each of three upstream attention settings, measured on Eugo's next vLLM test build, as the pattern README does: 10.9 seconds (18%) sooner than FlashInfer with TRT-LLM attention off, 12.0 seconds (20%) sooner than Triton and 16.4 seconds (25%) sooner than FlashInfer, in every paired round, with p = 0.004 or lower after Holm's correction. The sentence about Triton attention is gone, since that setting is now measured. The intro now says Eugo measured its next vLLM test build instead of its next vLLM image. --- content/patterns/vllm-ray-inference-server/_index.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/patterns/vllm-ray-inference-server/_index.adoc b/content/patterns/vllm-ray-inference-server/_index.adoc index 39b40b98f..aa92eae55 100644 --- a/content/patterns/vllm-ray-inference-server/_index.adoc +++ b/content/patterns/vllm-ray-inference-server/_index.adoc @@ -98,9 +98,9 @@ No image comparison has run on {ocp} yet, and neither autoscaler has added a rea [id="partner-results-vllm-ray"] == Partner results: Eugo -Eugo measured its next vLLM image (release pending) against the upstream `vllm/vllm-openai` v0.33.0 image on one NVIDIA DGX Spark that other jobs kept busy, in paired rounds with an exact sign test. +Eugo measured its next vLLM test build (release pending) against the upstream `vllm/vllm-openai` v0.33.0 image on one NVIDIA DGX Spark that other jobs kept busy, in paired rounds with an exact sign test. -* *Time for a new server to serve.* With Qwen2.5-0.5B-Instruct in plain `vllm serve` containers, the software caches empty and the model files already in memory, a new Eugo server served its first token a median of 20.2 seconds (22%) sooner than the upstream image with `--attention-backend FLASHINFER`, in 6 of 6 rounds (p = 0.031). The Eugo build in these runs picked Triton attention by itself; upstream with `--attention-backend TRITON_ATTN` was not part of these runs, and the lead against it is likely smaller. +* *Time for a new server to serve.* With Qwen2.5-0.5B-Instruct in plain `vllm serve` containers, the software caches empty and the model files already in memory, a new Eugo server served its first token sooner than the upstream image in every paired round with each of three upstream attention settings: a median of 10.9 seconds (18%) sooner with FlashInfer and its TRT-LLM attention turned off (11 of 11 rounds), 12.0 seconds (20%) sooner with `--attention-backend TRITON_ATTN` (9 of 9), and 16.4 seconds (25%) sooner with `--attention-backend FLASHINFER` (10 of 10), with p = 0.004 or lower after Holm's correction. Both sides loaded the weights eagerly, and the Eugo build chose its attention kernel itself. * *Starts that succeed first time.* The vLLM start-up memory check stopped 4 of 12 upstream starts and none of 28 Eugo starts. Eugo's vLLM carries a fix that mitigates this. For details, see the link:https://github.com/eugo-inc/vllm-ray-inference-server#partner-results-eugo[Partner results: Eugo] section of the pattern README. From 53fb462e7449320b8b1ccfe77c56fcc07f40f8f4 Mon Sep 17 00:00:00 2001 From: Ben Date: Sun, 15 Nov 2026 20:07:46 +0000 Subject: [PATCH 12/15] docs(patterns): count failed starts on the same build as the start-up result The "Starts that succeed first time" bullet (4 of 12 upstream starts and none of 28 Eugo starts) came from the earlier build. It now comes from the same runs as the start-up result, as in the pattern README: the vLLM start-up memory check stopped 15 of 45 upstream starts and none of 11 Eugo starts. --- content/patterns/vllm-ray-inference-server/_index.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/patterns/vllm-ray-inference-server/_index.adoc b/content/patterns/vllm-ray-inference-server/_index.adoc index aa92eae55..db675bf12 100644 --- a/content/patterns/vllm-ray-inference-server/_index.adoc +++ b/content/patterns/vllm-ray-inference-server/_index.adoc @@ -101,7 +101,7 @@ No image comparison has run on {ocp} yet, and neither autoscaler has added a rea Eugo measured its next vLLM test build (release pending) against the upstream `vllm/vllm-openai` v0.33.0 image on one NVIDIA DGX Spark that other jobs kept busy, in paired rounds with an exact sign test. * *Time for a new server to serve.* With Qwen2.5-0.5B-Instruct in plain `vllm serve` containers, the software caches empty and the model files already in memory, a new Eugo server served its first token sooner than the upstream image in every paired round with each of three upstream attention settings: a median of 10.9 seconds (18%) sooner with FlashInfer and its TRT-LLM attention turned off (11 of 11 rounds), 12.0 seconds (20%) sooner with `--attention-backend TRITON_ATTN` (9 of 9), and 16.4 seconds (25%) sooner with `--attention-backend FLASHINFER` (10 of 10), with p = 0.004 or lower after Holm's correction. Both sides loaded the weights eagerly, and the Eugo build chose its attention kernel itself. -* *Starts that succeed first time.* The vLLM start-up memory check stopped 4 of 12 upstream starts and none of 28 Eugo starts. Eugo's vLLM carries a fix that mitigates this. +* *Starts that succeed first time.* The vLLM start-up memory check stopped 15 of 45 upstream starts and none of 11 Eugo starts. Eugo's vLLM carries a fix that mitigates this. For details, see the link:https://github.com/eugo-inc/vllm-ray-inference-server#partner-results-eugo[Partner results: Eugo] section of the pattern README. From b0f0fa1d7ddad1e7c3985a98317ed04368340d9f Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 18 Nov 2026 08:32:14 +0000 Subject: [PATCH 13/15] docs(vllm-ray-inference-server): give the Eugo partner results as one table against upstream as shipped and tuned The partner section now names the measured build as Eugo's next release build and says what it runs, how the starts ran and which settings were not the defaults. One table gives the start-up results against upstream vLLM 0.33.0 as shipped (plain vllm serve with eager weight loading, plain vllm serve with vLLM's default weight loading, and this pattern's Ray Serve LLM server) and tuned with three attention settings. The section counts first tries in the tuned runs and in the run with only the 12% GPU memory setting, says why time per output token is a tie, and points to the pattern README for the settings of each run and what is not yet measured. --- .../vllm-ray-inference-server/_index.adoc | 44 +++++++++++++++++-- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/content/patterns/vllm-ray-inference-server/_index.adoc b/content/patterns/vllm-ray-inference-server/_index.adoc index db675bf12..e343be29f 100644 --- a/content/patterns/vllm-ray-inference-server/_index.adoc +++ b/content/patterns/vllm-ray-inference-server/_index.adoc @@ -98,12 +98,48 @@ No image comparison has run on {ocp} yet, and neither autoscaler has added a rea [id="partner-results-vllm-ray"] == Partner results: Eugo -Eugo measured its next vLLM test build (release pending) against the upstream `vllm/vllm-openai` v0.33.0 image on one NVIDIA DGX Spark that other jobs kept busy, in paired rounds with an exact sign test. +Eugo measured its next release build against the upstream `vllm/vllm-openai` v0.33.0 image, with Qwen2.5-0.5B-Instruct on one NVIDIA DGX Spark that other jobs kept busy, in Docker containers, not on {ocp}. The Eugo build runs a vLLM development snapshot taken after 0.33.0 branched off, plus Eugo's fixes. Every start was a new container with empty compile caches, with the model files already in memory and the image already on the machine. Both sides got the same settings apart from the attention setting that the table names. Some of those settings were not the defaults: every run in the table gave vLLM 12% of GPU memory (vLLM's default is 92%, this pattern's 85%), and in the rows that name `--safetensors-load-strategy eager`, both sides used it in place of vLLM's default weight loading. Each lead is the median of the differences over paired rounds. -* *Time for a new server to serve.* With Qwen2.5-0.5B-Instruct in plain `vllm serve` containers, the software caches empty and the model files already in memory, a new Eugo server served its first token sooner than the upstream image in every paired round with each of three upstream attention settings: a median of 10.9 seconds (18%) sooner with FlashInfer and its TRT-LLM attention turned off (11 of 11 rounds), 12.0 seconds (20%) sooner with `--attention-backend TRITON_ATTN` (9 of 9), and 16.4 seconds (25%) sooner with `--attention-backend FLASHINFER` (10 of 10), with p = 0.004 or lower after Holm's correction. Both sides loaded the weights eagerly, and the Eugo build chose its attention kernel itself. -* *Starts that succeed first time.* The vLLM start-up memory check stopped 15 of 45 upstream starts and none of 11 Eugo starts. Eugo's vLLM carries a fix that mitigates this. +[cols="3,3,3,2",options="header"] +|=== +|Against upstream vLLM 0.33.0 |How the servers ran |Eugo sooner by (median) |Eugo sooner in -For details, see the link:https://github.com/eugo-inc/vllm-ray-inference-server#partner-results-eugo[Partner results: Eugo] section of the pattern README. +|As shipped, with no attention setting on either side +|Plain `vllm serve`, both sides with `--safetensors-load-strategy eager`, to the first streamed token +|90.9 seconds (65%); upstream took 2.9 times as long +|10 of 10 rounds + +|As shipped, with only the 12% GPU memory setting +|Plain `vllm serve`, both sides with vLLM's default weight loading, to the first streamed token +|169.5 seconds (77%); upstream took 4.5 times as long +|12 of 12 rounds + +|As shipped +|This pattern's Ray Serve LLM server, both sides with vLLM's default weight loading, to the first answer +|19.7 seconds (8%) +|8 of 8 rounds + +|Tuned with `--attention-backend FLASHINFER` and TRT-LLM attention turned off +|Plain `vllm serve`, both sides with `--safetensors-load-strategy eager`, to the first streamed token +|10.9 seconds (18%) +|11 of 11 rounds + +|Tuned with `--attention-backend TRITON_ATTN` +|Plain `vllm serve`, both sides with `--safetensors-load-strategy eager`, to the first streamed token +|12.0 seconds (20%) +|9 of 9 rounds + +|Tuned with `--attention-backend FLASHINFER` +|Plain `vllm serve`, both sides with `--safetensors-load-strategy eager`, to the first streamed token +|16.4 seconds (25%) +|10 of 10 rounds +|=== + +In the tuned runs, the vLLM start-up memory check stopped 12 of 33 upstream first tries and none of 11 Eugo first tries; in the run with only the 12% GPU memory setting, every upstream and Eugo start succeeded on its first try (12 of 12 starts each). + +Against upstream as shipped, the time per output token was a tie, at one stream through this pattern's server, in a short check. Most of that time is set by the hardware: at one stream, each output token needs all of the model's weights, about 0.99 GB, read from memory, which at the NVIDIA DGX Spark's published memory bandwidth of 273 GB/s takes at least 3.6 ms of the measured 5.8 ms per token for both servers. The rest depends on the software and on how much of that bandwidth the GPU reaches; in this check both servers used FlashAttention-2 for attention. + +For the settings that each run used and what is not yet measured, see the link:https://github.com/eugo-inc/vllm-ray-inference-server#partner-results-eugo[Partner results: Eugo] section of the pattern README. [id="support-vllm-ray"] == Support From 2ce23d4e714aa04e04c9c493ada948fe41f9a824 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 23 Nov 2026 15:16:33 +0000 Subject: [PATCH 14/15] docs(vllm-ray-inference-server): update the Eugo partner results, the OpenShift test runs and the GPU operators' reuse setting --- .../vllm-ray-inference-server/_index.adoc | 38 +++++++++---------- .../getting-started.adoc | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/content/patterns/vllm-ray-inference-server/_index.adoc b/content/patterns/vllm-ray-inference-server/_index.adoc index e343be29f..af9627ddf 100644 --- a/content/patterns/vllm-ray-inference-server/_index.adoc +++ b/content/patterns/vllm-ray-inference-server/_index.adoc @@ -39,7 +39,7 @@ On {AWS}, the default installation creates one billable GPU instance: a `g6.2xla [id="background-vllm-ray"] == Background -The {vllm-ray-pattern} does not replace the Red{nbsp}Hat AI products, such as {rhoai}, and it does not integrate with them. The pattern is a small, community-maintained reference point: the upstream vLLM engine on Ray Serve, built from known versions and measured the same way each time. The pattern does not need a {rhoai} subscription. +The {vllm-ray-pattern} complements the Red{nbsp}Hat AI products, such as {rhoai}. The pattern is a small, community-maintained reference point: the upstream vLLM engine on Ray Serve, built from known versions and measured the same way each time. The pattern does not need a {rhoai} subscription. Your fork of the pattern repository describes the whole deployment: GPU enablement, the server, a model cache, a secret for gated models, and a timing notebook. You run the `./pattern.sh make install` command one time. After that, {rh-gitops} syncs each commit on your branch. It does not delete the objects that a commit removes, and it does not change the image of the running server or notebook. A job in the cluster starts new image builds: every 10 minutes, it starts a build when the server or notebook folder changed and no build of that image is running. For details, see link:https://github.com/eugo-inc/vllm-ray-inference-server/blob/main/AGENTS.md#updating-a-running-install[Updating a running install] in the pattern repository. @@ -49,7 +49,7 @@ The notebook measures the server in your cluster: the time from pod start to `Re The server runs Ray Serve LLM and the vLLM engine in one pod of a standard deployment, without KServe or KubeRay. Ray, vLLM, and PyTorch come from PyPI and run on the NVIDIA CUDA image that is based on Red{nbsp}Hat Universal Base Image 9. The pattern creates no KServe `InferenceService` or `ServingRuntime` resource. -The pattern installs the {rh-nfd} and the NVIDIA GPU Operator itself. On a cluster that already runs these Operators, the pattern can conflict with them, and the pattern has not been tested on a cluster that runs {rhoai}. Install the pattern on a cluster that does not run these Operators. +By default, the pattern installs the {rh-nfd} and the NVIDIA GPU Operator itself, and on a cluster that already runs these Operators, the pattern can conflict with them. On such a cluster, set `global.gpuOperators: reuse` before you install: the pattern then uses the cluster's own Operators and does not change them. For what the cluster's Operators must provide, see link:https://github.com/eugo-inc/vllm-ray-inference-server#reuse-the-clusters-gpu-operators[Reuse the cluster's GPU operators] in the pattern README. The reuse setting has run on one test cluster so far. The pattern has not been tested on a cluster that runs {rhoai}. [id="architecture-vllm-ray"] == Architecture @@ -74,8 +74,8 @@ The pattern deploys the following Operators: * {rh-gitops} * The {validated-patterns-op}, a community Operator * The {eso-op} for Red{nbsp}Hat OpenShift -* The {rh-nfd} -* The NVIDIA GPU Operator, from the certified Operators catalog +* The {rh-nfd}, by default. With `global.gpuOperators: reuse`, the pattern uses the cluster's own instead. +* The NVIDIA GPU Operator, from the certified Operators catalog, by default. With `global.gpuOperators: reuse`, the pattern uses the cluster's own instead. The pattern deploys the following applications: @@ -90,15 +90,15 @@ The link:https://github.com/eugo-inc/vllm-ray-inference-server#what-is-in-the-st The pattern has two optional features, and both are off by default: -* *Image comparison.* A job in the cluster runs two server images through the same benchmark, on the same GPU, with the same model and requests. The job records the time to ready, the time to first answer, and, at each load level, the time to first token, the inter-token latency, the output tokens per second, and the output tokens per joule of GPU energy. Each round also starts an identical copy of each image. A rule that is fixed before the first launch counts a difference between the images only when it is larger than the gap between two starts of one image and significant in an exact sign test over the paired rounds. Each case ends with a verdict, such as FASTER, SLOWER, or TIE, or with NO VERDICT and a reason. A run scales the inference server to zero pods for its whole length. -* *Scale out.* Ray Serve can add vLLM replicas inside the server pod. With `global.scaleOut.mode: keda`, the Red{nbsp}Hat Custom Metrics Autoscaler, the supported build of KEDA, adds whole server pods when the vLLM count of waiting requests per pod rises above a set limit, and removes them after a cooldown. The image comparison also has a scale-out mode: at a fixed request rate, it starts a second replica of each image at a fixed time, and measures how soon that replica gives its first answer and what share of the requests meets the latency goals. For now, this mode runs only with Docker on one machine, not in the cluster. +* *Image comparison.* A job in the cluster runs two server images through the same benchmark, on the same GPU, with the same model and requests. The job records the time to ready, the time to first answer, and, at each load level, the time to first token, the inter-token latency, the output tokens per second, and the output tokens per joule of GPU energy. Each round also starts an identical copy of each image. A rule that is fixed before the first launch counts a difference between the images only when it is larger than the gap between two starts of one image and significant in an exact sign test over the paired rounds. The sign test, Holm's correction, and the calculation of the fewest rounds that a verdict needs come from link:https://github.com/eugo-inc/pairbench[pairbench] 0.1.0, an open source Python package from Eugo that the pattern installs unmodified from PyPI with pinned hashes. Each case ends with a verdict, such as FASTER, SLOWER, or TIE, or with NO VERDICT and a reason. A run scales the inference server to zero pods for its whole length. +* *Scale out.* Ray Serve can add vLLM replicas inside the server pod. With `global.scaleOut.mode: keda`, the Red{nbsp}Hat Custom Metrics Autoscaler, the supported build of KEDA, adds whole server pods when the vLLM count of waiting requests per pod rises above a set limit, and removes them after a cooldown. The image comparison also has a scale-out mode: at a fixed request rate, it starts a second replica of each image at a fixed time, and measures how soon that replica gives its first answer and what share of the requests meets the latency goals. This mode runs either with Docker on one machine or as the job in the cluster. -No image comparison has run on {ocp} yet, and neither autoscaler has added a real vLLM replica or pod yet. For the settings, the steps, and what has not been checked, see the link:https://github.com/eugo-inc/vllm-ray-inference-server#compare-two-images[Compare two images] and link:https://github.com/eugo-inc/vllm-ray-inference-server#scale-out[Scale out] sections of the pattern README. +On {ocp}, the image comparison has had one full-length run with the default settings, and both autoscalers only short test runs, on new clusters on AWS, each with one NVIDIA L4 GPU. The full-length run compared upstream vLLM 0.33.0 with the pattern's own server (vLLM 0.29.0 on Ray Serve LLM) and gave verdicts on all 4 of its primary cases. Upstream vLLM 0.33.0 came out ahead in all 4. The two sides differ in both vLLM version and serving stack, so the run does not say which of the two made the difference. That run's cluster already ran the {rh-nfd} and the NVIDIA GPU Operator, and the pattern reused them through the `global.gpuOperators: reuse` setting, which is now on the pattern's `main` branch. Shorter comparisons, also in the scale-out mode, finished every launch, and each autoscaler added a second vLLM replica or pod under load. For the settings, the steps, and what has not been checked, see the link:https://github.com/eugo-inc/vllm-ray-inference-server#compare-two-images[Compare two images] and link:https://github.com/eugo-inc/vllm-ray-inference-server#scale-out[Scale out] sections of the pattern README. [id="partner-results-vllm-ray"] == Partner results: Eugo -Eugo measured its next release build against the upstream `vllm/vllm-openai` v0.33.0 image, with Qwen2.5-0.5B-Instruct on one NVIDIA DGX Spark that other jobs kept busy, in Docker containers, not on {ocp}. The Eugo build runs a vLLM development snapshot taken after 0.33.0 branched off, plus Eugo's fixes. Every start was a new container with empty compile caches, with the model files already in memory and the image already on the machine. Both sides got the same settings apart from the attention setting that the table names. Some of those settings were not the defaults: every run in the table gave vLLM 12% of GPU memory (vLLM's default is 92%, this pattern's 85%), and in the rows that name `--safetensors-load-strategy eager`, both sides used it in place of vLLM's default weight loading. Each lead is the median of the differences over paired rounds. +Eugo measured its next release build against the upstream `vllm/vllm-openai` v0.33.0 image, with Qwen2.5-0.5B-Instruct on one NVIDIA DGX Spark shared with other jobs, in Docker containers, not on {ocp}. The Eugo build runs a vLLM development snapshot taken after 0.33.0 branched off, plus Eugo's fixes. Every start was a new container with empty compile caches, with the model files already in memory and the image already on the machine. Both sides got the same settings apart from the attention setting that the table names. Some of those settings were not the defaults. Every run in the table gave vLLM 12% of GPU memory (vLLM's default is 92%, this pattern's 85%), because the NVIDIA DGX Spark's GPU shares its memory with the CPU and with those other jobs. In the rows that name `--safetensors-load-strategy eager`, both sides used it in place of vLLM's default weight loading. Each lead is the median of the differences over paired rounds. [cols="3,3,3,2",options="header"] |=== @@ -106,36 +106,36 @@ Eugo measured its next release build against the upstream `vllm/vllm-openai` v0. |As shipped, with no attention setting on either side |Plain `vllm serve`, both sides with `--safetensors-load-strategy eager`, to the first streamed token -|90.9 seconds (65%); upstream took 2.9 times as long -|10 of 10 rounds +|93.6 seconds (71%); median starts 131.3 seconds and 36.2 seconds, so upstream's took 3.6 times as long +|12 of 12 rounds |As shipped, with only the 12% GPU memory setting |Plain `vllm serve`, both sides with vLLM's default weight loading, to the first streamed token -|169.5 seconds (77%); upstream took 4.5 times as long +|169.5 seconds (77%); median starts 219.4 seconds and 48.4 seconds, so upstream's took 4.5 times as long |12 of 12 rounds |As shipped |This pattern's Ray Serve LLM server, both sides with vLLM's default weight loading, to the first answer -|19.7 seconds (8%) +|159.8 seconds (70%). Upstream's engine was started again in 1 of its 17 launches (Eugo's in none), after vLLM's start-up memory check had stopped it; that launch, in round 1, is one the results count. |8 of 8 rounds |Tuned with `--attention-backend FLASHINFER` and TRT-LLM attention turned off |Plain `vllm serve`, both sides with `--safetensors-load-strategy eager`, to the first streamed token -|10.9 seconds (18%) -|11 of 11 rounds +|10.8 seconds (21%) +|12 of 12 rounds |Tuned with `--attention-backend TRITON_ATTN` |Plain `vllm serve`, both sides with `--safetensors-load-strategy eager`, to the first streamed token -|12.0 seconds (20%) -|9 of 9 rounds +|14.1 seconds (28%) +|12 of 12 rounds |Tuned with `--attention-backend FLASHINFER` |Plain `vllm serve`, both sides with `--safetensors-load-strategy eager`, to the first streamed token -|16.4 seconds (25%) -|10 of 10 rounds +|17.5 seconds (30%) +|12 of 12 rounds |=== -In the tuned runs, the vLLM start-up memory check stopped 12 of 33 upstream first tries and none of 11 Eugo first tries; in the run with only the 12% GPU memory setting, every upstream and Eugo start succeeded on its first try (12 of 12 starts each). +In the tuned runs, the vLLM start-up memory check stopped 2 of 36 upstream first tries and none of 12 Eugo first tries, too few to show a difference by Fisher's exact test. In the run with only the 12% GPU memory setting, every upstream and Eugo start succeeded on its first try (12 of 12 starts each). Against upstream as shipped, the time per output token was a tie, at one stream through this pattern's server, in a short check. Most of that time is set by the hardware: at one stream, each output token needs all of the model's weights, about 0.99 GB, read from memory, which at the NVIDIA DGX Spark's published memory bandwidth of 273 GB/s takes at least 3.6 ms of the measured 5.8 ms per token for both servers. The rest depends on the software and on how much of that bandwidth the GPU reaches; in this check both servers used FlashAttention-2 for attention. diff --git a/content/patterns/vllm-ray-inference-server/getting-started.adoc b/content/patterns/vllm-ray-inference-server/getting-started.adoc index ff220e8a6..2b58af8ca 100644 --- a/content/patterns/vllm-ray-inference-server/getting-started.adoc +++ b/content/patterns/vllm-ray-inference-server/getting-started.adoc @@ -18,7 +18,7 @@ You deploy the pattern from your own fork of the pattern repository. {rh-gitops} .Prerequisites * An {ocp} 4.18 or later cluster, and cluster administrator access. To create a cluster, go to the link:https://console.redhat.com/[{hybrid-console-first}] and select *Services -> Containers -> Create cluster*. -* A cluster that does not already run the {rh-nfd} or the NVIDIA GPU Operator. The pattern installs both Operators itself, with its own `OperatorGroup` objects and settings, and can conflict with existing installations of these Operators. The pattern has not been tested on a cluster that runs {rhoai}. +* By default, a cluster that does not already run the {rh-nfd} or the NVIDIA GPU Operator. The pattern installs both Operators itself, with its own `OperatorGroup` objects and settings, and can conflict with existing installations of these Operators. On a cluster that already runs both Operators, set `global.gpuOperators: reuse` in the `values-global.yaml` file before you install. The pattern then uses the cluster's own Operators and does not change them. For what these Operators must provide, see link:https://github.com/eugo-inc/vllm-ray-inference-server#reuse-the-clusters-gpu-operators[Reuse the cluster's GPU operators] in the pattern README. The reuse setting has run on one test cluster so far. The pattern has not been tested on a cluster that runs {rhoai}. * A storage class that provisions persistent volumes dynamically. The model cache uses one persistent volume claim. * The {ocp-registry} in the `Managed` state, and the `Build` and `ImageRegistry` cluster capabilities enabled. The cluster builds the server image and the notebook image itself. On bare metal and on vSphere, the registry starts in the `Removed` state. To check the registry state, run the following command: + From 9403969b244e3057562cebb88c8b8ce94c475828 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 30 Nov 2026 17:10:32 +0000 Subject: [PATCH 15/15] docs(patterns): answer the review of the vLLM Ray Inference Server pages Background now opens with the question the pattern answers and covers the problem, how the pattern avoids it, why teams need it and where it fits, and the benefits of the design decisions. New Architecture, Cluster sizing, Ideas for customization, Troubleshooting and Partner results pages. The AWS cost warning uses the reviewer's text. Getting started checks for existing GPU Operators right after login, and its prerequisites are reminders that link to Cluster sizing. --- .../vllm-ray-inference-server/_index.adoc | 172 +++++++++------- .../architecture.adoc | 66 ++++++ .../cluster-sizing.adoc | 140 +++++++++++++ .../getting-started.adoc | 79 ++++--- .../ideas-for-customization.adoc | 160 +++++++++++++++ .../partner-results.adoc | 63 ++++++ .../troubleshooting.adoc | 192 ++++++++++++++++++ 7 files changed, 773 insertions(+), 99 deletions(-) create mode 100644 content/patterns/vllm-ray-inference-server/architecture.adoc create mode 100644 content/patterns/vllm-ray-inference-server/cluster-sizing.adoc create mode 100644 content/patterns/vllm-ray-inference-server/ideas-for-customization.adoc create mode 100644 content/patterns/vllm-ray-inference-server/partner-results.adoc create mode 100644 content/patterns/vllm-ray-inference-server/troubleshooting.adoc diff --git a/content/patterns/vllm-ray-inference-server/_index.adoc b/content/patterns/vllm-ray-inference-server/_index.adoc index af9627ddf..4b12b2b89 100644 --- a/content/patterns/vllm-ray-inference-server/_index.adoc +++ b/content/patterns/vllm-ray-inference-server/_index.adoc @@ -2,7 +2,7 @@ title: vLLM Ray Inference Server date: 2026-11-08 tier: sandbox -summary: This pattern deploys an OpenAI-compatible large language model (LLM) server that runs vLLM on Ray Serve with one GPU, built inside the cluster from upstream packages and managed by OpenShift GitOps. +summary: This pattern deploys a large language model (LLM) server on OpenShift and a notebook that benchmarks it on your own GPU, the same way every time, so that you can size GPUs and judge an upgrade from your own measurements. An optional comparison tells real speed changes from run-to-run noise. rh_products: - Red Hat OpenShift Container Platform - Red Hat OpenShift GitOps @@ -29,124 +29,146 @@ include::modules/comm-attributes.adoc[] [id="about-vllm-ray-inference-server-pattern"] = About the {vllm-ray-pattern} -The {vllm-ray-pattern} deploys a private, OpenAI-compatible large language model (LLM) endpoint on {rh-ocp}. {rh-gitops} deploys every component from your fork of the pattern repository, and the cluster builds the server image itself from upstream packages. Eugo maintains the pattern as community content in the {sandbox-tier-first}. +The {vllm-ray-pattern} answers one question: is your LLM server fast enough, and does a change make it faster or slower, measured on your own GPU in a way that you can trust? It helps you decide how many GPUs to buy, and whether a new release or setting is faster, from your own measurements instead of someone else's benchmark. The pattern deploys a private large language model (LLM) server on {rh-ocp}, and a notebook that measures it. The notebook reports two measures for one GPU, at 1, 8, and 32 concurrent requests, which are requests that the server serves at the same time: + +* Throughput: the tokens per second that the server produces. A token is a word or a piece of a word. +* Time to first token: how long a user waits for the start of an answer. + +Compared with the load that you expect, these give a starting estimate of how many GPUs you need. For this estimate, serve the model that you plan to use, as link:/patterns/vllm-ray-inference-server/ideas-for-customization/#changing-the-model-vllm-ray[Serving a different model] describes, because the default model is a small one. + +On {AWS}, you can measure on a cloud GPU instance before you buy GPUs; by default, the pattern creates one with an NVIDIA L4 GPU. The server is OpenAI-compatible: it uses the request format of the OpenAI API, so clients written for that API work with it. Eugo maintains the pattern as community content in the {sandbox-tier-first}. [WARNING] ==== -On {AWS}, the default installation creates one billable GPU instance: a `g6.2xlarge` instance with one NVIDIA L4 GPU. AWS bills the instance for as long as it runs. To skip the instance, set `global.gpuMachineSet: none` in the `values-global.yaml` file in your fork, and push the change before you install the pattern. On other platforms, the pattern creates no instance. Uninstalling the pattern does not delete the instance. For the steps to delete it, see link:getting-started/#uninstalling-the-vllm-ray-pattern[Uninstalling the pattern]. +On {AWS}, the default installation creates a billable GPU instance (one `g6.2xlarge` instance with one NVIDIA L4 GPU). AWS only bills for this instance while it is running. However, be aware that uninstalling the pattern does not delete the instance. To delete the instance, see link:/patterns/vllm-ray-inference-server/getting-started/#uninstalling-the-vllm-ray-pattern[Uninstalling the pattern]. + +The pattern does not create instances on other platforms. ==== [id="background-vllm-ray"] == Background -The {vllm-ray-pattern} complements the Red{nbsp}Hat AI products, such as {rhoai}. The pattern is a small, community-maintained reference point: the upstream vLLM engine on Ray Serve, built from known versions and measured the same way each time. The pattern does not need a {rhoai} subscription. +The {vllm-ray-pattern} is for teams that serve a large language model on their own {ocp} cluster, and for teams that plan to and are choosing GPUs, not only for teams that already run vLLM. vLLM is an open source engine that runs large language models on GPUs efficiently. Ray Serve LLM is the serving layer from the open source Ray project for large language models, which runs vLLM, scales the number of vLLM replicas, and serves an OpenAI-compatible API. The pattern installs with one command, through {rh-gitops}. -Your fork of the pattern repository describes the whole deployment: GPU enablement, the server, a model cache, a secret for gated models, and a timing notebook. You run the `./pattern.sh make install` command one time. After that, {rh-gitops} syncs each commit on your branch. It does not delete the objects that a commit removes, and it does not change the image of the running server or notebook. A job in the cluster starts new image builds: every 10 minutes, it starts a build when the server or notebook folder changed and no build of that image is running. For details, see link:https://github.com/eugo-inc/vllm-ray-inference-server/blob/main/AGENTS.md#updating-a-running-install[Updating a running install] in the pattern repository. +[id="problem-vllm-ray"] +=== The problem -The pattern pins every Python package by hash and installs wheels only. It pins the base images of the server and the notebook by digest, and the default model by its Hugging Face commit. Some parts are not pinned, among them the system packages that the server image installs with `dnf`, the Operator versions, and the patch versions of the Validated Patterns Helm charts. Two builds from the same commit therefore install the same Python packages, but their system packages can differ. +Every team that serves an LLM has to answer the same question, again and again: is this server fast enough, and does a change make it faster or slower? Most teams cannot answer it with numbers that they can trust, because their numbers come from someone else's hardware, or change from one run to the next: -The notebook measures the server in your cluster: the time from pod start to `Ready`, the time to first token, the decode speed of one stream, and the token throughput at 1, 8, and 32 concurrent requests. The notebook chooses its prompts from a fixed seed, and every request uses a temperature of 0 and a fixed number of output tokens. The time to `Ready` is in whole seconds and can trail the server by up to about 2 seconds. +* *Before buying GPUs:* the only numbers available are published benchmarks, measured on other hardware with other models. Teams that size from them can buy too few GPUs, so their users get slow answers, or too many, so GPUs sit idle and still cost money. +* *Before an upgrade or a settings change:* teams time one run before the change and one run after. Two starts of the same server can differ in speed, so this comparison cannot tell a real improvement from noise. A slower release can reach users, or a real gain can be held back. +* *After an incident:* a server image that installs the newest packages changes with every build. When the server gets slower, nobody can say whether the cause was their own change or a package that changed with the build. -The server runs Ray Serve LLM and the vLLM engine in one pod of a standard deployment, without KServe or KubeRay. Ray, vLLM, and PyTorch come from PyPI and run on the NVIDIA CUDA image that is based on Red{nbsp}Hat Universal Base Image 9. The pattern creates no KServe `InferenceService` or `ServingRuntime` resource. +[id="how-pattern-avoids-vllm-ray"] +=== How the pattern avoids it -By default, the pattern installs the {rh-nfd} and the NVIDIA GPU Operator itself, and on a cluster that already runs these Operators, the pattern can conflict with them. On such a cluster, set `global.gpuOperators: reuse` before you install: the pattern then uses the cluster's own Operators and does not change them. For what the cluster's Operators must provide, see link:https://github.com/eugo-inc/vllm-ray-inference-server#reuse-the-clusters-gpu-operators[Reuse the cluster's GPU operators] in the pattern README. The reuse setting has run on one test cluster so far. The pattern has not been tested on a cluster that runs {rhoai}. +The pattern gives one fix for each cause: -[id="architecture-vllm-ray"] -== Architecture +. *Numbers from your own hardware:* the notebook benchmarks the server on your own GPU, with the same requests every time. It reports throughput and time to first token at 1, 8, and 32 concurrent requests, which gives a starting estimate of how many GPUs you need. +. *A reproducible build:* the server image installs every Python package link:/patterns/vllm-ray-inference-server/architecture/#pinned-versions-vllm-ray[pinned by hash], so a rebuild installs the same Python packages. They change only with a commit, which can be reviewed after an incident. +. *A comparison that accounts for noise:* an link:/patterns/vllm-ray-inference-server/ideas-for-customization/#comparing-images-vllm-ray[optional comparison] runs two server images or settings, such as your current one and a candidate, in repeated rounds next to identical copies. It reports a difference only when the difference is larger than the noise between starts and passes a statistical test. -.Architecture of the {vllm-ray-pattern} -image::/images/vllm-ray-inference-server/architecture.svg[Diagram of the vLLM Ray Inference Server pattern. The Validated Patterns Operator and OpenShift GitOps deploy secrets management, GPU enablement, the inference server, and the notebook from your Git fork.] +[id="alternatives-vllm-ray"] +=== Why teams need it, and where it fits -The pattern works in the following way: +Teams need repeatable numbers from their own server on their own GPU, separated from the noise between starts. The alternatives each miss part of this: -* The {validated-patterns-op} installs {rh-gitops} and points the Argo CD instance at your fork. The `clustergroup` Helm chart then creates every application that the `prod` variant lists. -* {hashicorp-vault} and the {eso-op} deliver an optional Hugging Face token to the server as a Kubernetes secret. The default model is not gated and needs no token. -* The {rh-nfd} and the NVIDIA GPU Operator prepare the GPU node. On AWS, an imperative job creates the GPU node. -* A `BuildConfig` object builds the server image inside the cluster. The server deployment runs one pod with a Ray head, Ray Serve, and the vLLM engine on one GPU. The pod reports `Ready` only after the model loads. -* A persistent volume claim keeps the model weights across pod restarts. -* A JupyterLab notebook runs behind the OpenShift OAuth proxy. Only users who can edit the `vllm-notebook` namespace can open it. The notebook sends requests to the server through the in-cluster service. +* Published benchmarks come from other hardware. +* Timing a server by hand, for example with one run of GuideLLM, a benchmark tool for LLM servers, measures one server start, so it cannot tell a real change from noise. The optional comparison runs GuideLLM across repeated starts and tests the results. -[id="components-vllm-ray"] -== Components that the pattern deploys +The pattern is a reference point for what open source vLLM and Ray do on your own GPU, measured the same way each time. It complements link:https://www.redhat.com/en/products/ai/inference[Red{nbsp}Hat AI Inference] and {rhoai}, which remain the supported servers. -The pattern deploys the following Operators: +[id="design-decisions-vllm-ray"] +=== Benefits of the design decisions -* {rh-gitops} -* The {validated-patterns-op}, a community Operator -* The {eso-op} for Red{nbsp}Hat OpenShift -* The {rh-nfd}, by default. With `global.gpuOperators: reuse`, the pattern uses the cluster's own instead. -* The NVIDIA GPU Operator, from the certified Operators catalog, by default. With `global.gpuOperators: reuse`, the pattern uses the cluster's own instead. +* *Ray Serve LLM.* Unlike `vllm serve`, vLLM's own server, it can add vLLM replicas, copies of the engine, under load when given enough GPUs. Adding replicas is off by default. +* *Upstream packages only.* Instead of a vendor's build, the image uses the vLLM, Ray, and PyTorch projects' releases, so results apply to what anyone can install. +* *One Git repository.* Instead of a hand-built server, your fork describes the whole deployment, so every change can be reviewed. +* *One pod.* Instead of KServe, a model-serving platform for Kubernetes, or KubeRay, an Operator that runs Ray clusters on Kubernetes, the server is one standard pod, with nothing more to install. It does not serve one model across several machines; {rhoai} offers KubeRay for that. -The pattern deploys the following applications: +[id="architecture-vllm-ray"] +== Architecture -* {hashicorp-vault}, from the {solution-name-upstream} Helm chart. -* The inference server. Ray Serve LLM runs the vLLM engine and serves an OpenAI-compatible API on port 8000. The default model is `Qwen/Qwen2.5-0.5B-Instruct`. The server image turns off the usage statistics of Ray and vLLM. -* The notebook. A JupyterLab notebook measures the running server: the time from pod start to `Ready`, the time to first token, the decode speed of one stream, and the token throughput at several concurrency levels. +.Architecture of the {vllm-ray-pattern} +image::/images/vllm-ray-inference-server/architecture.svg[Diagram of the vLLM Ray Inference Server pattern. The Validated Patterns Operator and OpenShift GitOps deploy secrets management, GPU enablement, the inference server, and the notebook from your Git fork.] -The link:https://github.com/eugo-inc/vllm-ray-inference-server#what-is-in-the-stock-stack[pattern README] lists the exact version of each component. +* The {validated-patterns-op} installs {rh-gitops} and points its Argo CD instance, the GitOps tool that applies the content of a Git repository to the cluster, at your fork. +* {hashicorp-vault} and the {eso-op} deliver an optional Hugging Face token to the server as a Kubernetes secret. Only a gated model, which Hugging Face lets you download only after you accept its conditions, needs the token. The default model is not gated. +* The {rh-nfd} and the NVIDIA GPU Operator prepare the GPU node, which a job of the pattern creates on AWS. +* A `BuildConfig` object builds the server image inside the cluster. The server deployment runs one pod with Ray Serve LLM and the vLLM engine on one GPU. +* A persistent volume claim keeps the model weights across pod restarts. +* A JupyterLab notebook runs behind the OpenShift OAuth proxy and sends requests to the server through the in-cluster service. -[id="compare-scale-out-vllm-ray"] -== Image comparison and scale out +For details, see link:/patterns/vllm-ray-inference-server/architecture/[Architecture]. -The pattern has two optional features, and both are off by default: +[id="requirements-vllm-ray"] +== Requirements -* *Image comparison.* A job in the cluster runs two server images through the same benchmark, on the same GPU, with the same model and requests. The job records the time to ready, the time to first answer, and, at each load level, the time to first token, the inter-token latency, the output tokens per second, and the output tokens per joule of GPU energy. Each round also starts an identical copy of each image. A rule that is fixed before the first launch counts a difference between the images only when it is larger than the gap between two starts of one image and significant in an exact sign test over the paired rounds. The sign test, Holm's correction, and the calculation of the fewest rounds that a verdict needs come from link:https://github.com/eugo-inc/pairbench[pairbench] 0.1.0, an open source Python package from Eugo that the pattern installs unmodified from PyPI with pinned hashes. Each case ends with a verdict, such as FASTER, SLOWER, or TIE, or with NO VERDICT and a reason. A run scales the inference server to zero pods for its whole length. -* *Scale out.* Ray Serve can add vLLM replicas inside the server pod. With `global.scaleOut.mode: keda`, the Red{nbsp}Hat Custom Metrics Autoscaler, the supported build of KEDA, adds whole server pods when the vLLM count of waiting requests per pod rises above a set limit, and removes them after a cooldown. The image comparison also has a scale-out mode: at a fixed request rate, it starts a second replica of each image at a fixed time, and measures how soon that replica gives its first answer and what share of the requests meets the latency goals. This mode runs either with Docker on one machine or as the job in the cluster. +Check the following before you install. For details, see link:/patterns/vllm-ray-inference-server/cluster-sizing/[Cluster sizing]. -On {ocp}, the image comparison has had one full-length run with the default settings, and both autoscalers only short test runs, on new clusters on AWS, each with one NVIDIA L4 GPU. The full-length run compared upstream vLLM 0.33.0 with the pattern's own server (vLLM 0.29.0 on Ray Serve LLM) and gave verdicts on all 4 of its primary cases. Upstream vLLM 0.33.0 came out ahead in all 4. The two sides differ in both vLLM version and serving stack, so the run does not say which of the two made the difference. That run's cluster already ran the {rh-nfd} and the NVIDIA GPU Operator, and the pattern reused them through the `global.gpuOperators: reuse` setting, which is now on the pattern's `main` branch. Shorter comparisons, also in the scale-out mode, finished every launch, and each autoscaler added a second vLLM replica or pod under load. For the settings, the steps, and what has not been checked, see the link:https://github.com/eugo-inc/vllm-ray-inference-server#compare-two-images[Compare two images] and link:https://github.com/eugo-inc/vllm-ray-inference-server#scale-out[Scale out] sections of the pattern README. +* {ocp} 4.18 or later, with cluster administrator access. +* One NVIDIA GPU node: +** On {AWS}, the pattern creates the GPU node. Your AWS account needs enough GPU instance quota. +** On other platforms, and on AWS clusters that were installed into existing subnets, add the GPU node yourself before you install. +** The server runs on `amd64` nodes by default. For an `arm64` GPU node, see link:/patterns/vllm-ray-inference-server/cluster-sizing/#gpu-node-requirements-vllm-ray[GPU node requirements]. +* 50 GiB of free ephemeral storage for the server image build, on a node without the `nvidia.com/gpu` taint. Ephemeral storage is the local disk space of a node for temporary files and container images. A taint keeps pods that do not tolerate it, such as the build, off the node. +* A storage class that provisions persistent volumes dynamically. +* The {ocp-registry} in the `Managed` state, and the `Build` and `ImageRegistry` cluster capabilities enabled, because the cluster builds the server and notebook images itself and stores them in this registry. +* Network access from the cluster to GitHub, PyPI, container registries, and Hugging Face, the source of the model. +* Optional: a Hugging Face token, only to serve a gated model. +* Your own fork of the pattern repository on GitHub, and Podman 4.3 or later, Git, and the `oc` CLI on your workstation. -[id="partner-results-vllm-ray"] -== Partner results: Eugo +If the cluster already runs the {rh-nfd} or the NVIDIA GPU Operator, the pattern can conflict with them. link:/patterns/vllm-ray-inference-server/getting-started/#deploying-the-vllm-ray-pattern[Getting started] checks for them before you install. -Eugo measured its next release build against the upstream `vllm/vllm-openai` v0.33.0 image, with Qwen2.5-0.5B-Instruct on one NVIDIA DGX Spark shared with other jobs, in Docker containers, not on {ocp}. The Eugo build runs a vLLM development snapshot taken after 0.33.0 branched off, plus Eugo's fixes. Every start was a new container with empty compile caches, with the model files already in memory and the image already on the machine. Both sides got the same settings apart from the attention setting that the table names. Some of those settings were not the defaults. Every run in the table gave vLLM 12% of GPU memory (vLLM's default is 92%, this pattern's 85%), because the NVIDIA DGX Spark's GPU shares its memory with the CPU and with those other jobs. In the rows that name `--safetensors-load-strategy eager`, both sides used it in place of vLLM's default weight loading. Each lead is the median of the differences over paired rounds. +[id="components-vllm-ray"] +== Technologies that the pattern uses -[cols="3,3,3,2",options="header"] -|=== -|Against upstream vLLM 0.33.0 |How the servers ran |Eugo sooner by (median) |Eugo sooner in +Of the technologies in the following lists, only {rh-ocp} must already run. The pattern installs the others, or builds them into its images. With the `global.gpuOperators: reuse` setting, which you choose in link:/patterns/vllm-ray-inference-server/getting-started/#deploying-the-vllm-ray-pattern[Getting started], it uses the cluster's own {rh-nfd} and NVIDIA GPU Operator instead. -|As shipped, with no attention setting on either side -|Plain `vllm serve`, both sides with `--safetensors-load-strategy eager`, to the first streamed token -|93.6 seconds (71%); median starts 131.3 seconds and 36.2 seconds, so upstream's took 3.6 times as long -|12 of 12 rounds +[id="red-hat-technologies-vllm-ray"] +=== Red Hat technologies -|As shipped, with only the 12% GPU memory setting -|Plain `vllm serve`, both sides with vLLM's default weight loading, to the first streamed token -|169.5 seconds (77%); median starts 219.4 seconds and 48.4 seconds, so upstream's took 4.5 times as long -|12 of 12 rounds +* {rh-ocp}, which must already run +* {rh-gitops} +* The {eso-op} for Red{nbsp}Hat OpenShift +* The {rh-nfd} +* Optional: the Red{nbsp}Hat Custom Metrics Autoscaler, only with `global.scaleOut.mode: keda`. See link:/patterns/vllm-ray-inference-server/ideas-for-customization/#scale-out-vllm-ray[Scaling out the server under load]. -|As shipped -|This pattern's Ray Serve LLM server, both sides with vLLM's default weight loading, to the first answer -|159.8 seconds (70%). Upstream's engine was started again in 1 of its 17 launches (Eugo's in none), after vLLM's start-up memory check had stopped it; that launch, in round 1, is one the results count. -|8 of 8 rounds +[id="other-technologies-vllm-ray"] +=== Other technologies this pattern uses -|Tuned with `--attention-backend FLASHINFER` and TRT-LLM attention turned off -|Plain `vllm serve`, both sides with `--safetensors-load-strategy eager`, to the first streamed token -|10.8 seconds (21%) -|12 of 12 rounds +* The {validated-patterns-op}, a community Operator +* The NVIDIA GPU Operator, from the certified Operators catalog +* {hashicorp-vault}, from the {solution-name-upstream} Helm chart +* vLLM, Ray Serve LLM, and PyTorch, which the server image build installs from PyPI +* The NVIDIA CUDA image based on Red{nbsp}Hat Universal Base Image 9, as the base of the server image +* JupyterLab, in the notebook image +* GuideLLM, a benchmark for LLM servers, which sends the requests of the link:/patterns/vllm-ray-inference-server/ideas-for-customization/#comparing-images-vllm-ray[optional image comparison] -|Tuned with `--attention-backend TRITON_ATTN` -|Plain `vllm serve`, both sides with `--safetensors-load-strategy eager`, to the first streamed token -|14.1 seconds (28%) -|12 of 12 rounds +[id="applications-vllm-ray"] +=== Applications that the pattern deploys -|Tuned with `--attention-backend FLASHINFER` -|Plain `vllm serve`, both sides with `--safetensors-load-strategy eager`, to the first streamed token -|17.5 seconds (30%) -|12 of 12 rounds -|=== +* The inference server. Ray Serve LLM runs the vLLM engine and serves an OpenAI-compatible API on port 8000. The default model is `Qwen/Qwen2.5-0.5B-Instruct`. +* The notebook. A JupyterLab notebook measures the running server, as described in link:/patterns/vllm-ray-inference-server/architecture/#notebook-measurements-vllm-ray[How the notebook measures the server]. -In the tuned runs, the vLLM start-up memory check stopped 2 of 36 upstream first tries and none of 12 Eugo first tries, too few to show a difference by Fisher's exact test. In the run with only the 12% GPU memory setting, every upstream and Eugo start succeeded on its first try (12 of 12 starts each). +The link:https://github.com/eugo-inc/vllm-ray-inference-server#what-is-in-the-stock-stack[pattern README] lists the exact version of each component. -Against upstream as shipped, the time per output token was a tie, at one stream through this pattern's server, in a short check. Most of that time is set by the hardware: at one stream, each output token needs all of the model's weights, about 0.99 GB, read from memory, which at the NVIDIA DGX Spark's published memory bandwidth of 273 GB/s takes at least 3.6 ms of the measured 5.8 ms per token for both servers. The rest depends on the software and on how much of that bandwidth the GPU reaches; in this check both servers used FlashAttention-2 for attention. +[id="partner-results-summary-vllm-ray"] +== Partner results: Eugo -For the settings that each run used and what is not yet measured, see the link:https://github.com/eugo-inc/vllm-ray-inference-server#partner-results-eugo[Partner results: Eugo] section of the pattern README. +Eugo timed how long each server took to start and stream its first token, in Docker containers on one NVIDIA DGX Spark, not on {ocp}. As shipped, the median start of the upstream `vllm/vllm-openai` v0.33.0 image took 3.6 times as long as that of Eugo's next release build in one comparison, and 4.5 times as long in another. For the settings and the other runs, see link:/patterns/vllm-ray-inference-server/partner-results/#partner-results-vllm-ray[Partner results: Eugo]. [id="support-vllm-ray"] == Support -The {vllm-ray-pattern} is community content in the {sandbox-tier-first}. Eugo maintains the pattern and supports it on a best-effort basis through link:https://github.com/eugo-inc/vllm-ray-inference-server/issues[GitHub issues] in the pattern repository. The maintainers do not guarantee a response time. Red{nbsp}Hat does not produce, support, or validate this pattern. For an issue with a product that the pattern deploys, contact the vendor of that product. +Eugo maintains the pattern and supports it on a best-effort basis through link:https://github.com/eugo-inc/vllm-ray-inference-server/issues[GitHub issues] in the pattern repository. The maintainers do not guarantee a response time. Red{nbsp}Hat does not produce, support, or validate this pattern. For an issue with a product that the pattern deploys, contact the vendor of that product. [id="next-steps-vllm-ray"] == Next steps -* link:getting-started[Getting started] +* link:/patterns/vllm-ray-inference-server/getting-started/[Getting started] +* link:/patterns/vllm-ray-inference-server/architecture/[Architecture] +* link:/patterns/vllm-ray-inference-server/cluster-sizing/[Cluster sizing] +* link:/patterns/vllm-ray-inference-server/ideas-for-customization/[Ideas for customization] +* link:/patterns/vllm-ray-inference-server/troubleshooting/[Troubleshooting] +* link:/patterns/vllm-ray-inference-server/partner-results/[Partner results: Eugo] diff --git a/content/patterns/vllm-ray-inference-server/architecture.adoc b/content/patterns/vllm-ray-inference-server/architecture.adoc new file mode 100644 index 000000000..7af4ebbca --- /dev/null +++ b/content/patterns/vllm-ray-inference-server/architecture.adoc @@ -0,0 +1,66 @@ +--- +title: Architecture +weight: 20 +aliases: /vllm-ray-inference-server/architecture/ +--- + +:toc: +:imagesdir: /images +:_content-type: ASSEMBLY +include::modules/comm-attributes.adoc[] +:vllm-ray-pattern: vLLM Ray Inference Server pattern + +[id="architecture-details-vllm-ray"] +== How the {vllm-ray-pattern} works + +This page describes how the pattern deploys from your fork, how the inference server runs, what the pattern pins, and how the notebook measures the server. For the architecture diagram and a summary of each component, see link:/patterns/vllm-ray-inference-server/#architecture-vllm-ray[Architecture] on the pattern overview page. + +[id="terms-vllm-ray"] +=== Terms used on this page + +Token:: A word or a piece of a word. Models read and write text as tokens, so server speed is counted in tokens. +Time to first token:: How long a user waits for the first token of an answer. +Throughput:: Tokens per second that the server produces across all requests that it serves at the same time. +Pinned by hash:: A package is installed only if its file matches a recorded checksum, so every build gets the same file. +Gated model:: A Hugging Face model that you can download only with your access token, after you accept its conditions. + +[id="deploying-from-your-fork-vllm-ray"] +=== How the pattern deploys from your fork + +Your fork of the pattern repository describes the whole deployment: GPU enablement, the server, a model cache, a secret for gated models, and a timing notebook. You run the `./pattern.sh make install` command one time. The {validated-patterns-op} installs {rh-gitops} and points its Argo CD instance, the GitOps tool that applies the content of a Git repository to the cluster, at your fork. The `clustergroup` Helm chart of the {solution-name-upstream} framework then creates the namespaces, Operator subscriptions, and Argo CD applications that the `variants/prod/values-prod.yaml` file in your fork lists. After that, {rh-gitops} syncs each commit on your branch. It does not delete the objects that a commit removes, and it does not change the image of the running server or notebook. A job in the cluster starts new image builds: every 10 minutes, it starts a build when the server or notebook folder changed and no build of that image is running. For details, see link:https://github.com/eugo-inc/vllm-ray-inference-server/blob/main/AGENTS.md#updating-a-running-install[Updating a running install] in the pattern repository. + +[id="first-installation-vllm-ray"] +=== What happens during the first installation + +The first installation runs in roughly the following order: + +. The Operators install, and {hashicorp-vault-short} starts. +. On AWS, a job of the pattern, which runs every 10 minutes, creates the GPU node. The NVIDIA GPU Operator then installs the NVIDIA driver on the node. +. The cluster builds the server image. This build pulls a multi-gigabyte CUDA development image and installs several gigabytes of Python packages, so the build node needs plenty of free ephemeral storage. +. The server pod stays in the `Pending` state until a node advertises the `nvidia.com/gpu` resource. +. On its first start, the server downloads the model into the `ray-serve-llm-models` persistent volume claim, where the model stays across restarts. vLLM and FlashInfer, a library of GPU kernels for inference that vLLM uses, also compile GPU kernels, the functions that run on the GPU. The pattern does not keep these compiled kernels by default, so every new server pod compiles them again. +. The pod reports `Ready` only after the model loads. + +[id="inference-server-vllm-ray"] +=== How the inference server runs + +The server runs Ray Serve LLM and the vLLM engine in one pod of a standard deployment, without KServe or KubeRay. Ray, vLLM, and PyTorch come from PyPI and run on the NVIDIA CUDA image that is based on Red{nbsp}Hat Universal Base Image 9. The pattern creates no KServe `InferenceService` or `ServingRuntime` resource. The server image turns off the usage statistics of Ray and vLLM. + +The server deployment uses the `Recreate` strategy, because a rolling update needs a second GPU and the same `ReadWriteOnce` persistent volume claim, and with one GPU it cannot finish. As a result, the server is down during each rollout. + +[id="pinned-versions-vllm-ray"] +=== What the pattern pins + +The pattern pins every Python package by hash and installs wheels only. It pins the base images of the server and the notebook by digest, and the default model by its Hugging Face commit. Some parts are not pinned, among them the system packages that the server image installs with `dnf`, the Operator versions, and the patch versions of the Validated Patterns Helm charts. Two builds from the same commit therefore install the same Python packages, but their system packages can differ. + +[id="notebook-measurements-vllm-ray"] +=== How the notebook measures the server + +The notebook measures the server in your cluster: the time from pod start to `Ready`, the time to first token, the decode speed of one stream, which is how fast the server writes one answer, and the token throughput at 1, 8, and 32 concurrent requests. The notebook chooses its prompts from a fixed seed, and every request uses a fixed number of output tokens and a temperature of 0, so the model always picks its most likely next token. The time to `Ready` is in whole seconds and can trail the server by up to about 2 seconds. + +[id="next-steps-vllm-ray-architecture"] +== Next steps + +* link:/patterns/vllm-ray-inference-server/getting-started/[Getting started] +* link:/patterns/vllm-ray-inference-server/cluster-sizing/[Cluster sizing] +* link:/patterns/vllm-ray-inference-server/ideas-for-customization/[Ideas for customization] diff --git a/content/patterns/vllm-ray-inference-server/cluster-sizing.adoc b/content/patterns/vllm-ray-inference-server/cluster-sizing.adoc new file mode 100644 index 000000000..f1cc6e2a5 --- /dev/null +++ b/content/patterns/vllm-ray-inference-server/cluster-sizing.adoc @@ -0,0 +1,140 @@ +--- +title: Cluster sizing +weight: 30 +aliases: /vllm-ray-inference-server/cluster-sizing/ +--- + +:toc: +:imagesdir: /images +:_content-type: ASSEMBLY +include::modules/comm-attributes.adoc[] +:vllm-ray-pattern: vLLM Ray Inference Server pattern + +[id="cluster-sizing-vllm-ray"] +== Cluster sizing for the {vllm-ray-pattern} + +The pattern runs on one {ocp} cluster. The cluster needs ordinary nodes for the Operators, {hashicorp-vault-short}, the image builds, and the notebook, and one GPU node for the inference server. + +[id="tested-cluster-vllm-ray"] +=== Tested cluster + +The pattern requires {ocp} 4.18 or later. With a GPU, it has been tested only on {ocp} 4.22.18, on new clusters on {AWS}. Other clouds and bare metal have not been tested. The pattern has installed and served the default model on a compact cluster with the following nodes: + +.Tested cluster on AWS +[cols="<,^,<,<,<",options="header"] +|=== +| Node type | Number of nodes | Instance type | vCPUs and memory of each node | GPU + +| Control plane and worker +| 3 +| `m5.2xlarge` +| 8 vCPUs, 32 GiB +| None + +| GPU worker, created by the pattern +| 1 +| `g6.2xlarge` +| 8 vCPUs, 32 GiB +| One NVIDIA L4 GPU with 24 GB of memory +|=== + +The `global.gpuOperators: reuse` setting has run on one test cluster so far, and the pattern has not been tested on a cluster that runs {rhoai}. For a model larger than the default model, see <>. For how each optional feature was tested, see link:/patterns/vllm-ray-inference-server/ideas-for-customization/[Ideas for customization]. + +[id="gpu-node-requirements-vllm-ray"] +=== GPU node requirements + +The inference server requests one whole GPU, as the `nvidia.com/gpu` resource, and tolerates the `nvidia.com/gpu` taint. + +* On AWS, the pattern creates one `g6.2xlarge` node with one NVIDIA L4 GPU by default. For billing and how to delete the instance, see the warning on the link:/patterns/vllm-ray-inference-server/[pattern overview]. The instance counts as 8 vCPUs against the Running On-Demand G and VT instances quota of your AWS account. That quota can be 0 on a new account, so you might need to request an increase first. See link:https://docs.aws.amazon.com/ec2/latest/instancetypes/ec2-instance-quotas.html[Amazon EC2 instance type quotas]. +* To skip that instance and use a GPU node that you provide instead, set `global.gpuMachineSet: none` in the `values-global.yaml` file in your fork, and push the change before you install. On an AWS cluster that was installed into existing subnets, the job that creates the GPU node fails, so set `global.gpuMachineSet: none` and add a GPU node yourself. For the steps, see the section about adding a GPU node in link:https://docs.redhat.com/en/documentation/openshift_container_platform/4.18/html/machine_management/managing-compute-machines-with-the-machine-api#creating-machineset-aws[Creating a compute machine set on AWS] in the {ocp} documentation. +* On other platforms, add a node with an NVIDIA GPU that the NVIDIA GPU Operator supports, as listed in link:https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/latest/platform-support.html[Platform support] in the NVIDIA documentation. For Azure and Google Cloud, link:https://docs.redhat.com/en/documentation/openshift_container_platform/4.18/html/machine_management/managing-compute-machines-with-the-machine-api[Managing compute machines with the Machine API] in the {ocp} documentation also describes how to add a GPU node. +* The server image runs CUDA 13, which needs NVIDIA driver version 580 or later. +* The vLLM 0.29.0 packages in the server image are built for NVIDIA GPUs of compute capability 7.5, 8.0, 8.6, 8.9, 9.0, 10.0, and 12.0 on `amd64`, and 8.0, 8.7, 8.9, 9.0, 10.0, 11.0, and 12.0 on `arm64`, as the link:https://github.com/vllm-project/vllm/blob/v0.29.0/.buildkite/release-pipeline.yaml[vLLM 0.29.0 release build list] sets. To find the compute capability of your GPU, see link:https://developer.nvidia.com/cuda-gpus[CUDA GPU Compute Capability] on the NVIDIA website. The NVIDIA L4 GPU has compute capability 8.9. On {ocp}, only the NVIDIA L4 GPU has been tested. +* The server runs on `amd64` nodes by default. If your GPU node is an `arm64` node, set `arch: arm64` in the `charts/all/ray-serve-llm/values.yaml` file in your fork before you install. The server image build also needs an `arm64` node without the `nvidia.com/gpu` taint. An `arm64` GPU node has not been tested on {ocp}. For details, read the prerequisites in the link:https://github.com/eugo-inc/vllm-ray-inference-server/blob/main/AGENTS.md#prerequisites[AGENTS.md file] in the pattern repository. + +[id="choosing-a-gpu-vllm-ray"] +=== Choosing a GPU for your model + +The server gives vLLM 85% of the memory of the GPU (`gpu_memory_utilization: 0.85`) and a context of up to 8,192 link:/patterns/vllm-ray-inference-server/architecture/#terms-vllm-ray[tokens] per request, the prompt and the answer together (`max_model_len: 8192`), in the engine settings of the `ray-serve-llm` Helm chart. The weights of the model must fit in that share, together with the KV cache: the memory in which vLLM keeps calculations for the earlier tokens of each request that it serves, so that it does not repeat them for every new token. The smaller the KV cache, the fewer requests vLLM can serve at the same time. + +To check whether a model fits your GPU: + +. On the Hugging Face page of the model, add up the sizes of its weight files, such as the `.safetensors` files, on the *Files and versions* tab. The weights of the default model, `Qwen/Qwen2.5-0.5B-Instruct`, are one file of about 0.99 GB. +. Compare that total with 85% of the memory of your GPU, and leave room for the KV cache. The NVIDIA L4 GPU, the GPU that the pattern has been tested with, has 24 GB of memory. +. Serve the model, as link:/patterns/vllm-ray-inference-server/ideas-for-customization/#changing-the-model-vllm-ray[Serving a different model] describes, and check that the server pod reports `Ready`. The server log reports the size of the KV cache that vLLM got, in the line that contains `GPU KV cache size`. + +For a model that does not fit, choose a GPU with more memory, or lower the context length. For other ways to use less memory, see link:https://docs.vllm.ai/en/v0.29.0/configuration/conserving_memory.html[Conserving memory] in the vLLM documentation. To see how the model performs on your GPU, run the notebook after the change. + +[id="workload-resources-vllm-ray"] +=== Resource requests of the pattern workloads + +The following table lists the resources that the main workloads of the pattern request, with the default settings: + +.Resource requests with the default settings +[cols="<,<,<,<,<",options="header"] +|=== +| Workload | CPU request | Memory request | Memory limit | Other + +| Inference server pod +| 2 +| 12 GiB +| 24 GiB +| One GPU + +| Server image build +| 1 +| 4 GiB +| None +| 50 GiB of ephemeral storage, on a node without the `nvidia.com/gpu` taint + +| Notebook pod: notebook container +| 250m +| 512 MiB +| 2 GiB +| None + +| Notebook pod: OAuth proxy container +| 50m +| 64 MiB +| 256 MiB +| None + +| Notebook image build +| 500m +| 1 GiB +| None +| 10 GiB of ephemeral storage + +| Image comparison runner, only with `global.compare.enabled: true` +| 2 +| 2 GiB +| 8 GiB +| None + +| Each image comparison side, only with `global.compare.enabled: true` +| 2 +| 12 GiB +| 24 GiB +| One GPU +|=== + +A comparison run scales the inference server to zero pods, so each side uses the GPU of the server. + +[id="storage-registry-vllm-ray"] +=== Storage, image registry, and network access + +* The model cache uses one 50 GiB persistent volume claim with the `ReadWriteOnce` access mode, so the cluster needs a storage class that provisions persistent volumes dynamically. Server pods on more than one node, with the `global.scaleOut.mode: keda` setting, need the `ReadWriteMany` access mode. See link:/patterns/vllm-ray-inference-server/ideas-for-customization/#scale-out-vllm-ray[Scaling out the server under load]. +* The {ocp-registry} in the `Managed` state, and the `Build` and `ImageRegistry` cluster capabilities enabled. The cluster builds the server image and the notebook image itself. On bare metal and on vSphere, the registry starts in the `Removed` state. To check the registry state and the enabled capabilities, run the following commands: ++ +[source,terminal] +---- +$ oc get configs.imageregistry.operator.openshift.io cluster -o jsonpath='{.spec.managementState}' +$ oc get clusterversion version -o jsonpath='{.status.capabilities.enabledCapabilities}' +---- +* Network access from the cluster to GitHub, PyPI, `nvcr.io`, `registry.access.redhat.com`, the package repositories of the base images, and Hugging Face. The cluster clones your fork, builds the images, and downloads the model itself. The optional image comparison also pulls the images of its two sides, such as `docker.io/vllm/vllm-openai`, and the GuideLLM image from `ghcr.io`. + +[id="next-steps-vllm-ray-sizing"] +== Next steps + +* link:/patterns/vllm-ray-inference-server/getting-started/[Getting started] +* link:/patterns/vllm-ray-inference-server/troubleshooting/[Troubleshooting] diff --git a/content/patterns/vllm-ray-inference-server/getting-started.adoc b/content/patterns/vllm-ray-inference-server/getting-started.adoc index 2b58af8ca..f6f14a0e0 100644 --- a/content/patterns/vllm-ray-inference-server/getting-started.adoc +++ b/content/patterns/vllm-ray-inference-server/getting-started.adoc @@ -17,23 +17,55 @@ You deploy the pattern from your own fork of the pattern repository. {rh-gitops} .Prerequisites -* An {ocp} 4.18 or later cluster, and cluster administrator access. To create a cluster, go to the link:https://console.redhat.com/[{hybrid-console-first}] and select *Services -> Containers -> Create cluster*. -* By default, a cluster that does not already run the {rh-nfd} or the NVIDIA GPU Operator. The pattern installs both Operators itself, with its own `OperatorGroup` objects and settings, and can conflict with existing installations of these Operators. On a cluster that already runs both Operators, set `global.gpuOperators: reuse` in the `values-global.yaml` file before you install. The pattern then uses the cluster's own Operators and does not change them. For what these Operators must provide, see link:https://github.com/eugo-inc/vllm-ray-inference-server#reuse-the-clusters-gpu-operators[Reuse the cluster's GPU operators] in the pattern README. The reuse setting has run on one test cluster so far. The pattern has not been tested on a cluster that runs {rhoai}. -* A storage class that provisions persistent volumes dynamically. The model cache uses one persistent volume claim. -* The {ocp-registry} in the `Managed` state, and the `Build` and `ImageRegistry` cluster capabilities enabled. The cluster builds the server image and the notebook image itself. On bare metal and on vSphere, the registry starts in the `Removed` state. To check the registry state, run the following command: +* An {ocp} 4.18 or later cluster, and cluster administrator access. +* A GPU node that meets the link:/patterns/vllm-ray-inference-server/cluster-sizing/#gpu-node-requirements-vllm-ray[GPU node requirements]. On {AWS}, the pattern can create it. +* 50 GiB of free ephemeral storage for the server image build, on a node without the `nvidia.com/gpu` taint. See link:/patterns/vllm-ray-inference-server/cluster-sizing/#workload-resources-vllm-ray[Resource requests of the pattern workloads]. +* A dynamic storage class, and the {ocp-registry} in the `Managed` state with the `Build` and `ImageRegistry` cluster capabilities. See link:/patterns/vllm-ray-inference-server/cluster-sizing/#storage-registry-vllm-ray[Storage, image registry, and network access]. +* Network access from the cluster to the sites that it downloads from. See link:/patterns/vllm-ray-inference-server/cluster-sizing/#storage-registry-vllm-ray[Storage, image registry, and network access]. +* A GitHub account for your fork, and Podman 4.3 or later, Git, and the `oc` CLI on your workstation. For the other tool dependencies, see link:https://validatedpatterns.io/learn/quickstart/[Patterns quick start]. + +The procedure checks whether the cluster already runs the {rh-nfd} or the NVIDIA GPU Operator, because the pattern can conflict with them. + +.Procedure + +. Log in to the cluster: ++ +[source,terminal,subs="+quotes"] +---- +$ oc login --token=____ --server=____ +---- ++ +If you set the `KUBECONFIG` environment variable, it must point to a file in your home directory. + +. Check whether the cluster already runs the {rh-nfd} or the NVIDIA GPU Operator, which the pattern installs by default: +.. List the Operators that were installed from OperatorHub: + [source,terminal] ---- -$ oc get configs.imageregistry.operator.openshift.io cluster -o jsonpath='{.spec.managementState}' +$ oc get subscriptions.operators.coreos.com -A | grep -E 'nfd|gpu-operator-certified' ---- -* A GPU node: -** On AWS, the pattern creates one `g6.2xlarge` node with one NVIDIA L4 GPU by default. AWS bills this instance for as long as it runs. -** On an AWS cluster that was installed into existing subnets, the job that creates the GPU node fails. Set `global.gpuMachineSet: none` and add a GPU node yourself. -** On other platforms, add a node with an NVIDIA GPU that the NVIDIA GPU Operator supports. -* The server runs on `amd64` nodes by default. If your GPU node is an `arm64` node, read the prerequisites in the link:https://github.com/eugo-inc/vllm-ray-inference-server/blob/main/AGENTS.md#prerequisites[AGENTS.md file] in the pattern repository before you install. -* On your workstation, Podman 4.3 or later, Git, and the `oc` CLI, logged in to the cluster. If you set the `KUBECONFIG` environment variable, it must point to a file in your home directory. For the other installation tool dependencies, see link:https://validatedpatterns.io/learn/quickstart/[Patterns quick start]. ++ +No output means that no subscription for either Operator exists. +.. List the objects that each Operator uses. These commands also find the objects of Operators that were installed in another way: ++ +[source,terminal] +---- +$ oc get nodefeaturediscoveries.nfd.openshift.io -A +$ oc get clusterpolicies.nvidia.com +---- ++ +`No resources found`, or an error that the server does not have the resource type, means that the cluster has no such object. -.Procedure +. Choose the `global.gpuOperators` setting before you install, because switching a running installation between `install` and `reuse` is not supported. In the results of the previous step, an Operator counts as found when any of the commands lists its subscription or its object. +** If neither Operator is found, keep the default setting, `install`. +** Use `reuse`, so that the pattern uses the cluster's own Operators and does not change them, only if all of the following are true: +*** Both Operators are found. +*** The `nodefeaturediscoveries` command lists an object. +*** The `clusterpolicies` command lists an object with `ready` in its `STATUS` column. +** In any other case, such as only one Operator found, or both found without these objects, do not install the pattern yet. The pattern supports neither setting on such a cluster. Either finish the installation of both Operators and their objects, as the link:https://docs.nvidia.com/datacenter/cloud-native/openshift/latest/steps-overview.html[NVIDIA GPU Operator on OpenShift] guide describes, and run the check again, or open an issue in the link:https://github.com/eugo-inc/vllm-ray-inference-server/issues[pattern repository] with the output of these commands. + ++ +The `reuse` setting has run on one test cluster so far, and the pattern has not been tested on a cluster that runs {rhoai}. For what these Operators must provide, see link:https://github.com/eugo-inc/vllm-ray-inference-server#reuse-the-clusters-gpu-operators[Reuse the cluster's GPU operators] in the pattern README. . Fork the link:https://github.com/eugo-inc/vllm-ray-inference-server[vllm-ray-inference-server] repository on GitHub. @@ -52,7 +84,8 @@ $ cd vllm-ray-inference-server ---- . Edit the `values-global.yaml` file: -** Set `global.gpuMachineSet` to `create` to let the pattern create one AWS `g6.2xlarge` GPU node, or to `none` to use a GPU node that you provide. +** Set `global.gpuOperators` to `install` or `reuse`, as you chose after the Operator check. +** Set `global.gpuMachineSet` to `none` to skip the billable `g6.2xlarge` node that the default, `create`, adds on {AWS}: for example, when you provide the GPU node, or when the AWS cluster was installed into existing subnets. See link:/patterns/vllm-ray-inference-server/cluster-sizing/#gpu-node-requirements-vllm-ray[GPU node requirements]. ** Optional: To serve a different model from Hugging Face, set `global.model.id`, `global.model.source`, and `global.model.revision`. . Commit and push the change: @@ -74,13 +107,6 @@ $ cp values-secret.yaml.template \ ---- .. In the copied file, set the `value` of the `hftoken` field to your Hugging Face token, which starts with `hf_`. Do not commit this file. -. Log in to the cluster: -+ -[source,terminal,subs="+quotes"] ----- -$ oc login --token=____ --server=____ ----- - . Install the pattern: + [source,terminal] @@ -88,7 +114,9 @@ $ oc login --token=____ --server=____ $ ./pattern.sh make install ---- + -The installer waits up to 60 minutes for every Argo CD application to report `Synced` and `Healthy`. A first installation can take longer, because the cluster builds a large server image, the GPU node joins the cluster, and the server downloads the model. If the wait times out, the pattern stays installed. Check the progress with the commands in the next step, and then run `./pattern.sh make argo-healthcheck`. +On {AWS}, with the default `global.gpuMachineSet: create` setting, this command creates the billable `g6.2xlarge` GPU instance. AWS bills for the instance for as long as it runs. ++ +The installer waits up to 60 minutes for every Argo CD application to report `Synced` and `Healthy`. A first installation can take longer. If the wait times out, the pattern stays installed; see link:/patterns/vllm-ray-inference-server/troubleshooting/#troubleshooting-install-timeout-vllm-ray[The installation command fails after about an hour]. . Watch the deployment: + @@ -165,7 +193,7 @@ $ oc adm policy add-role-to-user edit ____ -n vllm-notebook [id="uninstalling-the-vllm-ray-pattern"] == Uninstalling the pattern -The {solution-name-upstream} framework marks uninstallation as experimental. Uninstalling the pattern leaves the {validated-patterns-op} and {rh-gitops} installed, and it does not delete the AWS GPU node. AWS bills the GPU instance until you delete its machine set. +The {solution-name-upstream} framework marks uninstallation as experimental. Uninstalling the pattern leaves the {validated-patterns-op} and {rh-gitops} installed, and it does not delete the AWS GPU node. AWS bills for the GPU instance for as long as it runs, so delete it with its machine set, as the following steps describe. .Procedure @@ -201,5 +229,8 @@ $ oc get pv [id="next-steps-vllm-ray-getting-started"] == Next steps -* For the web console installation, private forks, updates, and troubleshooting, see the link:https://github.com/eugo-inc/vllm-ray-inference-server/blob/main/AGENTS.md[AGENTS.md file] in the pattern repository. -* For the pattern overview, see link:../[{vllm-ray-pattern}]. +* If the installation or the server does not work as expected, see link:/patterns/vllm-ray-inference-server/troubleshooting/[Troubleshooting]. +* For other models and the optional features, see link:/patterns/vllm-ray-inference-server/ideas-for-customization/[Ideas for customization]. +* For how the pattern works, see link:/patterns/vllm-ray-inference-server/architecture/[Architecture]. +* For the web console installation, private forks, and updates, see the link:https://github.com/eugo-inc/vllm-ray-inference-server/blob/main/AGENTS.md[AGENTS.md file] in the pattern repository. +* For the pattern overview, see link:/patterns/vllm-ray-inference-server/[{vllm-ray-pattern}]. diff --git a/content/patterns/vllm-ray-inference-server/ideas-for-customization.adoc b/content/patterns/vllm-ray-inference-server/ideas-for-customization.adoc new file mode 100644 index 000000000..6123e70ff --- /dev/null +++ b/content/patterns/vllm-ray-inference-server/ideas-for-customization.adoc @@ -0,0 +1,160 @@ +--- +title: Ideas for customization +weight: 40 +aliases: /vllm-ray-inference-server/ideas-for-customization/ +--- + +:toc: +:imagesdir: /images +:_content-type: ASSEMBLY +include::modules/comm-attributes.adoc[] +:vllm-ray-pattern: vLLM Ray Inference Server pattern + +[id="ideas-for-customization-vllm-ray"] +== Ideas for customizing the {vllm-ray-pattern} + +The default installation serves one small model on one GPU, from one server pod. The following ideas change what the pattern serves and measures: + +* <>. +* <> before you change the server. +* <>. +* <>. + +Commit and push each change to your fork: {rh-gitops} deploys the content of your fork on GitHub, not the files on your workstation. + +[id="changing-the-model-vllm-ray"] +=== Serving a different model + +To benchmark the model that you plan to run, on your own GPU, serve it instead of the default model. The model must fit in the memory of the GPU, together with the engine settings in the `ray-serve-llm` Helm chart. For the GPU memory that the server gives vLLM, see link:/patterns/vllm-ray-inference-server/cluster-sizing/#choosing-a-gpu-vllm-ray[Choosing a GPU for your model]. + +.Prerequisites + +* To serve a gated model, you loaded your Hugging Face token, as described in link:/patterns/vllm-ray-inference-server/getting-started/[Getting started]. + +.Procedure + +. Set the following values in the `values-global.yaml` file in your fork: +** `global.model.id`: the model name that clients use. +** `global.model.source`: the Hugging Face repository ID of the model. +** `global.model.revision`: the Hugging Face commit of the new model, or an empty value for its latest version. Do not keep the commit of the old model. +. Commit and push the change. + +{rh-gitops} then updates the configuration of the server, and the server pod restarts and downloads the new model. Changing the model of a running installation has not been tested on a cluster. + +[id="comparing-images-vllm-ray"] +=== Comparing two server images or two sets of engine settings + +Before you move the server to a new vLLM release, or change its engine settings, compare the two on your GPU. Two starts of the same server image can differ even when nothing changed, so one run of each often cannot show whether a small change is faster or slower. The image comparison is off by default. + +[IMPORTANT] +==== +A run scales the inference server to zero pods for its whole length, so the server does not answer requests until the run ends. With the default settings, a run has 34 server starts. The one timed run with these settings, with upstream vLLM 0.33.0 and the pattern's own server as its two sides, took 3 hours 46 minutes on {ocp} with one NVIDIA L4 GPU. Runs with slower-starting sides take longer. Plan each run as a maintenance window, as link:https://github.com/eugo-inc/vllm-ray-inference-server#plan-it-as-a-maintenance-window[Plan it as a maintenance window] in the pattern README describes. +==== + +A job in the cluster starts the two sides, the two images or settings that you compare, in rounds, on the same GPU with the same model and requests. In each round, it also starts an identical copy of each side, to measure the noise between starts. GuideLLM 0.8.1 sends the requests. + +A case is one figure that the job measures in every server start, such as the median time to first token at 32 concurrent requests. Each case ends with a verdict, such as FASTER, SLOWER, or TIE, or with NO VERDICT and a reason. + +A rule that is fixed before the first start decides each case: a difference counts only when it is larger than the gap between the copies and holds up in a statistical test over the rounds. The test is a sign test, which checks whether one side wins the rounds more consistently than chance explains. + +Only the verdicts of the primary cases count as findings. Only the primary cases get Holm's correction, which keeps the chance of a false finding low when several cases are tested at the same time. The `global.compare.analysis.primary` key in the `values-global.yaml` file sets the primary cases, and the pattern README lists the default ones. + +The sign test, Holm's correction, and the fewest rounds that a verdict needs come from link:https://github.com/eugo-inc/pairbench[pairbench] 0.1.0, an open source Python package from Eugo, which the pattern installs unmodified from PyPI with pinned hashes. For the full rule and the metrics that the job records, see link:https://github.com/eugo-inc/vllm-ray-inference-server#how-the-verdicts-are-decided[How the verdicts are decided] in the pattern README. + +.Prerequisites + +* The first installation has finished, and the notebook image has been built. The job takes its code and its statistics package from the notebook image. +* You can take the inference server offline for the length of the run. + +.Procedure + +. In the `values-global.yaml` file in your fork, set `global.compare.enabled: true`, a run name, and the two sides to compare. Side A is the baseline, and side B is the candidate. The following example shows the default run name and sides in that file, which compare two upstream vLLM releases, pinned by digest. Change only these keys, and keep the other keys under `global.compare`, such as `rounds`, `load`, and `analysis`, as they are: ++ +[source,yaml] +---- +global: + compare: + enabled: true + runName: vllm-two-releases + sides: + - name: vllm-0-32-0 + image: docker.io/vllm/vllm-openai:v0.32.0@sha256:befccf0e7e4089aa23926bb6f887a85c0d46c2a99e6de5c5ffdf5cb7957c5b34 + preset: vllm-openai + - name: vllm-0-33-0 + image: docker.io/vllm/vllm-openai:v0.33.0@sha256:d825baf9ce4b1b6bfc5ecc7b79880c7e6748c65a72d697ce3d47607aafa84c6e + preset: vllm-openai +---- ++ +Each side is a server image, a preset that says how to start it, and optional arguments in an `args` field. The `vllm-openai` preset starts an upstream vLLM image, and the `ray-serve-llm` preset starts the pattern's own server image. For an upstream vLLM image, the arguments are `vllm serve` flags. For the pattern's own server, they are vLLM engine arguments, such as `--attention-backend FLASHINFER`, `--max-num-seqs=64`, or `--enforce-eager`. To compare two sets of engine settings, give both sides the same image and different arguments; only the names of the two sides must differ. A side with arguments of its own has not run on {ocp}, and neither has a comparison of two sets of engine settings on one image. +. Commit and push the change. {rh-gitops} creates the comparison job in the `vllm-notebook` namespace. +. Follow the run: ++ +[source,terminal] +---- +$ oc get configmap -n vllm-notebook -l app.kubernetes.io/component=compare-run +---- +. When the run ends, open the `compare_images.ipynb` notebook to see the results. + +For the other settings and the steps after a run, see link:https://github.com/eugo-inc/vllm-ray-inference-server#run-a-comparison[Run a comparison] in the pattern README. + +On {ocp}, the image comparison has had one full-length run with the default rounds and load, on a new cluster on AWS with one NVIDIA L4 GPU, where the pattern reused the cluster's GPU Operators. It compared upstream vLLM 0.33.0 with the pattern's own server (vLLM 0.29.0 on Ray Serve LLM), and gave verdicts on all 4 of its primary cases. Upstream vLLM 0.33.0 came out ahead in all 4. The two sides differ in both vLLM version and serving stack, so the run does not say which of the two made the difference. Shorter comparisons, also in the scale-out mode, finished every server start. For the settings and what has not been checked, see the link:https://github.com/eugo-inc/vllm-ray-inference-server#compare-two-images[Compare two images] section of the pattern README. + +[id="tuning-engine-settings-vllm-ray"] +=== Tuning the engine settings + +The vLLM engine settings of the server, such as the share of GPU memory that vLLM uses (`gpu_memory_utilization`) and the longest context per request (`max_model_len`), are in `server.engineKwargs` in the `charts/all/ray-serve-llm/values.yaml` file. To see how a change of these settings affects the speed of the server on your GPU, measure before and after the change. + +.Procedure + +. Open the `inference_timings.ipynb` notebook, run all cells, and keep the results. +. Change the setting under `server.engineKwargs` in the `charts/all/ray-serve-llm/values.yaml` file in your fork, and commit and push the change. {rh-gitops} updates the configuration of the server, and the server pod restarts with the new settings. The server does not answer requests until the new pod is ready. Changing the engine settings of a running installation has not been tested on a cluster. +. Run the notebook again, and compare the results. + +One run of each setting often cannot show a small difference, because two starts of the same server can differ even when nothing changed. To compare two sets of settings against that noise, use the image comparison with the pattern's own server image on both sides and different arguments, as described in <>. + +[id="scale-out-vllm-ray"] +=== Scaling out the server under load + +When more requests arrive than one vLLM replica answers quickly, the server can grow under load. Scale-out is off by default, and the pattern offers it in two places: Ray Serve can add vLLM replicas inside the server pod, or the Red{nbsp}Hat Custom Metrics Autoscaler, the supported build of KEDA (Kubernetes Event-driven Autoscaling), can add whole server pods. + +To measure how a second replica helps under load, the image comparison also has a scale-out mode: at a fixed request rate, it starts a second replica of each side at a fixed time, and measures how soon that replica gives its first answer and what share of the requests meets the latency goals. + +[id="scale-out-in-pod-vllm-ray"] +==== Adding vLLM replicas inside the server pod + +On a node with several GPUs, more vLLM replicas in the one server pod serve more requests at the same time. + +On a node with one GPU, two replicas can only share that GPU, with `server.gpuPerReplica: 0.5` and `server.engineKwargs.gpu_memory_utilization: 0.4`. They add no GPU compute: they take turns on the GPU, and each has less memory for its cache. Use that setup to watch the autoscaler work, not to serve more requests. The test runs on {ocp} used it. + +.Prerequisites + +* A node with enough GPUs for every replica. The chart refuses a `server.gpuCount` below `server.autoscaling.maxReplicas` times `server.gpuPerReplica`. + +.Procedure + +. In the `charts/all/ray-serve-llm/values.yaml` file in your fork, set `server.autoscaling.maxReplicas` above 1, set `server.autoscaling.targetOngoingRequests`, and give the replicas enough GPUs with `server.gpuCount` and `server.gpuPerReplica`. For an example, see link:https://github.com/eugo-inc/vllm-ray-inference-server#inside-the-pod-more-vllm-replicas[Inside the pod: more vLLM replicas] in the pattern README. +. Commit and push the change. + +[id="scale-out-pods-vllm-ray"] +==== Adding server pods + +With `global.scaleOut.mode: keda`, the Red{nbsp}Hat Custom Metrics Autoscaler adds whole server pods when the vLLM count of waiting requests per pod rises above a set limit, and removes them after a cooldown. + +.Prerequisites + +* Monitoring for user-defined projects is enabled on the cluster: `enableUserWorkload: true` in the `cluster-monitoring-config` config map in the `openshift-monitoring` namespace. The pattern does not change that cluster setting. +* Each additional server pod needs a GPU: a second GPU node, or GPU time-slicing on the one node, which shares that GPU and adds no compute. With two time-sliced shares, set `server.engineKwargs.gpu_memory_utilization` to 0.4, or the second pod fails to start. Nothing checks this setting. Turn time-slicing off before an image comparison in its default mode: time-slicing applies to every namespace, so a GPU pod from another namespace can share the GPU during a timed start, and nothing flags the run. To turn time-slicing on, see link:https://github.com/eugo-inc/vllm-ray-inference-server#across-pods-ray-serve-pods-scaled-out-by-openshift[Across pods] in the pattern README. +* Server pods on more than one node need `modelStorage.accessMode: ReadWriteMany` in the `ray-serve-llm` Helm chart and a storage class that offers it. A claim's access mode cannot change after the claim is created. To keep the compiled kernels for server pods on more than one node, use `compileCache.mode: shared`, not `node`. The `node` and `shared` modes have not run on {ocp}. + +.Procedure + +. Set `global.scaleOut.mode: keda` in the `values-global.yaml` file in your fork. +. Commit and push the change. + +On {ocp}, both autoscalers have had only short test runs, on new clusters on AWS, each with one NVIDIA L4 GPU. Each autoscaler added a second vLLM replica or pod under load. A node with several GPUs, server pods on more than one node, and the two autoscalers together have not been tried. For the settings, the steps, and what has not been checked, see the link:https://github.com/eugo-inc/vllm-ray-inference-server#scale-out[Scale out] section of the pattern README. + +[id="next-steps-vllm-ray-customization"] +== Next steps + +* link:/patterns/vllm-ray-inference-server/cluster-sizing/[Cluster sizing] +* link:/patterns/vllm-ray-inference-server/troubleshooting/[Troubleshooting] diff --git a/content/patterns/vllm-ray-inference-server/partner-results.adoc b/content/patterns/vllm-ray-inference-server/partner-results.adoc new file mode 100644 index 000000000..e37571d69 --- /dev/null +++ b/content/patterns/vllm-ray-inference-server/partner-results.adoc @@ -0,0 +1,63 @@ +--- +title: "Partner results: Eugo" +weight: 60 +aliases: /vllm-ray-inference-server/partner-results/ +--- + +:toc: +:imagesdir: /images +:_content-type: ASSEMBLY +include::modules/comm-attributes.adoc[] +:vllm-ray-pattern: vLLM Ray Inference Server pattern + +[id="partner-results-vllm-ray"] +== Partner results: Eugo + +Eugo measured its next release build against the upstream `vllm/vllm-openai` v0.33.0 image, with Qwen2.5-0.5B-Instruct on one NVIDIA DGX Spark shared with other jobs, in Docker containers, not on {ocp}. The Eugo build runs a vLLM development snapshot taken after 0.33.0 branched off, plus Eugo's fixes. Every start was a new container with empty compile caches, with the model files already in memory and the image already on the machine. Both sides got the same settings apart from the attention setting that the table names. Some of those settings were not the defaults. Every run in the table gave vLLM 12% of GPU memory (vLLM's default is 92%, this pattern's 85%), because the NVIDIA DGX Spark's GPU shares its memory with the CPU and with those other jobs. In the rows that name `--safetensors-load-strategy eager`, both sides used it in place of vLLM's default weight loading. Each lead is the median of the differences over paired rounds. + +[cols="3,3,3,2",options="header"] +|=== +|Against upstream vLLM 0.33.0 |How the servers ran |Eugo sooner by (median) |Eugo sooner in + +|As shipped, with no attention setting on either side +|Plain `vllm serve`, both sides with `--safetensors-load-strategy eager`, to the first streamed token +|93.6 seconds (71%); median starts 131.3 seconds and 36.2 seconds, so upstream's took 3.6 times as long +|12 of 12 rounds + +|As shipped, with only the 12% GPU memory setting +|Plain `vllm serve`, both sides with vLLM's default weight loading, to the first streamed token +|169.5 seconds (77%); median starts 219.4 seconds and 48.4 seconds, so upstream's took 4.5 times as long +|12 of 12 rounds + +|As shipped +|This pattern's Ray Serve LLM server, both sides with vLLM's default weight loading, to the first answer +|159.8 seconds (70%). Upstream's engine was started again in 1 of its 17 launches (Eugo's in none), after vLLM's start-up memory check had stopped it; that launch, in round 1, is one the results count. +|8 of 8 rounds + +|Tuned with `--attention-backend FLASHINFER` and TRT-LLM attention turned off +|Plain `vllm serve`, both sides with `--safetensors-load-strategy eager`, to the first streamed token +|10.8 seconds (21%) +|12 of 12 rounds + +|Tuned with `--attention-backend TRITON_ATTN` +|Plain `vllm serve`, both sides with `--safetensors-load-strategy eager`, to the first streamed token +|14.1 seconds (28%) +|12 of 12 rounds + +|Tuned with `--attention-backend FLASHINFER` +|Plain `vllm serve`, both sides with `--safetensors-load-strategy eager`, to the first streamed token +|17.5 seconds (30%) +|12 of 12 rounds +|=== + +In the tuned runs, the vLLM start-up memory check stopped 2 of 36 upstream first tries and none of 12 Eugo first tries, too few to show a difference by Fisher's exact test. In the run with only the 12% GPU memory setting, every upstream and Eugo start succeeded on its first try (12 of 12 starts each). + +Against upstream as shipped, the time per output token was a tie, at one stream through this pattern's server, in a short check. Most of that time is set by the hardware: at one stream, each output token needs all of the model's weights, about 0.99 GB, read from memory, which at the NVIDIA DGX Spark's published memory bandwidth of 273 GB/s takes at least 3.6 ms of the measured 5.8 ms per token for both servers. The rest depends on the software and on how much of that bandwidth the GPU reaches; in this check both servers used FlashAttention-2 for attention. + +For the settings that each run used and what is not yet measured, see the link:https://github.com/eugo-inc/vllm-ray-inference-server#partner-results-eugo[Partner results: Eugo] section of the pattern README. + +[id="next-steps-vllm-ray-partner-results"] +== Next steps + +* link:/patterns/vllm-ray-inference-server/[{vllm-ray-pattern}] +* link:/patterns/vllm-ray-inference-server/getting-started/[Getting started] diff --git a/content/patterns/vllm-ray-inference-server/troubleshooting.adoc b/content/patterns/vllm-ray-inference-server/troubleshooting.adoc new file mode 100644 index 000000000..7e51b0c6d --- /dev/null +++ b/content/patterns/vllm-ray-inference-server/troubleshooting.adoc @@ -0,0 +1,192 @@ +--- +title: Troubleshooting +weight: 50 +aliases: /vllm-ray-inference-server/troubleshooting/ +--- + +:toc: +:imagesdir: /images +:_content-type: ASSEMBLY +include::modules/comm-attributes.adoc[] +:vllm-ray-pattern: vLLM Ray Inference Server pattern + +[id="troubleshooting-vllm-ray"] +== Troubleshooting the {vllm-ray-pattern} + +Use this page to diagnose common issues when you install or run the pattern. For more entries, see the Troubleshooting section of the link:https://github.com/eugo-inc/vllm-ray-inference-server/blob/main/AGENTS.md#troubleshooting[AGENTS.md file] in the pattern repository. + +[id="troubleshooting-gpu-operators-vllm-ray"] +=== The GPU Operators fail to install, or a second copy appears + +By default, the pattern installs the {rh-nfd} and the NVIDIA GPU Operator itself. On a cluster that already runs them, it adds a second copy of both Operators, with a second `OperatorGroup` object in their namespace, and it can write its own `Subscription` and `NodeFeatureDiscovery` objects over the cluster's objects where the names match. + +.Diagnosis + +. Check the Operator versions in the namespaces of the pattern's copies: ++ +[source,terminal] +---- +$ oc get csv -n openshift-nfd +$ oc get csv -n nvidia-gpu-operator +---- ++ +A `ClusterServiceVersion` object in the `Failed` phase with the reason `TooManyOperatorGroups` means that its namespace has two `OperatorGroup` objects. To see them, run `oc get operatorgroups -n openshift-nfd` and `oc get operatorgroups -n nvidia-gpu-operator`. This failure follows from how Operator Lifecycle Manager handles more than one `OperatorGroup` object in a namespace; it has not been reproduced on a test cluster. + +. List the Operator subscriptions on the cluster: ++ +[source,terminal] +---- +$ oc get subscriptions.operators.coreos.com -A | grep -E 'nfd|gpu-operator-certified' +---- ++ +One subscription for each Operator does not rule out the conflict, because the pattern can write its own `Subscription` object over the cluster's object. + +.Resolution + +* To prevent the conflict on a cluster that already runs both Operators, set `global.gpuOperators: reuse` in the `values-global.yaml` file in your fork before you install, and push the change. The pattern then uses the cluster's own Operators and does not change them. For what these Operators must provide, see link:https://github.com/eugo-inc/vllm-ray-inference-server#reuse-the-clusters-gpu-operators[Reuse the cluster's GPU operators] in the pattern README. The reuse setting has run on one test cluster so far. The pattern has not been tested on a cluster that runs {rhoai}. +* If the pattern is already installed with the default `install` setting and the second copy is running, the pattern has no tested way to remove that copy: +** Switching a running installation between `install` and `reuse` is not supported, and neither switch has been tried on a cluster. +** A switch to `reuse` is expected to leave the second copy in place, because {rh-gitops} does not delete the objects that a commit removes. +** A switch from `reuse` to `install` is expected to add a second copy of both Operators, because the `install` setting adds them. +** Uninstalling the pattern is not a tested way to remove the copy either. The uninstall is experimental and has not been tested on such a cluster. Where the pattern's copy shares a namespace with the cluster's Operator, the uninstall can delete that namespace with the cluster's Operator in it. +** To get help with an installation that already runs a second copy, open an issue in the link:https://github.com/eugo-inc/vllm-ray-inference-server/issues[pattern repository] with the output of the commands in the diagnosis, and describe your cluster and the Operators that it runs. + +[id="troubleshooting-install-timeout-vllm-ray"] +=== The installation command fails after about an hour + +The `./pattern.sh make install` command waits up to 60 minutes for every Argo CD application to report `Synced` and `Healthy`. A first installation can take longer, because the cluster builds a large server image, the GPU node joins the cluster, and the server downloads the model. When the wait times out, the pattern is already installed and its secrets are loaded. + +.Resolution + +. Check the image build and the server pod: ++ +[source,terminal] +---- +$ oc get builds -n vllm-inference +$ oc get pods -n vllm-inference +---- ++ +A server pod in the `Pending` state has no GPU yet. A server pod that is running but not ready is still loading the model. + +. If the build failed, read the build log, fix the cause, and start the build again: ++ +[source,terminal] +---- +$ oc logs -f bc/ray-serve-llm -n vllm-inference +$ oc start-build ray-serve-llm -n vllm-inference --follow +---- + +. When the build and the server pod finish, check the applications again: ++ +[source,terminal] +---- +$ ./pattern.sh make argo-healthcheck +---- + +To skip the wait on a later installation, run `VP_SKIP_ARGO_HEALTHCHECK=true ./pattern.sh make install`, and then run `./pattern.sh make argo-healthcheck` later. + +[id="troubleshooting-pending-gpu-vllm-ray"] +=== The server pod stays in the Pending state + +The server pod reports `Insufficient nvidia.com/gpu` when no node advertises the `nvidia.com/gpu` resource yet. The GPU node goes through the following chain: on AWS, the job creates the node; the node joins the cluster; the {rh-nfd} labels the node; and the NVIDIA GPU Operator installs the driver and the device plugin. The `ClusterPolicy` object of the NVIDIA GPU Operator must tolerate the `nvidia.com/gpu` taint. + +.Resolution + +. Check for GPU nodes, the NVIDIA GPU Operator pods, and the GPU resource of the node: ++ +[source,terminal,subs="+quotes"] +---- +$ oc get nodes -l nvidia.com/gpu.present=true +$ oc get pods -n nvidia-gpu-operator +$ oc describe node ____ | grep nvidia.com/gpu +---- + +. With `global.gpuOperators: reuse`, the `ClusterPolicy` object is the cluster's own. Check that the `oc get clusterpolicies` command shows it as `ready`, check its `spec.daemonsets.tolerations` field, and check that it offers the `nvidia.com/gpu` resource, not a `.shared` resource name or a MIG resource name, such as `nvidia.com/mig-1g.10gb`, which NVIDIA Multi-Instance GPU (MIG) uses for one part of a split GPU. The NVIDIA GPU Operator of the cluster can run in a namespace other than `nvidia-gpu-operator`. + +. If no GPU node joined on an AWS cluster that was installed into existing subnets, the job that creates the GPU node failed. On such a cluster, set `global.gpuMachineSet: none` in the `values-global.yaml` file in your fork, push the change, and add a GPU node yourself. + +[id="troubleshooting-build-registry-vllm-ray"] +=== The image build fails to push, or no build runs + +The cluster builds the server image and the notebook image itself, so the {ocp-registry} must be in the `Managed` state, and the `Build` cluster capability must be enabled. On bare metal and on vSphere, the registry starts in the `Removed` state, because there is no shared object storage. + +.Resolution + +* Give the registry storage, and set the registry to the `Managed` state. +* Alternatively, set `image.override` in both the server and the notebook Helm charts to prebuilt images that you host. The `image.override` setting has not been tested on a cluster. Without the internal registry, also set `oauthProxy.image` in the notebook Helm chart to a Red{nbsp}Hat image, such as `registry.redhat.io/openshift4/ose-oauth-proxy-rhel9:v4.19`, because the default proxy image is pulled through the internal registry. On a running installation, changing `image.override` needs extra steps. For the steps, see the link:https://github.com/eugo-inc/vllm-ray-inference-server/blob/main/AGENTS.md#troubleshooting[AGENTS.md file] in the pattern repository. + +[id="troubleshooting-no-rebuild-vllm-ray"] +=== The image does not change after a push, or the first build failed + +The rebuild job starts a new build only after a push changes the folder of the image, and it does not retry a failed build. + +.Resolution + +. Read the build log, and fix the cause: ++ +[source,terminal] +---- +$ oc logs -f bc/ray-serve-llm -n vllm-inference +---- + +. Start the build by hand: ++ +[source,terminal] +---- +$ oc start-build ray-serve-llm -n vllm-inference --follow +---- ++ +For the notebook image, run `oc start-build notebook -n vllm-notebook --follow`. + +[id="troubleshooting-vault-sealed-vllm-ray"] +=== The secret store reports that Vault is sealed + +Right after the installation, the `vault-backend` cluster secret store can report `Vault is sealed` (code 503) or a 403 error, and the `huggingface-secret` external secret can report that the store is not ready. The {eso-op} checks the store as soon as the store exists, and {hashicorp-vault-short} starts sealed. A job of the {solution-name-upstream} framework unseals {hashicorp-vault-short}, and the `./pattern.sh make install` command waits for that job, and then loads the secrets. Until then, the `openshift-external-secrets` and `ray-serve-llm` applications can show `Degraded`. + +.Resolution + +On a command-line installation, no action is needed. If the store is still not valid after 10 minutes, or the secret is still missing after 15 minutes, check the store and the jobs: + +[source,terminal] +---- +$ oc get clustersecretstore vault-backend +$ oc get jobs -n imperative +---- + +After a web console installation, the store turns valid by itself, but the `huggingface-secret` external secret stays not ready until you load the secrets with the `./pattern.sh make load-secrets` command. The web console installation has not been tested. + +[id="troubleshooting-gated-model-vllm-ray"] +=== A gated model fails to download with a 401 or 403 error + +The Hugging Face token is missing or not loaded. The server ignores a token that does not start with `hf_`. + +.Resolution + +. Put your Hugging Face token, which starts with `hf_`, in the secrets file. +. Load the secrets: ++ +[source,terminal] +---- +$ ./pattern.sh make load-secrets +---- +. Wait for the secret to refresh, and then delete the server pod: ++ +[source,terminal] +---- +$ oc delete pod -l app.kubernetes.io/name=ray-serve-llm -n vllm-inference +---- + +[id="troubleshooting-slow-start-vllm-ray"] +=== Every new server pod takes a long time to start + +vLLM and FlashInfer, a library of GPU kernels for inference that vLLM uses, compile GPU kernels, the functions that run on the GPU, when the server starts. By default, the compiled kernels are written to a temporary volume that is deleted with the pod, so every new server pod compiles them again. + +.Resolution + +To keep the compiled kernels for later pods, set `compileCache.mode` in the `charts/all/ray-serve-llm/values.yaml` file in your fork to `node`, for one GPU node, or to `shared`, for a storage class that offers the `ReadWriteMany` access mode, and push the change. The `node` and `shared` modes have not run on {ocp}. + +[id="next-steps-vllm-ray-troubleshooting"] +== Next steps + +* link:/patterns/vllm-ray-inference-server/getting-started/[Getting started] +* link:/patterns/vllm-ray-inference-server/cluster-sizing/[Cluster sizing]