Struct FtwExpertData
pub struct FtwExpertData<'a> {
pub gate_up_packed: &'a [u8],
pub gate_up_scale: &'a [u8],
pub gate_up_global: &'a [u8],
pub down_packed: &'a [u8],
pub down_scale: &'a [u8],
pub down_global: &'a [u8],
}Expand description
Zero-copy byte slices for one expert’s NVFP4 tensors.
Fields§
§gate_up_packed: &'a [u8]§gate_up_scale: &'a [u8]§gate_up_global: &'a [u8]§down_packed: &'a [u8]§down_scale: &'a [u8]§down_global: &'a [u8]Implementations§
§impl<'a> FtwExpertData<'a>
impl<'a> FtwExpertData<'a>
pub fn to_view(
&self,
emb_dim: usize,
intermediate_dim: usize,
) -> ExpertWeightView<'a>
pub fn to_view( &self, emb_dim: usize, intermediate_dim: usize, ) -> ExpertWeightView<'a>
Convert zero-copy slice into typed ExpertWeightView for zero-heap SwiGLU computation.
Auto Trait Implementations§
impl<'a> Freeze for FtwExpertData<'a>
impl<'a> RefUnwindSafe for FtwExpertData<'a>
impl<'a> Send for FtwExpertData<'a>
impl<'a> Sync for FtwExpertData<'a>
impl<'a> Unpin for FtwExpertData<'a>
impl<'a> UnsafeUnpin for FtwExpertData<'a>
impl<'a> UnwindSafe for FtwExpertData<'a>
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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