Skip to content

Commit 961317c

Browse files
shyeh25claudealec-semi
authored
[AgentX] Retune Muse Spark Open B200 SGLang per concurrency (#4350)
Retune the Muse Spark Open B200 SGLang AgentX curve per concurrency: TP8/EP8 concurrency 1, 2, 4, 6, 8, 10 and 56, and TP4/EP4 concurrency 8, 10, 16 and 24. Drop TP8 concurrency 12, 16, 24, 32, 48 and 64. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Alec Ibarra <alec@semianalysis.com>
1 parent ab039ac commit 961317c

3 files changed

Lines changed: 168 additions & 25 deletions

File tree

‎inferencex-e2e/benchmarks/single_node/srt-slurm-recipes/musespark/sglang/b200-fp4-mtp/agentic.yaml‎

Lines changed: 156 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -69,115 +69,248 @@ base:
6969

7070

7171
override_tp8_c1:
72+
roles:
73+
agg:
74+
args:
75+
max-running-requests: 1
76+
cuda-graph-max-bs-decode: 1
77+
mem-fraction-static: 0.88
78+
swa-full-tokens-ratio: 0.3
79+
env:
80+
PYTORCH_CUDA_ALLOC_CONF: expandable_segments:True
81+
SGLANG_OPT_UNIFIED_CACHE_FREE_OUT_OF_WINDOW_SLOTS: '1'
7282
benchmark:
7383
env:
7484
CONC: '1'
7585
KV_OFFLOADING: none
7686

7787

7888
override_tp8_c2:
89+
roles:
90+
agg:
91+
args:
92+
max-running-requests: 1
93+
cuda-graph-max-bs-decode: 1
94+
mem-fraction-static: 0.88
95+
swa-full-tokens-ratio: 0.3
96+
env:
97+
PYTORCH_CUDA_ALLOC_CONF: expandable_segments:True
98+
SGLANG_OPT_UNIFIED_CACHE_FREE_OUT_OF_WINDOW_SLOTS: '1'
7999
benchmark:
80100
env:
81101
CONC: '2'
82102
KV_OFFLOADING: none
83103

84104

85105
override_tp8_c4:
106+
roles:
107+
agg:
108+
args:
109+
max-running-requests: 4
110+
cuda-graph-max-bs-decode: 4
111+
prefill-decode-interval: 64
112+
swa-full-tokens-ratio: 0.4
113+
enable-layernorm-sp: true
114+
enable-megamoe-for-layernorm-sp: true
115+
env:
116+
SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK: '8192'
86117
benchmark:
87118
env:
88119
CONC: '4'
89120
KV_OFFLOADING: none
90121

91122

92-
override_tp8_c8:
123+
override_tp8_c6:
124+
roles:
125+
agg:
126+
args:
127+
max-running-requests: 6
128+
cuda-graph-max-bs-decode: 6
129+
prefill-decode-interval: 64
130+
swa-full-tokens-ratio: 0.4
131+
enable-layernorm-sp: true
132+
enable-megamoe-for-layernorm-sp: true
133+
env:
134+
SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK: '8192'
93135
benchmark:
94136
env:
95-
CONC: '8'
137+
CONC: '6'
96138
KV_OFFLOADING: none
97139

98140

99-
override_tp8_c12:
141+
override_tp8_c8:
142+
roles:
143+
agg:
144+
args:
145+
max-running-requests: 3
146+
cuda-graph-max-bs-decode: 3
147+
mem-fraction-static: 0.88
148+
swa-full-tokens-ratio: 0.3
149+
env:
150+
PYTORCH_CUDA_ALLOC_CONF: expandable_segments:True
151+
SGLANG_OPT_UNIFIED_CACHE_FREE_OUT_OF_WINDOW_SLOTS: '1'
100152
benchmark:
101153
env:
102-
CONC: '12'
154+
CONC: '8'
103155
KV_OFFLOADING: none
104156

105157

106-
override_tp8_c16:
158+
override_tp8_c10:
107159
roles:
108160
agg:
109161
args:
162+
max-running-requests: 10
163+
cuda-graph-max-bs-decode: 10
164+
prefill-decode-interval: 64
165+
swa-full-tokens-ratio: 0.4
110166
enable-layernorm-sp: true
111167
enable-megamoe-for-layernorm-sp: true
112-
enable-hierarchical-cache: true
113-
hicache-size: 120
114168
env:
115169
SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK: '8192'
116170
benchmark:
117171
env:
118-
CONC: '16'
119-
KV_OFFLOADING: dram
172+
CONC: '10'
173+
KV_OFFLOADING: none
120174

121175

122-
override_tp8_c24:
176+
override_tp8_c56:
123177
roles:
124178
agg:
125179
args:
180+
max-running-requests: 56
181+
cuda-graph-max-bs-decode: 56
182+
schedule-policy: shortest-prefill-first
183+
prefill-decode-interval: 48
184+
speculative-draft-attention-backend: null
185+
swa-full-tokens-ratio: 0.25
126186
enable-layernorm-sp: true
127187
enable-megamoe-for-layernorm-sp: true
128188
enable-hierarchical-cache: true
129189
hicache-size: 160
130190
env:
131191
SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK: '8192'
192+
SGLANG_OPT_UNIFIED_CACHE_FREE_OUT_OF_WINDOW_SLOTS: '1'
193+
SGLANG_TRTLLM_MHA_DECODE_SEQ_LEN_SPLITS: '4'
194+
SGLANG_UNIFIED_RADIX_TREE_CORE_BACKEND: null
132195
benchmark:
133196
env:
134-
CONC: '24'
197+
CONC: '56'
135198
KV_OFFLOADING: dram
136199

137200

138-
override_tp8_c32:
201+
override_tp4_c8:
139202
roles:
140203
agg:
204+
gpus: 4
141205
args:
206+
tensor-parallel-size: 4
207+
expert-parallel-size: 4
208+
max-running-requests: 8
209+
cuda-graph-max-bs-decode: 8
210+
mem-fraction-static: 0.95
211+
chunked-prefill-size: 8192
212+
max-prefill-tokens: 8192
213+
schedule-policy: shortest-prefill-first
214+
prefill-decode-interval: 96
215+
speculative-draft-attention-backend: null
216+
swa-full-tokens-ratio: 0.1
142217
enable-layernorm-sp: true
143218
enable-megamoe-for-layernorm-sp: true
144219
enable-hierarchical-cache: true
145-
hicache-size: 160
220+
hicache-size: 120
221+
hicache-write-policy: write_through
146222
env:
147-
SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK: '8192'
223+
SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK: '2048'
224+
SGLANG_OPT_UNIFIED_CACHE_FREE_OUT_OF_WINDOW_SLOTS: '1'
148225
benchmark:
149226
env:
150-
CONC: '32'
227+
CONC: '8'
151228
KV_OFFLOADING: dram
152229

153230

154-
override_tp8_c48:
231+
override_tp4_c10:
155232
roles:
156233
agg:
234+
gpus: 4
157235
args:
236+
tensor-parallel-size: 4
237+
expert-parallel-size: 4
238+
max-running-requests: 10
239+
cuda-graph-max-bs-decode: 10
240+
mem-fraction-static: 0.95
241+
chunked-prefill-size: 8192
242+
max-prefill-tokens: 8192
243+
schedule-policy: shortest-prefill-first
244+
prefill-decode-interval: 64
245+
speculative-draft-attention-backend: null
246+
swa-full-tokens-ratio: 0.1
247+
enable-hierarchical-cache: true
248+
hicache-size: 120
249+
hicache-write-policy: write_through
250+
env:
251+
SGLANG_OPT_UNIFIED_CACHE_FREE_OUT_OF_WINDOW_SLOTS: '1'
252+
benchmark:
253+
env:
254+
CONC: '10'
255+
KV_OFFLOADING: dram
256+
257+
258+
override_tp4_c16:
259+
roles:
260+
agg:
261+
gpus: 4
262+
args:
263+
tensor-parallel-size: 4
264+
expert-parallel-size: 4
265+
max-running-requests: 32
266+
cuda-graph-max-bs-decode: 32
267+
mem-fraction-static: 0.95
268+
chunked-prefill-size: 8192
269+
max-prefill-tokens: 8192
270+
schedule-policy: shortest-prefill-first
271+
prefill-decode-interval: 48
272+
speculative-draft-attention-backend: null
273+
swa-full-tokens-ratio: 0.1
158274
enable-layernorm-sp: true
159275
enable-megamoe-for-layernorm-sp: true
160276
enable-hierarchical-cache: true
161-
hicache-size: 160
277+
hicache-size: 120
278+
hicache-write-policy: write_through
162279
env:
163-
SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK: '8192'
280+
SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK: '2048'
281+
SGLANG_OPT_UNIFIED_CACHE_FREE_OUT_OF_WINDOW_SLOTS: '1'
164282
benchmark:
165283
env:
166-
CONC: '48'
284+
CONC: '16'
167285
KV_OFFLOADING: dram
168286

169287

170-
override_tp8_c64:
288+
override_tp4_c24:
171289
roles:
172290
agg:
291+
gpus: 4
173292
args:
293+
tensor-parallel-size: 4
294+
expert-parallel-size: 4
295+
max-running-requests: 48
296+
cuda-graph-max-bs-decode: 48
297+
mem-fraction-static: 0.95
298+
chunked-prefill-size: 8192
299+
max-prefill-tokens: 8192
300+
schedule-policy: shortest-prefill-first
301+
prefill-decode-interval: 48
302+
speculative-draft-attention-backend: null
303+
swa-full-tokens-ratio: 0.1
174304
enable-layernorm-sp: true
175305
enable-megamoe-for-layernorm-sp: true
176306
enable-hierarchical-cache: true
177-
hicache-size: 160
307+
hicache-size: 180
308+
hicache-write-policy: write_through
178309
env:
179-
SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK: '8192'
310+
PYTORCH_CUDA_ALLOC_CONF: expandable_segments:True
311+
SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK: '2048'
312+
SGLANG_OPT_UNIFIED_CACHE_FREE_OUT_OF_WINDOW_SLOTS: '1'
180313
benchmark:
181314
env:
182-
CONC: '64'
315+
CONC: '24'
183316
KV_OFFLOADING: dram

‎inferencex-e2e/configs/nvidia-master.yaml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8568,8 +8568,9 @@ musespark-fp4-b200-sglang-agentic-dflash:
85688568
agentic-coding:
85698569
- dram-utilization: 0.90
85708570
search-space:
8571-
- { tp: 8, ep: 8, kv-offloading: none, spec-decoding: draft_model, conc-list: [1, 2, 4, 8, 12], srt-recipe: agentic.yaml }
8572-
- { tp: 8, ep: 8, kv-offloading: dram, kv-offload-backend: { name: hicache }, spec-decoding: draft_model, conc-list: [16, 24, 32, 48, 64], srt-recipe: agentic.yaml }
8571+
- { tp: 8, ep: 8, kv-offloading: none, spec-decoding: draft_model, conc-list: [1, 2, 4, 6, 8, 10], srt-recipe: agentic.yaml }
8572+
- { tp: 8, ep: 8, kv-offloading: dram, kv-offload-backend: { name: hicache }, spec-decoding: draft_model, conc-list: [56], srt-recipe: agentic.yaml }
8573+
- { tp: 4, ep: 4, kv-offloading: dram, kv-offload-backend: { name: hicache }, spec-decoding: draft_model, conc-list: [8, 10, 16, 24], srt-recipe: agentic.yaml }
85738574

85748575
musespark-fp4-h200-sglang-agentic-dflash:
85758576
image: lmsysorg/sglang:dev-muse-spark-open@sha256:8cfc5a72cb296771f5f8a4a4688cb6d05685610a830cbb616fa4ab0eb7bb2b0a

‎inferencex-e2e/perf-changelog.yaml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10695,3 +10695,12 @@
1069510695
- "Replace the Muse Spark Open B300 TP8/EP8 search space with per-concurrency AgentX settings: TP8/EP8 with GPU-resident KV at concurrency 1, 4, 8 and 14; TP4/EP4 with GPU-resident KV at concurrency 4; TP4/EP4 with 120-175 GB per-rank DRAM HiCache at concurrency 10, 16, 20, 28, 36 and 40."
1069610696
- "Tune request admission, decode graph batch limits, memory fraction, SWA/full ratio, prefill-decode interval and chunked prefill per concurrency; enable layernorm SP and MegaMoE at the HiCache points and shortest-prefill-first from concurrency 16."
1069710697
pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/XXX
10698+
10699+
- config-keys:
10700+
- musespark-fp4-b200-sglang-agentic-dflash
10701+
scenario-type:
10702+
- agentic-coding
10703+
description:
10704+
- "Configure Muse Spark Open B200 SGLang AgentX request admission, scheduling, memory allocation, HiCache, and draft attention per concurrency, adding TP4/EP4 at concurrency 8, 10, 16, and 24 and TP8 at concurrency 6, 10, and 56."
10705+
- "Drop TP8 concurrency 12, 16, 24, 32, 48, and 64."
10706+
pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/XXX

0 commit comments

Comments
 (0)