Skip to content

Commit ab039ac

Browse files
shyeh25claudealec-semi
authored
config(musespark): tune B300 SGLang AgentX settings per concurrency (#4341)
Replace the Muse Spark Open B300 SGLang AgentX search space with 11 per-concurrency points: 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 DRAM HiCache at concurrency 10, 16, 20, 28, 36 and 40. 将 Muse Spark Open B300 SGLang AgentX 搜索空间替换为 11 个按并发配置的点: TP8/EP8 仅 GPU KV(并发 1、4、8、14);TP4/EP4 仅 GPU KV(并发 4); TP4/EP4 DRAM HiCache(并发 10、16、20、28、36、40)。 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Alec Ibarra <alec@semianalysis.com>
1 parent 9aba132 commit ab039ac

3 files changed

Lines changed: 231 additions & 17 deletions

File tree

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

Lines changed: 219 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,21 @@ base:
1818
agg:
1919
nodes: 1
2020
workers: 1
21-
gpus: 8
21+
gpus: 4
2222
args:
2323
served-model-name: meta-models/Muse-Spark-Open-816B-A42B-NVFP4
2424
trust-remote-code: true
25-
tensor-parallel-size: 8
26-
expert-parallel-size: 8
25+
tensor-parallel-size: 4
26+
expert-parallel-size: 4
2727
quantization: modelopt_fp4
2828
moe-runner-backend: flashinfer_trtllm
2929
kv-cache-dtype: fp8_e4m3
3030
attention-backend: trtllm_mha
3131
page-size: 128
32-
mem-fraction-static: 0.9
33-
# c128 admits ~150 agentic requests; DFlash staging breaks past the largest decode graph.
34-
max-running-requests: 192
35-
cuda-graph-max-bs-decode: 192
3632
cuda-graph-backend-prefill: breakable
37-
swa-full-tokens-ratio: 0.4
3833
# DFlash2 verifies 8 tokens per step: the current token plus 7 drafts.
3934
speculative-algorithm: DFLASH
4035
speculative-draft-model-path: RadixArk/Muse-Spark-Open-DFlash2
41-
speculative-draft-attention-backend: fa4
4236
speculative-num-draft-tokens: 8
4337
speculative-use-block-verification: true
4438
mm-feature-transport: cpu
@@ -60,6 +54,7 @@ base:
6054
SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN: '1'
6155
SGLANG_UNIFIED_RADIX_TREE_CORE_BACKEND: python
6256
SGLANG_DFLASH_EAGER_DRAFT_SAMPLER: '1'
57+
SGLANG_OPT_UNIFIED_CACHE_FREE_OUT_OF_WINDOW_SLOTS: '1'
6358
# Cold 533 GB weight loads from shared storage plus graph capture outlast the default.
6459
health_check:
6560
max_attempts: 1440
@@ -72,23 +67,232 @@ base:
7267
AIPERF_HTTP_TCP_USER_TIMEOUT: '900000'
7368
AIPERF_REQUIRED_SERVER_METRIC_PREFIX: 'sglang:'
7469

75-
zip_override_gpu_kv:
70+
override_tp8_c1:
71+
roles:
72+
agg:
73+
gpus: 8
74+
args:
75+
tensor-parallel-size: 8
76+
expert-parallel-size: 8
77+
mem-fraction-static: 0.88
78+
max-running-requests: 1
79+
cuda-graph-max-bs-decode: 1
80+
swa-full-tokens-ratio: 0.3
81+
speculative-draft-attention-backend: fa4
82+
env:
83+
PYTORCH_CUDA_ALLOC_CONF: expandable_segments:True
84+
benchmark:
85+
env:
86+
CONC: '1'
87+
KV_OFFLOADING: none
88+
89+
override_tp8_c4:
90+
roles:
91+
agg:
92+
gpus: 8
93+
args:
94+
tensor-parallel-size: 8
95+
expert-parallel-size: 8
96+
mem-fraction-static: 0.88
97+
max-running-requests: 2
98+
cuda-graph-max-bs-decode: 2
99+
prefill-decode-interval: 64
100+
swa-full-tokens-ratio: 0.3
101+
env:
102+
PYTORCH_CUDA_ALLOC_CONF: expandable_segments:True
103+
benchmark:
104+
env:
105+
CONC: '4'
106+
KV_OFFLOADING: none
107+
108+
override_tp8_c8:
109+
roles:
110+
agg:
111+
gpus: 8
112+
args:
113+
tensor-parallel-size: 8
114+
expert-parallel-size: 8
115+
mem-fraction-static: 0.88
116+
max-running-requests: 2
117+
cuda-graph-max-bs-decode: 2
118+
prefill-decode-interval: 64
119+
swa-full-tokens-ratio: 0.3
120+
env:
121+
PYTORCH_CUDA_ALLOC_CONF: expandable_segments:True
76122
benchmark:
77123
env:
78-
CONC: ['1', '2', '4', '8']
124+
CONC: '8'
79125
KV_OFFLOADING: none
80126

81-
zip_override_hicache:
127+
override_tp8_c14:
128+
roles:
129+
agg:
130+
gpus: 8
131+
args:
132+
tensor-parallel-size: 8
133+
expert-parallel-size: 8
134+
mem-fraction-static: 0.88
135+
max-running-requests: 14
136+
cuda-graph-max-bs-decode: 14
137+
prefill-decode-interval: 64
138+
swa-full-tokens-ratio: 0.3
139+
env:
140+
PYTORCH_CUDA_ALLOC_CONF: expandable_segments:True
141+
benchmark:
142+
env:
143+
CONC: '14'
144+
KV_OFFLOADING: none
145+
146+
override_tp4_c4:
147+
roles:
148+
agg:
149+
args:
150+
mem-fraction-static: 0.88
151+
max-running-requests: 2
152+
cuda-graph-max-bs-decode: 2
153+
prefill-decode-interval: 64
154+
swa-full-tokens-ratio: 0.3
155+
env:
156+
PYTORCH_CUDA_ALLOC_CONF: expandable_segments:True
157+
benchmark:
158+
env:
159+
CONC: '4'
160+
KV_OFFLOADING: none
161+
162+
override_tp4_c10:
163+
roles:
164+
agg:
165+
args:
166+
mem-fraction-static: 0.88
167+
max-running-requests: 4
168+
cuda-graph-max-bs-decode: 4
169+
chunked-prefill-size: 8192
170+
max-prefill-tokens: 8192
171+
prefill-decode-interval: 64
172+
swa-full-tokens-ratio: 0.3
173+
enable-layernorm-sp: true
174+
enable-megamoe-for-layernorm-sp: true
175+
enable-hierarchical-cache: true
176+
hicache-size: 120
177+
env:
178+
PYTORCH_CUDA_ALLOC_CONF: expandable_segments:True
179+
SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK: '2048'
180+
benchmark:
181+
env:
182+
CONC: '10'
183+
KV_OFFLOADING: dram
184+
185+
override_tp4_c16:
186+
roles:
187+
agg:
188+
args:
189+
mem-fraction-static: 0.95
190+
max-running-requests: 12
191+
cuda-graph-max-bs-decode: 12
192+
chunked-prefill-size: 8192
193+
max-prefill-tokens: 8192
194+
schedule-policy: shortest-prefill-first
195+
prefill-decode-interval: 96
196+
swa-full-tokens-ratio: 0.1
197+
enable-layernorm-sp: true
198+
enable-megamoe-for-layernorm-sp: true
199+
enable-hierarchical-cache: true
200+
hicache-size: 120
201+
env:
202+
SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK: '2048'
203+
benchmark:
204+
env:
205+
CONC: '16'
206+
KV_OFFLOADING: dram
207+
208+
override_tp4_c20:
209+
roles:
210+
agg:
211+
args:
212+
mem-fraction-static: 0.95
213+
max-running-requests: 20
214+
cuda-graph-max-bs-decode: 20
215+
chunked-prefill-size: 16384
216+
max-prefill-tokens: 16384
217+
schedule-policy: shortest-prefill-first
218+
prefill-decode-interval: 80
219+
swa-full-tokens-ratio: 0.1
220+
enable-layernorm-sp: true
221+
enable-megamoe-for-layernorm-sp: true
222+
enable-hierarchical-cache: true
223+
hicache-size: 170
224+
env:
225+
SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK: '4096'
226+
benchmark:
227+
env:
228+
CONC: '20'
229+
KV_OFFLOADING: dram
230+
231+
override_tp4_c28:
232+
roles:
233+
agg:
234+
args:
235+
mem-fraction-static: 0.95
236+
max-running-requests: 56
237+
cuda-graph-max-bs-decode: 56
238+
chunked-prefill-size: 16384
239+
max-prefill-tokens: 16384
240+
schedule-policy: shortest-prefill-first
241+
prefill-decode-interval: 80
242+
swa-full-tokens-ratio: 0.1
243+
enable-layernorm-sp: true
244+
enable-megamoe-for-layernorm-sp: true
245+
enable-hierarchical-cache: true
246+
hicache-size: 170
247+
env:
248+
SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK: '4096'
249+
benchmark:
250+
env:
251+
CONC: '28'
252+
KV_OFFLOADING: dram
253+
254+
override_tp4_c36:
255+
roles:
256+
agg:
257+
args:
258+
mem-fraction-static: 0.95
259+
max-running-requests: 72
260+
cuda-graph-max-bs-decode: 72
261+
chunked-prefill-size: 16384
262+
max-prefill-tokens: 16384
263+
schedule-policy: shortest-prefill-first
264+
prefill-decode-interval: 24
265+
swa-full-tokens-ratio: 0.1
266+
enable-layernorm-sp: true
267+
enable-megamoe-for-layernorm-sp: true
268+
enable-hierarchical-cache: true
269+
hicache-size: 175
270+
env:
271+
SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK: '4096'
272+
benchmark:
273+
env:
274+
CONC: '36'
275+
KV_OFFLOADING: dram
276+
277+
override_tp4_c40:
82278
roles:
83279
agg:
84280
args:
281+
mem-fraction-static: 0.95
282+
max-running-requests: 80
283+
cuda-graph-max-bs-decode: 80
284+
chunked-prefill-size: 16384
285+
max-prefill-tokens: 16384
286+
schedule-policy: shortest-prefill-first
287+
prefill-decode-interval: 64
288+
swa-full-tokens-ratio: 0.1
85289
enable-layernorm-sp: true
86290
enable-megamoe-for-layernorm-sp: true
87291
enable-hierarchical-cache: true
88-
hicache-size: [120, 216, 216, 216, 216, 216]
292+
hicache-size: 170
89293
env:
90-
SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK: '8192'
294+
SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK: '4096'
91295
benchmark:
92296
env:
93-
CONC: ['16', '24', '32', '48', '64', '128']
297+
CONC: '40'
94298
KV_OFFLOADING: dram

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9988,8 +9988,9 @@ musespark-fp4-b300-sglang-agentic-dflash:
99889988
agentic-coding:
99899989
- dram-utilization: 0.80
99909990
search-space:
9991-
- { tp: 8, ep: 8, kv-offloading: none, spec-decoding: draft_model, conc-list: [1, 2, 4, 8], srt-recipe: agentic.yaml }
9992-
- { tp: 8, ep: 8, kv-offloading: dram, kv-offload-backend: { name: hicache }, spec-decoding: draft_model, conc-list: [16, 24, 32, 48, 64, 128], srt-recipe: agentic.yaml }
9991+
- { tp: 8, ep: 8, kv-offloading: none, spec-decoding: draft_model, conc-list: [1, 4, 8, 14], srt-recipe: agentic.yaml }
9992+
- { tp: 4, ep: 4, kv-offloading: none, spec-decoding: draft_model, conc-list: [4], srt-recipe: agentic.yaml }
9993+
- { tp: 4, ep: 4, kv-offloading: dram, kv-offload-backend: { name: hicache }, spec-decoding: draft_model, conc-list: [10, 16, 20, 28, 36, 40], srt-recipe: agentic.yaml }
99939994

99949995
musespark-fp4-h100-sglang-agentic-dflash:
99959996
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
@@ -10686,3 +10686,12 @@
1068610686
description:
1068710687
- "Retune Muse Spark Open GB200 SGLang AgentX concurrency 1, 4, 6, 8, and 10 request admission, decode graph batch limits, prefill-decode interval, and memory allocation; run concurrency 1 without HiCache."
1068810688
pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/4343
10689+
10690+
- config-keys:
10691+
- musespark-fp4-b300-sglang-agentic-dflash
10692+
scenario-type:
10693+
- agentic-coding
10694+
description:
10695+
- "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."
10696+
- "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."
10697+
pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/XXX

0 commit comments

Comments
 (0)