pub enum AttentionPlan {
Linear(Qwen35Roles),
Full(Qwen35AttentionRoles),
}Variants§
Implementations§
Source§impl AttentionPlan
impl AttentionPlan
pub fn requirements( &self, max_context: usize, ) -> Result<AttentionRequirements, Error>
Sourcepub fn execute(
&self,
host: &impl Host,
normalized: &[f32],
hidden: &mut [f32],
history: &mut [f32],
recurrent: &mut [f32],
keys: &mut [f32],
values: &mut [f32],
position: usize,
inv_freq: &[f32],
epsilon: f32,
workspace: &mut [f32],
) -> Result<(), Error>
pub fn execute( &self, host: &impl Host, normalized: &[f32], hidden: &mut [f32], history: &mut [f32], recurrent: &mut [f32], keys: &mut [f32], values: &mut [f32], position: usize, inv_freq: &[f32], epsilon: f32, workspace: &mut [f32], ) -> Result<(), Error>
The layer kernels publish only on success. The containing token owner must poison a partially executed multi-layer token and require reset.
Trait Implementations§
Source§impl Clone for AttentionPlan
impl Clone for AttentionPlan
impl Copy for AttentionPlan
Auto Trait Implementations§
impl Freeze for AttentionPlan
impl RefUnwindSafe for AttentionPlan
impl Send for AttentionPlan
impl Sync for AttentionPlan
impl Unpin for AttentionPlan
impl UnsafeUnpin for AttentionPlan
impl UnwindSafe for AttentionPlan
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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