Struct Qwen4ExpDecodeScratch
pub struct Qwen4ExpDecodeScratch { /* private fields */ }Expand description
All per-step scratch, allocated once and shared across every layer. The GDN and QSA paths run sequentially, so one set of buffers serves both.
Implementations§
§impl Qwen4ExpDecodeScratch
impl Qwen4ExpDecodeScratch
pub fn new(hidden: usize) -> Qwen4ExpDecodeScratch
pub fn new(hidden: usize) -> Qwen4ExpDecodeScratch
Creates a default Qwen4ExpDecodeScratch.
pub fn new_with_budget( hidden: usize, byte_budget: u64, ) -> Result<Qwen4ExpDecodeScratch, Qwen4ExpDecodeError>
pub fn scratch_bytes(&self) -> u64
pub fn scratch_bytes(&self) -> u64
Measured bytes held by this scratch set (fixed at construction).
pub fn final_mixed(&self) -> &[f32]
pub fn final_mixed(&self) -> &[f32]
The hidden vector produced by the most recent final mixer step — what the vocabulary projection consumed.
Auto Trait Implementations§
impl Freeze for Qwen4ExpDecodeScratch
impl RefUnwindSafe for Qwen4ExpDecodeScratch
impl Send for Qwen4ExpDecodeScratch
impl Sync for Qwen4ExpDecodeScratch
impl Unpin for Qwen4ExpDecodeScratch
impl UnsafeUnpin for Qwen4ExpDecodeScratch
impl UnwindSafe for Qwen4ExpDecodeScratch
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