pub struct ExpertLayout {Show 17 fields
pub layers: usize,
pub experts: usize,
pub inter: usize,
pub hidden: usize,
pub group: usize,
pub record_bytes: u64,
pub record_stride: u64,
pub layer_prefixes: Vec<String>,
pub gate_w: u64,
pub up_w: u64,
pub down_w: u64,
pub gate_s: u64,
pub gate_b: u64,
pub up_s: u64,
pub up_b: u64,
pub down_s: u64,
pub down_b: u64,
}Expand description
Expert record layout inside experts.bin. One record per (layer, expert):
three packed 4-bit weight matrices followed by their scales and biases,
padded to a page multiple so each record can be its own Metal buffer.
Fields§
§layers: usize§experts: usize§inter: usize§group: usize§record_bytes: u64§record_stride: u64§layer_prefixes: Vec<String>Tensor prefixes in record order (main layers, then MTP layers).
gate_w: u64§up_w: u64§down_w: u64§gate_s: u64§gate_b: u64§up_s: u64§up_b: u64§down_s: u64§down_b: u64Implementations§
Source§impl ExpertLayout
impl ExpertLayout
pub(crate) fn validate_dimensions(&self) -> Result<()>
Trait Implementations§
Source§impl Clone for ExpertLayout
impl Clone for ExpertLayout
Source§fn clone(&self) -> ExpertLayout
fn clone(&self) -> ExpertLayout
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExpertLayout
impl Debug for ExpertLayout
Source§impl<'de> Deserialize<'de> for ExpertLayout
impl<'de> Deserialize<'de> for ExpertLayout
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ExpertLayout
impl RefUnwindSafe for ExpertLayout
impl Send for ExpertLayout
impl Sync for ExpertLayout
impl Unpin for ExpertLayout
impl UnsafeUnpin for ExpertLayout
impl UnwindSafe for ExpertLayout
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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