pub struct MoeV41LayerWeights {
pub layer: u32,
pub gate_w: DevicePtr,
pub gate_bias: Vec<f32>,
pub gate_bias_dev: DevicePtr,
pub shared_w1: ResidentMat,
pub shared_w2: ResidentMat,
pub shared_w3: ResidentMat,
}Expand description
One layer’s resident MoE weights: the router and the shared expert.
Fields§
§layer: u32§gate_w: DevicePtrbf16 [n_routed, dim]
gate_bias: Vec<f32>f32 [n_routed], host: the selection runs on the CPU
gate_bias_dev: DevicePtrThe same bias on the device, for the device-side selection.
[inter, dim], [dim, inter], [inter, dim]: bf16 or the GGUF’s
Q2_K (w1, w3) / Q3_K (w2) blocks on the routed experts’ kernels
Auto Trait Implementations§
impl Freeze for MoeV41LayerWeights
impl RefUnwindSafe for MoeV41LayerWeights
impl Send for MoeV41LayerWeights
impl Sync for MoeV41LayerWeights
impl Unpin for MoeV41LayerWeights
impl UnwindSafe for MoeV41LayerWeights
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