Realm

oa::ml::nn::TransformerCache

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.

StRust public API

Declaration

pub struct TransformerCache { /* private fields */ }
Public Rust declaration.

Public Methods

pub const fn len(&self) -> usize
pub const fn is_empty(&self) -> bool

Public Method Documentation

pub const fn len( &self ) -> usize
No public source comment is attached to this declaration.
pub const fn is_empty( &self ) -> bool
No public source comment is attached to this declaration.