IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Mojo function

gated_delta_ring_record_elements

def gated_delta_ring_record_elements[KEY_HEAD_DIM: Int, VALUE_HEAD_DIM: Int](group_size: Int) -> Int

Returns the elements one ring record holds, before any padding.

The record for a key head at one window position holds, in order, the token's raw key, one VALUE_HEAD_DIM row of delta factors per value head of the key head's GQA group, and one decay per value head of the group. A ring's record_stride is at least this.

Parameters:

  • โ€‹KEY_HEAD_DIM (Int): Compile-time key head dimension.
  • โ€‹VALUE_HEAD_DIM (Int): Compile-time value head dimension.

Args:

  • โ€‹group_size (Int): Value heads per key head.

Returns:

Int: The record's element count.

Was this page helpful?