pub struct TransformerCache { /* private fields */ }Expand description
Per-layer key/value cache set for one autoregressive decode session.
Each entry pairs with the same-index Transformer block; every
Transformer::step appends one position per layer and advances the
decode position used for positional embedding and the context-length
bound.
Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for TransformerCache
impl !Send for TransformerCache
impl !Sync for TransformerCache
impl !UnwindSafe for TransformerCache
impl Forget for TransformerCache
impl Freeze for TransformerCache
impl Move for TransformerCache
impl Unpin for TransformerCache
impl UnsafeUnpin for TransformerCache
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