deploy.yaml 6.56 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
apiVersion: v1
kind: ConfigMap
metadata:
  name: llm-config
data:
  prefill.yaml: |
    cache_transceiver_config:
      backend: UCX
      max_tokens_in_buffer: 9216
    cuda_graph_config:
      enable_padding: true
      max_batch_size: 30
    disable_overlap_scheduler: true
    enable_attention_dp: false
    kv_cache_config:
      dtype: fp8
      enable_block_reuse: false
      free_gpu_memory_fraction: 0.8
    max_batch_size: 64
    max_num_tokens: 20000
    max_seq_len: 9000
    moe_config:
      backend: TRTLLM
    moe_expert_parallel_size: 1
    num_postprocess_workers: 4
    pipeline_parallel_size: 1
    print_iter_log: true
    stream_interval: 20
    tensor_parallel_size: 1
    trust_remote_code: true
  decode.yaml: |
    allreduce_strategy: AUTO
    attention_dp_config:
      enable_balance: true
    cache_transceiver_config:
      backend: UCX
      max_tokens_in_buffer: 9216
    cuda_graph_config:
      enable_padding: true
      max_batch_size: 1280
    disable_overlap_scheduler: false
    enable_attention_dp: false
    kv_cache_config:
      dtype: fp8
      enable_block_reuse: false
      free_gpu_memory_fraction: 0.85
    max_batch_size: 1280
    max_num_tokens: 20000
    max_seq_len: 11000
    moe_config:
      backend: TRTLLM
    moe_expert_parallel_size: 1
    num_postprocess_workers: 4
    pipeline_parallel_size: 1
    print_iter_log: true
    stream_interval: 20
    tensor_parallel_size: 4
    trust_remote_code: true

---
apiVersion: nvidia.com/v1alpha1
kind: DynamoGraphDeployment
metadata:
  name: gpt-oss-disagg
spec:
  backendFramework: trtllm
  pvcs:
    - name: model-cache
      create: false
  services:
    Frontend:
      componentType: frontend
      dynamoNamespace: gpt-oss-disagg
      extraPodSpec:
        affinity:
          podAntiAffinity:
            requiredDuringSchedulingIgnoredDuringExecution:
            - labelSelector:
                matchExpressions:
                - key: nvidia.com/dynamo-graph-deployment-name
                  operator: In
                  values:
                  - gpt-oss-disagg-frontend
              topologyKey: kubernetes.io/hostname
        mainContainer:
          args:
          - python3 -m dynamo.frontend --router-mode round-robin --http-port 8000
          command:
          - /bin/sh
          - -c
93
          image: nvcr.io/nvidia/ai-dynamo/tensorrtllm-runtime:1.0.0
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
      replicas: 1
    TrtllmPrefillWorker:
      componentType: main
      dynamoNamespace: gpt-oss-disagg
      envFromSecret: hf-token-secret
      volumeMounts:
        - name: model-cache
          mountPoint: /opt/models
      sharedMemory:
        size: 80Gi
      extraPodSpec:
        affinity:
          nodeAffinity:
            requiredDuringSchedulingIgnoredDuringExecution:
              nodeSelectorTerms:
              - matchExpressions:
                - key: nvidia.com/gpu.present
                  operator: In
                  values:
                  - "true"
        mainContainer:
          args:
          - |
            python3 -m dynamo.trtllm \
              --model-path "${MODEL_PATH}" \
              --served-model-name "openai/gpt-oss-120b" \
              --extra-engine-args "${ENGINE_ARGS}" \
              --disaggregation-mode prefill
          command:
          - /bin/sh
          - -c
125
          image: nvcr.io/nvidia/ai-dynamo/tensorrtllm-runtime:1.0.0
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
          env:
          - name: TRTLLM_ENABLE_PDL
            value: "1"
          - name: TRT_LLM_DISABLE_LOAD_WEIGHTS_IN_PARALLEL
            value: "True"
          - name: OVERRIDE_QUANT_ALGO
            value: "W4A8_MXFP4_MXFP8"
          - name: NCCL_GRAPH_REGISTER
            value: "0"
          - name: OMPI_MCA_coll_ucc_enable
            value: "0"
          - name: SERVED_MODEL_NAME
            value: "openai/gpt-oss-120b"
          - name: ENGINE_ARGS
            value: "/opt/dynamo/configs/prefill.yaml"
          - name: MODEL_PATH
            value: "/opt/models/hub/models--openai--gpt-oss-120b/snapshots/b5c939de8f754692c1647ca79fbf85e8c1e70f8a"
          - name: HF_HOME
            value: /opt/models
          volumeMounts:
          - mountPath: /opt/dynamo/configs
            name: llm-config
            readOnly: true
          workingDir: /workspace/examples/backends/trtllm
        volumes:
        - configMap:
            name: llm-config
          name: llm-config
      replicas: 1
      resources:
        limits:
          gpu: "1"
        requests:
          gpu: "1"
    TrtllmDecodeWorker:
      componentType: main
      dynamoNamespace: gpt-oss-disagg
      envFromSecret: hf-token-secret
      volumeMounts:
        - name: model-cache
          mountPoint: /opt/models
      sharedMemory:
        size: 80Gi
      extraPodSpec:
        affinity:
          nodeAffinity:
            requiredDuringSchedulingIgnoredDuringExecution:
              nodeSelectorTerms:
              - matchExpressions:
                - key: nvidia.com/gpu.present
                  operator: In
                  values:
                  - "true"
        mainContainer:
          args:
          - |
            python3 -m dynamo.trtllm \
              --model-path "${MODEL_PATH}" \
              --served-model-name "openai/gpt-oss-120b" \
              --extra-engine-args "${ENGINE_ARGS}" \
              --disaggregation-mode decode
          command:
          - /bin/sh
          - -c
190
          image: nvcr.io/nvidia/ai-dynamo/tensorrtllm-runtime:1.0.0
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
          env:
          - name: TRTLLM_ENABLE_PDL
            value: "1"
          - name: TRT_LLM_DISABLE_LOAD_WEIGHTS_IN_PARALLEL
            value: "True"
          - name: OVERRIDE_QUANT_ALGO
            value: "W4A8_MXFP4_MXFP8"
          - name: NCCL_GRAPH_REGISTER
            value: "0"
          - name: OMPI_MCA_coll_ucc_enable
            value: "0"
          - name: SERVED_MODEL_NAME
            value: "openai/gpt-oss-120b"
          - name: ENGINE_ARGS
            value: "/opt/dynamo/configs/decode.yaml"
          - name: MODEL_PATH
            value: "/opt/models/hub/models--openai--gpt-oss-120b/snapshots/b5c939de8f754692c1647ca79fbf85e8c1e70f8a"
          - name: HF_HOME
            value: /opt/models
          volumeMounts:
          - mountPath: /opt/dynamo/configs
            name: llm-config
            readOnly: true
          workingDir: /workspace/examples/backends/trtllm
        volumes:
        - configMap:
            name: llm-config
          name: llm-config
      replicas: 1
      resources:
        limits:
          gpu: "4"
        requests:
          gpu: "4"