agg-with-config.yaml 1.96 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
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# configmap that contains the custom trtllm configuration
apiVersion: v1
kind: ConfigMap
metadata:
  name: nvidia-config
data:
  agg.yaml: |
    tensor_parallel_size: 1
    moe_expert_parallel_size: 1
    enable_attention_dp: false
    max_num_tokens: 8192
    max_batch_size: 16
    trust_remote_code: true
    backend: pytorch
    enable_chunked_prefill: true
    disable_overlap_scheduler: true
    kv_cache_config:
      free_gpu_memory_fraction: 0.95
    cuda_graph_config:
      max_batch_size: 16
---
# dynamo graph deployment which uses the custom configuration contained in the configmap
apiVersion: nvidia.com/v1alpha1
kind: DynamoGraphDeployment
metadata:
  name: trtllm-agg
spec:
  services:
    Frontend:
      dynamoNamespace: trtllm-agg
      componentType: frontend
      replicas: 1
      extraPodSpec:
        mainContainer:
37
          image: nvcr.io/nvidia/ai-dynamo/tensorrtllm-runtime:my-tag
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
    TRTLLMWorker:
      envFromSecret: hf-token-secret
      dynamoNamespace: trtllm-agg
      componentType: worker
      replicas: 1
      resources:
        limits:
          gpu: "1"
      extraPodSpec:
        # declare the configmap as a volume
        volumes:
        - name: nvidia-config
          configMap:
            name: nvidia-config
        mainContainer:
53
          image: nvcr.io/nvidia/ai-dynamo/tensorrtllm-runtime:my-tag
54
          workingDir: /workspace/examples/backends/trtllm
55
56
57
          # mount the configmap as a volume
          volumeMounts:
          - name: nvidia-config
58
            mountPath: /workspace/
59
60
            readOnly: true
          command:
61
62
63
          - python3
          - -m
          - dynamo.trtllm
64
          args:
65
66
67
68
69
            - --model-path
            - Qwen/Qwen3-0.6B
            - --served-model-name
            - Qwen/Qwen3-0.6B
            - --extra-engine-args
70
            - ./recipes/qwen3/trtllm/agg.yaml