disagg_planner.yaml 4.71 KB
Newer Older
1
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
# SPDX-License-Identifier: Apache-2.0
Alec's avatar
Alec committed
3

4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# ──────────────────────────────────────────────────────────────────────────────
# Planner profiling data ConfigMap
#
# The planner requires pre-deployment profiling data (prefill & decode
# interpolation curves) for throughput-based scaling.  The values below are
# PLACEHOLDERS for Qwen/Qwen3-0.6B — replace them with real measurements
# before deploying to production.
#
# How to obtain real data:
#   • Run the Dynamo Profiler against your target GPU/model combination.
#     See docs/components/profiler/profiler-guide.md for instructions.
#   • Or run manual benchmarks and fill in the arrays below.
#
# Key format (JSON files mounted into the planner container):
#   prefill_raw_data.json — prefill_isl (input sequence lengths),
#       prefill_ttft (time-to-first-token in ms), prefill_thpt_per_gpu
#       (tokens/s per GPU) — all 1-D arrays of equal length.
#   decode_raw_data.json  — x_kv_usage (KV-cache utilisation fractions),
22
23
24
25
#       y_context_length (context lengths), z_itl (inter-token latency in ms),
#       z_thpt_per_gpu (tokens/s per GPU), max_kv_tokens (scalar).
#       x_kv_usage, y_context_length, z_itl, and z_thpt_per_gpu must all be
#       flat 1-D arrays of the same length (one entry per measurement point).
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# ──────────────────────────────────────────────────────────────────────────────
apiVersion: v1
kind: ConfigMap
metadata:
  name: planner-profile-data
data:
  prefill_raw_data.json: |
    {
      "prefill_isl":          [128, 256, 512, 1024, 2048],
      "prefill_ttft":         [12,  18,  30,  55,   105],
      "prefill_thpt_per_gpu": [9800, 8500, 6200, 3800, 2000]
    }
  decode_raw_data.json: |
    {
40
41
42
43
      "x_kv_usage":       [0.1, 0.1, 0.1, 0.1, 0.3, 0.3, 0.3, 0.3, 0.5, 0.5, 0.5, 0.5, 0.7, 0.7, 0.7, 0.7, 0.9, 0.9, 0.9, 0.9],
      "y_context_length": [128, 512, 1024, 2048, 128, 512, 1024, 2048, 128, 512, 1024, 2048, 128, 512, 1024, 2048, 128, 512, 1024, 2048],
      "z_itl":            [5, 6, 7, 9, 6, 7, 8, 10, 7, 8, 10, 12, 8, 10, 12, 15, 10, 12, 15, 20],
      "z_thpt_per_gpu":   [4500, 4000, 3500, 2800, 4200, 3700, 3200, 2500, 3800, 3300, 2800, 2200, 3400, 2900, 2400, 1800, 2800, 2400, 1900, 1400],
44
45
46
      "max_kv_tokens": 32768
    }
---
47
48
49
apiVersion: nvidia.com/v1alpha1
kind: DynamoGraphDeployment
metadata:
50
  name: vllm-disagg-planner
51
52
53
spec:
  services:
    Frontend:
54
      componentType: frontend
55
      replicas: 1
56
57
      extraPodSpec:
        mainContainer:
58
          image: nvcr.io/nvidia/ai-dynamo/vllm-runtime:my-tag
59
60
61
    Planner:
      componentType: planner
      replicas: 1
62
63
      extraPodSpec:
        mainContainer:
64
          image: nvcr.io/nvidia/ai-dynamo/vllm-runtime:my-tag
julienmancuso's avatar
julienmancuso committed
65
          command:
66
67
          - python3
          - -m
68
          - dynamo.planner
69
          args:
70
71
            - --config
            - '{"environment": "kubernetes", "backend": "vllm", "throughput_adjustment_interval": 60, "profile_results_dir": "/workspace/profiling_results"}'
72
73
74
75
76
77
78
79
          volumeMounts:
            - name: planner-profile-data
              mountPath: /workspace/profiling_results
              readOnly: true
        volumes:
          - name: planner-profile-data
            configMap:
              name: planner-profile-data
80
    VllmDecodeWorker:
81
      envFromSecret: hf-token-secret
82
      componentType: worker
83
      subComponentType: decode
84
      replicas: 1
85
86
      resources:
        limits:
87
          gpu: "1"
88
89
      extraPodSpec:
        mainContainer:
90
          image: nvcr.io/nvidia/ai-dynamo/vllm-runtime:my-tag
91
          workingDir: /workspace/examples/backends/vllm
92
          command:
93
            - python3
94
          args:
95
96
97
98
            - -m
            - dynamo.vllm
            - --model
            - Qwen/Qwen3-0.6B
99
    VllmPrefillWorker:
100
      envFromSecret: hf-token-secret
101
      componentType: worker
102
      subComponentType: prefill
103
      replicas: 1
104
105
      resources:
        limits:
106
          gpu: "1"
107
108
      extraPodSpec:
        mainContainer:
109
          image: nvcr.io/nvidia/ai-dynamo/vllm-runtime:my-tag
110
          workingDir: /workspace/examples/backends/vllm
111
          command:
112
            - python3
113
          args:
114
115
116
117
            - -m
            - dynamo.vllm
            - --model
            - Qwen/Qwen3-0.6B
118
119
            - --disaggregation-mode
            - prefill
120
121
            - --kv-transfer-config
            - '{"kv_connector":"NixlConnector","kv_role":"kv_both"}'