qbcompiler.configs.models.MoeConfig Class Reference#
|
Mobilint SDK qb Compiler v1.3
MCS002-EN
|
qbcompiler.configs.models.MoeConfig Class Reference
Sparse MoE expert-selection configuration (calibration only) More...
Inheritance diagram for qbcompiler.configs.models.MoeConfig:
Public Member Functions | |
| "MoeConfig" | with_updates (self, **kwargs) |
| Return a copy with updated fields. | |
Static Public Attributes | |
| model_config | |
| List | selection_mode_list |
| int | selection_mode = Field(default=0, alias="selectionMode") |
| float | score_threshold |
Detailed Description
Sparse MoE expert-selection configuration (calibration only)
Controls which experts are calibrated inside SparseMoe modules. selectionMode is a calibration-only knob: it picks which experts collect statistics (and, for TopK, on which tokens). It does NOT change inference routing — the forward path always routes the router's top-K experts regardless of this setting. scoreThreshold is only used when selectionMode is Threshold.
- Parameters
-
selection_mode int. Expert selection mode index (calibration only; inference is always top-K):
0: TopK - Calibrate only the router's top-K experts per token (matches inference routing).
1: All - Calibrate every expert on the full sequence.
2: Threshold - Calibrate all experts whose routing score exceeds scoreThreshold.
score_threshold float. Routing score threshold used when selectionMode is Threshold (calibration only)
Member Function Documentation
◆ with_updates()
| "MoeConfig" qbcompiler.configs.models.MoeConfig.with_updates | ( | self, | |
| ** | kwargs ) |
Member Data Documentation
◆ model_config
|
static |
◆ selection_mode_list
|
static |
◆ selection_mode
|
static |
◆ score_threshold
|
static |
The documentation for this class was generated from the following file:
Generated by