Type Alias rust_bert::models::pegasus::LayerState

source ·
pub type LayerState = LayerState;
Expand description

Cache for Pegasus attention layers

Stores the cached value of key, value and key padding mask to avoid recalculation (e.g. at each generation step) Identical to BART cache (type alias).

Aliased Type§

struct LayerState {
    pub prev_key: Tensor,
    pub prev_value: Tensor,
}

Fields§

§prev_key: Tensor

Cached keys

§prev_value: Tensor

Cached values