vllm.models.muse_spark.common.moe
¶
Platform-neutral MuseSpark1x MoE pieces: routing, config, expert loading.
Classes:
-
MuseSpark1xRouter–MuseSpark1x top-k router.
-
MuseSparkConsolidatedRoutedExperts–RoutedExperts that load the consolidated (all-experts-stacked) tensors.
-
MuseSparkMoEConfig–MoE config whose top-k finalize is always deferred (except empty batches).
Functions:
-
needs_pre_norm_all_reduce–Whether the GEMM2 rows must be all-reduced before the norm.
MuseSpark1xRouter
¶
Bases: BaseRouter
MuseSpark1x top-k router.
Optional metap output multiplier -> sigmoid/softmax -> add expert bias for SELECTION only -> top-k -> gather UNBIASED scores -> divide by (sum + division_eps) -> scale by route_scale.
Attributes:
-
routing_method_type(RoutingMethodType) –Classify this router in vLLM's routing vocabulary.
Source code in vllm/models/muse_spark/common/moe.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 | |
routing_method_type
property
¶
Classify this router in vLLM's routing vocabulary.
_compute_routing_native(router_logits, indices_type)
¶
The recipe in torch: the kernel's reference, and the CPU path.
Source code in vllm/models/muse_spark/common/moe.py
MuseSparkConsolidatedRoutedExperts
¶
Bases: RoutedExperts
RoutedExperts that load the consolidated (all-experts-stacked) tensors.
Vendor subclasses supply _get_quant_method.
Source code in vllm/models/muse_spark/common/moe.py
MuseSparkMoEConfig
dataclass
¶
Bases: FusedMoEConfig
MoE config whose top-k finalize is always deferred (except empty batches).
MuseSpark1x normalizes every expert's output before the weighted top-k reduction, so the kernel must always stop after GEMM2.
Source code in vllm/models/muse_spark/common/moe.py
needs_pre_norm_all_reduce(moe_config)
¶
Whether the GEMM2 rows must be all-reduced before the norm.
Under TP the GEMM2 rows are partial sums and RMS is not linear in them.