Repository navigation
perf(moe): one pipeline stage for the tiny-M MoE default on MUSA (S5000 4k/128: -18% TPOT on Nemotron 3.5 MTP6) - #242
Conversation
Family-safety note (in the light of MUSA-100043)This A/B is immune to the MTP6 output-family instability tracked in MUSA-100043. All 15 For contrast: an earlier run on the same image ( |
63a586a to
4d456e9
Compare
Patch-file fix: the series file was malformed, now corrected and re-verified
Independent re-verification (local, reproducible via
|
Verified stack measurement (parent session, 2026-09-19)Host 10.20.34.83/GPU1, daily image
Super-additive: -26.13% measured vs -24.05% predicted by multiplying the two independent deltas Interaction with the torchada #115 tuned tableWith a tuned config for Other modelsApplicability is visible in the serving logs: #242 only affects MoE shapes with no tuned table in |
Correction to the "with the #115 table" figure posted aboveThe -23.8% I quoted for the table-present case compared different configurations (levers+table vs
Mechanism, straight from the logs: with the table present Reproducibility: arm B/C agree with the earlier independent sweep on the same host (B3 7.636 ms @4.13 |
2073823 to
0a7963a
Compare
…OT, byte-identical)
takes 0167, so this one moves to 0168. The series README comes along: the file is taken from the current base (which has since added 0164/0165) and only the count line moves, 165 -> 168 - 167 once 0167 is in, 168 with this patch.
0a7963a to
1527bc0
Compare
What
get_default_configpipelines the MoE K loop 4 stages deep forM <= 32(
num_stages = 4atBLOCK_K = 128). On S5000 that is a CUDA-shaped default: at thetiny-M decode shape there is one tile per touched expert with 1-3 useful rows inside it,
and 4 stages reserve ~4x the shared memory per block, which costs resident blocks. This
sets
num_stages = 1forM <= 32on MUSA only, and logs the resolved value once sothe branch is observable from a serving log.
Found while pricing the decode-MoE padding hypothesis in MUSA-100038: the padding is not
the problem (per-expert tiles are already at their floor), the default config is.
Measured
S5000, daily image
vllm:v0.28.0-ph1-5.2.0-torch2.11.0.post1-latest, 4096-in / 128-out,one request, production graph path, fresh container per arm, 1 warmup + 3 measured
requests,
VLLM_LOGGING_LEVEL=INFO, no probes:c214d714...num_stages=1onlyc214d714...BLOCK_SIZE_N=128onlyc214d714...c214d714...this workload. Acceptance length is the model's and unchanged across arms (4.13/4.13/4.11).
logger.info_onceprintedMoE default config for tiny M: M=1 num_stages=1(alsoM=7/14/21) in the serving log,while the unpatched control printed vLLM's own
WARNING ... Using default MoE config. Performance might be sub-optimal!.num_stagesalone is the whole effect, andBLOCK_SIZE_N=128alone regresses,so the win is not an artifact of the tuned-config path.
Scope and risk
num_stages_rocm.M > 32untouched (the test asserts the 512 case still resolves to 3 stages).decode was measured here; other MoE models with tiny-M batches should benefit for the
same reason but were not run.
Tests
tests/test_moe_default_config.py- 4 passed in the patched MUSA container(
python -m pytest tests/test_moe_default_config.py -q). The test is platform-aware, so italso holds on stacks where this patch is not applied.
Not run
from the timing delta, not from counters.
Ticket: MUSA-100038.