Struct Qwen4ExpSession
pub struct Qwen4ExpSession {
pub position: usize,
/* private fields */
}Expand description
Owned mutable state for a live Qwen4Exp sequence. Allocated once at session start; the per-token step only mutates slices inside it.
Fields§
§position: usizeTokens processed so far (prompt + generated).
Implementations§
§impl Qwen4ExpSession
impl Qwen4ExpSession
pub fn new<H>(
index: &TensorIndex<H>,
qsa_capacity: usize,
) -> Result<Qwen4ExpSession, Qwen4ExpDecodeError>where
H: HyperparamsSource,
pub fn new<H>(
index: &TensorIndex<H>,
qsa_capacity: usize,
) -> Result<Qwen4ExpSession, Qwen4ExpDecodeError>where
H: HyperparamsSource,
Allocate persistent state for every layer in the validated graph.
qsa_capacity bounds each QSA layer’s retained context in tokens.
pub fn new_with_budget<H>(
index: &TensorIndex<H>,
qsa_capacity: usize,
byte_budget: u64,
) -> Result<Qwen4ExpSession, Qwen4ExpDecodeError>where
H: HyperparamsSource,
pub fn state_bytes(&self) -> u64
pub fn state_bytes(&self) -> u64
Resident bytes held by the persistent per-layer state and residual.
Auto Trait Implementations§
impl Freeze for Qwen4ExpSession
impl RefUnwindSafe for Qwen4ExpSession
impl Send for Qwen4ExpSession
impl Sync for Qwen4ExpSession
impl Unpin for Qwen4ExpSession
impl UnsafeUnpin for Qwen4ExpSession
impl UnwindSafe for Qwen4ExpSession
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