pub struct Glm5NextMoeWeights {
pub router: DevicePtr,
pub router_bias: DevicePtr,
pub shared: Glm5NextDenseMlpWeights,
pub experts: Vec<Glm5NextExpertWeights>,
pub ptrs: Glm5NextMoePtrTables,
}Expand description
A routed MoE site’s weights for this rank.
Fields§
§router: DevicePtr[num_experts, hidden] BF16 router. 🪤 REPLICATED, and it must stay that way — see
the module header. Consumed through the FP32-out GEMM.
router_bias: DevicePtr[num_experts] F32 selection bias (gate.e_score_correction_bias).
🪤 Steers SELECTION ONLY. The emitted weight is the chosen expert’s unbiased score.
The shared expert — dense BF16, TP-sharded, added to every token unscaled.
experts: Vec<Glm5NextExpertWeights>Exactly local_experts entries, indexed by local slot, in ascending global id.
🪤 Indexed by Glm5NextMlpConfig::local_slot(global_id), never by the global id.
ptrs: Glm5NextMoePtrTablesGlobal-id-indexed device pointer tables over the same experts, for the grouped device-dispatch forward. Null entries mark remote ids.
Auto Trait Implementations§
impl Freeze for Glm5NextMoeWeights
impl RefUnwindSafe for Glm5NextMoeWeights
impl Send for Glm5NextMoeWeights
impl Sync for Glm5NextMoeWeights
impl Unpin for Glm5NextMoeWeights
impl UnwindSafe for Glm5NextMoeWeights
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more