pub struct AttnResStream {
pub completed: Vec<Vec<f32>>,
pub partial: Vec<f32>,
/* private fields */
}Expand description
Matches HF KimiDecoderLayer._forward_attn_residual: mix the incoming
prefix with already-archived blocks, then at layer_idx % block_size == 0
archive that incoming prefix and reset the intra-block sum. Layer 0
therefore archives the embedding as its own source, not embed + mixer.
Fields§
§completed: Vec<Vec<f32>>§partial: Vec<f32>Implementations§
Trait Implementations§
Source§impl Clone for AttnResStream
impl Clone for AttnResStream
Source§fn clone(&self) -> AttnResStream
fn clone(&self) -> AttnResStream
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AttnResStream
impl RefUnwindSafe for AttnResStream
impl Send for AttnResStream
impl Sync for AttnResStream
impl Unpin for AttnResStream
impl UnwindSafe for AttnResStream
Blanket Implementations§
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