MCPcopy Create free account
hub / github.com/evilsocket/cake / get_recurrent_state

Method get_recurrent_state

cake-core/src/models/common/cache.rs:221–223  ·  view source on GitHub ↗

Get the recurrent state for a linear attention layer.

(&self, block_idx: usize)

Source from the content-addressed store, hash-verified

219
220 /// Get the recurrent state for a linear attention layer.
221 pub fn get_recurrent_state(&self, block_idx: usize) -> Option<&Tensor> {
222 self.recurrent_states[block_idx].as_ref()
223 }
224
225 /// Set the recurrent state for a linear attention layer.
226 pub fn set_recurrent_state(&mut self, block_idx: usize, state: Tensor) {

Callers 3

forwardMethod · 0.80

Calls

no outgoing calls

Tested by 1