Repository navigation
Refresh Kimi-K3 H200 PP2 × TP8 for RHOAI 3.6 #166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
thameem-abbas
wants to merge
5
commits into
main
Choose a base branch
from
refresh/kimi-k3-rhoai36
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+358
−6
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
57b7727
feat: add RHOAI 3.6 Kimi K3 PP refresh
thameem-abbas 8956417
Merge branch 'main' into refresh/kimi-k3-rhoai36
thameem-abbas 73c1d8e
docs: clarify Kimi K3 platform deployment guidance
thameem-abbas 0e7c096
Use pinned Kimi LocalModelCache with restricted serving
thameem-abbas 116fce2
Clarify platform-specific Kimi storage prerequisites
thameem-abbas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
models/kimi-k3/recipes/h200-x8-pp2-tp8-8k1k/config/pp-worker-llmisvcconfig.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| # Install separately after substituting ONLY CONFIG_PREFIX and CONTROLLER_NAMESPACE. | ||
| # Follows the GLM-5.2 PP prerequisite; scoped to non-disaggregated PP on vLLM 0.31. | ||
| # Images and model-specific arguments are supplied by the LLMInferenceService. | ||
| apiVersion: serving.kserve.io/v1alpha2 | ||
| kind: LLMInferenceServiceConfig | ||
| metadata: | ||
| name: ${CONFIG_PREFIX}config-llm-worker-pipeline-parallel | ||
| namespace: ${CONTROLLER_NAMESPACE} | ||
| annotations: | ||
| serving.kserve.io/well-known-config: 'true' | ||
| spec: | ||
| model: | ||
| uri: '' | ||
| template: | ||
| containers: | ||
| - name: main | ||
| command: | ||
| - /bin/bash | ||
| - -c | ||
| - | | ||
| eval "exec vllm serve /mnt/models \ | ||
| --served-model-name '{{ .Spec.Model.Name }}' 'publishers/{{ .ObjectMeta.Namespace }}/models/{{ .Spec.Model.Name }}' \ | ||
| --port 8000 \ | ||
| --root-path /{{ .ObjectMeta.Namespace }}/{{ .ObjectMeta.Name }} \ | ||
| --tensor-parallel-size {{ or .Spec.Parallelism.Tensor 1 }} \ | ||
| --pipeline-parallel-size {{ or .Spec.Parallelism.Pipeline 1 }} \ | ||
| --nnodes {{ or .Spec.Parallelism.Pipeline 1 }} \ | ||
| --node-rank 0 --master-addr 0.0.0.0 \ | ||
| {{ if .GlobalConfig.EnableTLS }}--enable-ssl-refresh --ssl-certfile /var/run/kserve/tls/tls.crt --ssl-keyfile /var/run/kserve/tls/tls.key{{ end }} \ | ||
| ${VLLM_ADDITIONAL_ARGS} $@" | ||
| - -- | ||
| startupProbe: | ||
| httpGet: | ||
| path: /health | ||
| port: 8000 | ||
| scheme: '{{ if .GlobalConfig.EnableTLS }}HTTPS{{else}}HTTP{{end}}' | ||
| periodSeconds: 10 | ||
| failureThreshold: 60 | ||
| readinessProbe: | ||
| httpGet: | ||
| path: /health | ||
| port: 8000 | ||
| scheme: '{{ if .GlobalConfig.EnableTLS }}HTTPS{{else}}HTTP{{end}}' | ||
| livenessProbe: | ||
| httpGet: | ||
| path: /health | ||
| port: 8000 | ||
| scheme: '{{ if .GlobalConfig.EnableTLS }}HTTPS{{else}}HTTP{{end}}' | ||
| volumeMounts: | ||
| - {name: tls-certs, mountPath: /var/run/kserve/tls, readOnly: true} | ||
| volumes: | ||
| - name: tls-certs | ||
| secret: | ||
| secretName: '{{ ChildName .ObjectMeta.Name `-kserve-self-signed-certs` }}' | ||
| worker: | ||
| containers: | ||
| - name: main | ||
| command: | ||
| - /bin/bash | ||
| - -c | ||
| - | | ||
| eval "exec vllm serve /mnt/models \ | ||
| --served-model-name '{{ .Spec.Model.Name }}' 'publishers/{{ .ObjectMeta.Namespace }}/models/{{ .Spec.Model.Name }}' \ | ||
| --port 8000 \ | ||
| --tensor-parallel-size {{ or .Spec.Parallelism.Tensor 1 }} \ | ||
| --pipeline-parallel-size {{ or .Spec.Parallelism.Pipeline 1 }} \ | ||
| --nnodes {{ or .Spec.Parallelism.Pipeline 1 }} \ | ||
| --node-rank ${LWS_WORKER_INDEX} --master-addr ${LWS_LEADER_ADDRESS} \ | ||
| --headless \ | ||
| ${VLLM_ADDITIONAL_ARGS} $@" | ||
| - -- |
68 changes: 68 additions & 0 deletions
68
models/kimi-k3/recipes/h200-x8-pp2-tp8-8k1k/config/rhoai.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # Use controller-managed LocalModelCache storage and paired-device allocation. | ||
| - op: add | ||
| path: /spec/template/containers/0/image | ||
| value: &image registry.redhat.io/rhaii/vllm-cuda-rhel9@sha256:c8d9ed846ea8a5d5724eb339856e9d3e95fb30f47c2e9f9273733ebf1ac67534 | ||
| - op: add | ||
| path: /spec/worker/containers/0/image | ||
| value: *image | ||
| - op: replace | ||
| path: /spec/model/uri | ||
| # Without a matching LocalModelCache, change this to pvc://<fast-rwx-pvc>/<model-path>. | ||
| # Prepopulate the same checkpoint on a fast ReadWriteMany PVC in the serving | ||
| # namespace so both PP nodes can read it; keep model-artifact attachment enabled. | ||
| value: hf://moonshotai/Kimi-K3:f831ab66814297da540d832a5235f8e904f29d06 | ||
| # Cache-backed PVC injection requires the model-artifact attachment path. | ||
| - op: remove | ||
| path: /spec/storageInitializer | ||
| - op: add | ||
| path: /spec/template/serviceAccountName | ||
| value: default | ||
| - op: add | ||
| path: /spec/worker/serviceAccountName | ||
| value: default | ||
| - op: add | ||
| path: /spec/template/securityContext | ||
| value: {runAsNonRoot: true} | ||
| - op: add | ||
| path: /spec/worker/securityContext | ||
| value: {runAsNonRoot: true} | ||
| - op: replace | ||
| path: /spec/template/containers/0/resources | ||
| value: &resources | ||
| requests: {cpu: '32', memory: 512Gi, composite.dra.io/gpu-nic-pair: '8'} | ||
| limits: {memory: 512Gi, composite.dra.io/gpu-nic-pair: '8'} | ||
| - op: replace | ||
| path: /spec/worker/containers/0/resources | ||
| value: *resources | ||
| # Inherit the installed PP config's TLS-aware probe handler. | ||
| - op: replace | ||
| path: /spec/template/containers/0/startupProbe | ||
| value: {failureThreshold: 1440, periodSeconds: 10} | ||
| - op: add | ||
| path: /spec/template/containers/0/readinessProbe | ||
| value: {timeoutSeconds: 7200} | ||
| - op: remove | ||
| path: /spec/template/containers/0/env/0 | ||
| - op: remove | ||
| path: /spec/worker/containers/0/env/0 | ||
| - op: add | ||
| path: /spec/template/containers/0/env/- | ||
| value: {name: HF_MODULES_CACHE, value: /tmp/huggingface/modules} | ||
| - op: add | ||
| path: /spec/worker/containers/0/env/- | ||
| value: {name: HF_MODULES_CACHE, value: /tmp/huggingface/modules} | ||
| - op: add | ||
| path: /spec/template/containers/0/env/- | ||
| value: {name: TIKTOKEN_CACHE_DIR, value: /tmp/tiktoken-cache} | ||
| - op: add | ||
| path: /spec/worker/containers/0/env/- | ||
| value: {name: TIKTOKEN_CACHE_DIR, value: /tmp/tiktoken-cache} | ||
| # Let the controller inject the cache-backed model volume and mount for each role. | ||
| - op: remove | ||
| path: /spec/template/volumes/1 | ||
| - op: remove | ||
| path: /spec/worker/volumes/1 | ||
| - op: remove | ||
| path: /spec/template/containers/0/volumeMounts/1 | ||
| - op: remove | ||
| path: /spec/worker/containers/0/volumeMounts/1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
models/kimi-k3/recipes/h200-x8-pp2-tp8-8k1k/guides/rhoai-3.6.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| # RHOAI 3.6 H200 refresh | ||
|
|
||
| Related: [model target #124](https://github.com/openshift-psap/inference-playbooks/issues/124), | ||
| [release overview #126](https://github.com/openshift-psap/inference-playbooks/issues/126). | ||
|
|
||
| This adds an LLMInferenceService platform for the existing **two-node PP2 × TP8 | ||
| (16 H200 GPUs total)** configuration. It preserves the serving flags, per-pod | ||
| resources and paired GPU/NIC requests, using controller-managed LocalModelCache | ||
| storage for the pinned checkpoint. The original | ||
| standalone vLLM platform and its benchmark records remain unchanged. | ||
|
|
||
| The [platform override](../platforms/rhoai-3.6.yaml) declares and pins the public | ||
| CUDA image and engine version observed during GLM-5.3-Flash RHOAI 3.6 RC2 smoke | ||
| checks, and links to the engine source. This does not establish | ||
| final-GA attribution or Kimi compatibility. Existing | ||
| [GuideLLM](../results/forge-4537ff42bbeb4b0d986e3fc225f20fbf-guidellm/run.yaml) and | ||
| [AIPerf](../results/forge-4537ff42bbeb4b0d986e3fc225f20fbf-aiperf/run.yaml) | ||
| evidence is for standalone vLLM; new RHOAI deployment, feature and benchmark | ||
| validation is pending. | ||
|
|
||
| ## Install the PP prerequisite | ||
|
|
||
| RHOAI's inspected configuration exposes pipeline parallelism in the API but lacks | ||
| the built-in PP launch preset. Install `config/pp-worker-llmisvcconfig.yaml` | ||
| separately, following the existing GLM-5.2 prerequisite pattern. It is not part of | ||
| the generated serving manifest or Kustomize overlay. | ||
|
|
||
| Set these values to match the target controller's namespace and config naming | ||
| prefix (inspect its existing `config-llm-worker-data-parallel` object): | ||
|
|
||
| ```sh | ||
| export CONTROLLER_NAMESPACE=redhat-ods-applications | ||
| export CONFIG_PREFIX=v3-6-0-kserve- | ||
| envsubst '${CONFIG_PREFIX} ${CONTROLLER_NAMESPACE}' \ | ||
| < config/pp-worker-llmisvcconfig.yaml | oc apply -f - | ||
| oc -n "$CONTROLLER_NAMESPACE" get llminferenceserviceconfig \ | ||
| "${CONFIG_PREFIX}config-llm-worker-pipeline-parallel" | ||
| ``` | ||
|
|
||
| Only substitute those two variables; the shell variables and Go template fields | ||
| inside the launch commands must remain intact. This conventionally named preset | ||
| is controller-wide for non-disaggregated PP, not restricted to this recipe. | ||
| Inspect any existing object before replacing it. It supplies launch commands and | ||
| TLS-aware leader probes; images and workload settings come from the service. | ||
| It is a temporary prerequisite, not shipped RHOAI PP support. Track | ||
| [ODH KServe #2059](https://github.com/opendatahub-io/kserve/pull/2059) for upstreaming. | ||
|
|
||
| ## Deploy and validate | ||
|
|
||
| - Prepare a LocalModelCache on both target nodes with the exact source URI | ||
| configured by the `/spec/model/uri` patch in the | ||
| [RHOAI overlay](../config/rhoai.yaml). Wait for both copies to be | ||
| downloaded before serving. Allow at least 1.56 TB per node for the checkpoint, | ||
| plus headroom and space for other cached models. | ||
| - The controller injects the cache-backed model volume and mount into both roles. | ||
| Do not disable `storageInitializer`: that also bypasses cache-volume attachment. | ||
| No manual model hostPath, fixed UID, or model PVC name is supplied in this | ||
| platform. The standalone platform retains its existing hostPath configuration. | ||
| - Provide the per-role resources declared in the [recipe](../recipe.yaml) | ||
| (`serving.resources`) and overridden by the [RHOAI overlay](../config/rhoai.yaml). | ||
| Check the effective `spec.template` and `spec.worker` container `resources`, | ||
| security context and volumes in the | ||
| [RHOAI manifest](../manifests/rhoai-3.6/llminferenceservice.yaml). | ||
| Retain the existing RoCE and admission prerequisites. OpenShift assigns the | ||
| non-root UID; cached files must be readable by that UID. | ||
| - Provide registry pull credentials and any credentials required by cache download | ||
| jobs. The serving containers do not reference an HF-token secret. | ||
| - Apply the [RHOAI manifest](../manifests/rhoai-3.6/llminferenceservice.yaml) | ||
| from this recipe directory. | ||
| - Verify the controller selects the installed PP preset, launches leader rank 0 | ||
| and worker rank 1 with PP2/TP8, and both roles use the declared image. Check | ||
| readiness, inference and existing feature/flag compatibility before benchmarking. | ||
|
|
||
| The preset uses vLLM native multi-node PP with a headless worker. Model files are | ||
| mounted read-only at `/mnt/models`; the existing API model name `/models/Kimi-K3` | ||
| is retained. New 3.6 flags or compatibility changes require separate review. |
119 changes: 119 additions & 0 deletions
119
models/kimi-k3/recipes/h200-x8-pp2-tp8-8k1k/manifests/rhoai-3.6/llminferenceservice.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,119 @@ | ||
| apiVersion: serving.kserve.io/v1alpha2 | ||
| kind: LLMInferenceService | ||
| metadata: | ||
| name: kimi-k3-vllm-h200-pp2-tp8 | ||
| spec: | ||
| model: | ||
| name: /models/Kimi-K3 | ||
| uri: hf://moonshotai/Kimi-K3:f831ab66814297da540d832a5235f8e904f29d06 | ||
| parallelism: | ||
| pipeline: 2 | ||
| tensor: 8 | ||
| replicas: 1 | ||
| template: | ||
| containers: | ||
| - env: | ||
| - name: VLLM_ADDITIONAL_ARGS | ||
| value: --trust-remote-code --attention-backend FLASHMLA --moe-backend humming | ||
| --gpu-memory-utilization 0.90 --max-num-seqs 256 --max-model-len 131072 | ||
| --max-num-batched-tokens 4096 --disable-custom-all-reduce --no-enable-flashinfer-autotune | ||
| --distributed-timeout-seconds 10800 --cpu-distributed-timeout-seconds 10800 | ||
| --enable-auto-tool-choice --tool-call-parser kimi_k3 --reasoning-parser | ||
| kimi_k3 | ||
| - name: NCCL_IB_GID_INDEX | ||
| value: "3" | ||
| - name: NCCL_DMABUF_ENABLE | ||
| value: "0" | ||
| - name: NCCL_DEBUG | ||
| value: INFO | ||
| - name: VLLM_USE_RUST_FRONTEND | ||
| value: "0" | ||
| - name: VLLM_USE_V2_MODEL_RUNNER | ||
| value: "1" | ||
| - name: HF_HOME | ||
| value: /home/nobody/.cache | ||
| - name: HOME | ||
| value: /tmp | ||
| - name: XDG_CACHE_HOME | ||
| value: /home/nobody/.cache | ||
| - name: HF_MODULES_CACHE | ||
| value: /tmp/huggingface/modules | ||
| - name: TIKTOKEN_CACHE_DIR | ||
| value: /tmp/tiktoken-cache | ||
| image: registry.redhat.io/rhaii/vllm-cuda-rhel9@sha256:c8d9ed846ea8a5d5724eb339856e9d3e95fb30f47c2e9f9273733ebf1ac67534 | ||
| name: main | ||
| readinessProbe: | ||
| timeoutSeconds: 7200 | ||
| resources: | ||
| limits: | ||
| composite.dra.io/gpu-nic-pair: "8" | ||
| memory: 512Gi | ||
| requests: | ||
| composite.dra.io/gpu-nic-pair: "8" | ||
| cpu: "32" | ||
| memory: 512Gi | ||
| startupProbe: | ||
| failureThreshold: 1440 | ||
| periodSeconds: 10 | ||
| volumeMounts: | ||
| - mountPath: /dev/shm | ||
| name: dshm | ||
| securityContext: | ||
| runAsNonRoot: true | ||
| serviceAccountName: default | ||
| volumes: | ||
| - emptyDir: | ||
| medium: Memory | ||
| sizeLimit: 16Gi | ||
| name: dshm | ||
| worker: | ||
| containers: | ||
| - env: | ||
| - name: VLLM_ADDITIONAL_ARGS | ||
| value: --trust-remote-code --attention-backend FLASHMLA --moe-backend humming | ||
| --gpu-memory-utilization 0.90 --max-num-seqs 256 --max-model-len 131072 | ||
| --max-num-batched-tokens 4096 --disable-custom-all-reduce --no-enable-flashinfer-autotune | ||
| --distributed-timeout-seconds 10800 --cpu-distributed-timeout-seconds 10800 | ||
| --enable-auto-tool-choice --tool-call-parser kimi_k3 --reasoning-parser | ||
| kimi_k3 --port 8000 | ||
| - name: NCCL_IB_GID_INDEX | ||
| value: "3" | ||
| - name: NCCL_DMABUF_ENABLE | ||
| value: "0" | ||
| - name: NCCL_DEBUG | ||
| value: INFO | ||
| - name: VLLM_USE_RUST_FRONTEND | ||
| value: "0" | ||
| - name: VLLM_USE_V2_MODEL_RUNNER | ||
| value: "1" | ||
| - name: HF_HOME | ||
| value: /home/nobody/.cache | ||
| - name: HOME | ||
| value: /tmp | ||
| - name: XDG_CACHE_HOME | ||
| value: /home/nobody/.cache | ||
| - name: HF_MODULES_CACHE | ||
| value: /tmp/huggingface/modules | ||
| - name: TIKTOKEN_CACHE_DIR | ||
| value: /tmp/tiktoken-cache | ||
| image: registry.redhat.io/rhaii/vllm-cuda-rhel9@sha256:c8d9ed846ea8a5d5724eb339856e9d3e95fb30f47c2e9f9273733ebf1ac67534 | ||
| name: main | ||
| resources: | ||
| limits: | ||
| composite.dra.io/gpu-nic-pair: "8" | ||
| memory: 512Gi | ||
| requests: | ||
| composite.dra.io/gpu-nic-pair: "8" | ||
| cpu: "32" | ||
| memory: 512Gi | ||
| volumeMounts: | ||
| - mountPath: /dev/shm | ||
| name: dshm | ||
| securityContext: | ||
| runAsNonRoot: true | ||
| serviceAccountName: default | ||
| volumes: | ||
| - emptyDir: | ||
| medium: Memory | ||
| sizeLimit: 16Gi | ||
| name: dshm |
7 changes: 7 additions & 0 deletions
7
models/kimi-k3/recipes/h200-x8-pp2-tp8-8k1k/platforms/rhoai-3.6.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| image: registry.redhat.io/rhaii/vllm-cuda-rhel9@sha256:c8d9ed846ea8a5d5724eb339856e9d3e95fb30f47c2e9f9273733ebf1ac67534 | ||
| image_usage: {kind: default, variant: cuda} | ||
| engine: | ||
| name: vllm | ||
| version: 0.31.0+rhaiv.5 | ||
| image: registry.redhat.io/rhaii/vllm-cuda-rhel9@sha256:c8d9ed846ea8a5d5724eb339856e9d3e95fb30f47c2e9f9273733ebf1ac67534 | ||
| source: https://github.com/neuralmagic/nm-vllm-ent/tree/v0.31.0%2Brhaiv.5 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.