pub struct KimiStoredExpertLayout {
pub moe_hidden_dim: usize,
pub moe_intermediate_dim: usize,
}Expand description
Loads one routed expert’s real MXFP4 weights
({prefix}.experts.{expert_idx}.{w1,w2,w3}.{weight_packed,weight_scale}).
moe_hidden_dim is the real latent dimension
(routed_expert_hidden_size=3584 for Kimi K3, not the outer
hidden_dim=7168 – see ferrox-models::latent_moe’s module doc
comment); moe_intermediate_dim is the per-expert FFN size (3072).
Per-layer byte layout of one store-backed Kimi routed expert’s
combined buffer: w1_packed, w1_scale, w2_packed, w2_scale,
w3_packed, w3_scale concatenated in that fixed order. Every expert
in a Kimi layer has identical dims, so one layout serves the layer.
Fields§
§moe_intermediate_dim: usizeImplementations§
Source§impl KimiStoredExpertLayout
impl KimiStoredExpertLayout
pub fn total_bytes(&self) -> usize
Sourcepub fn materialize(&self, lease: &ExpertLease) -> KimiExpertWeights
pub fn materialize(&self, lease: &ExpertLease) -> KimiExpertWeights
Builds temporary two-buffer MXFP4 WeightMatrix views over a
leased buffer; each view’s WeightBytes::Shared clone keeps
the cache entry pinned for the view’s lifetime.
Trait Implementations§
Source§impl Clone for KimiStoredExpertLayout
impl Clone for KimiStoredExpertLayout
Source§fn clone(&self) -> KimiStoredExpertLayout
fn clone(&self) -> KimiStoredExpertLayout
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for KimiStoredExpertLayout
Auto Trait Implementations§
impl Freeze for KimiStoredExpertLayout
impl RefUnwindSafe for KimiStoredExpertLayout
impl Send for KimiStoredExpertLayout
impl Sync for KimiStoredExpertLayout
impl Unpin for KimiStoredExpertLayout
impl UnsafeUnpin for KimiStoredExpertLayout
impl UnwindSafe for KimiStoredExpertLayout
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more