Read the equation
For each selected expert index, gather the corresponding value from the pre-bias sigmoid score array. Ranking used bias-adjusted values, but this weighting stage deliberately uses the original affinities. Changing the correction bias can therefore change membership without directly adding to a retained expert’s affinity.
Terms & definitions
| Term | Meaning in this source |
|---|---|
| scores | Pre-bias sigmoid scores |
| topk_idx | Selected indices |
| topk_weight | Gathered unnormalized weights |
How it works
Read the definition from its right-hand expression to the quantity on the left. Its surrounding source records the intended input, state, or parameter context. Where the source leaves an operation unspecified, this page preserves that gap.
Assumptions & limits
Source recovery establishes that the expression appears in this record. Its mathematical validity, implementation behavior, and interpretation must be assessed separately. See the linked source and research notes for the checks available for this version.
Original context
Read the surrounding source passage
6. topk_idx = topk( masked scores_for_choice , k=8 ) -> (T, 8)
The 8 experts are chosen among the 128 that remain.
7. topk_weight = scores.gather(1, topk_idx)
*** Weights are gathered from `scores` - the PRE-bias sigmoid - while the
SELECTION in steps 3-6 used scores_for_choice, the POST-bias value.
Selection and weighting use different quantities, deliberately.Exact original notation
topk_weight = scores.gather(1, topk_idx)