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).

Python class

CacheLeafKind

CacheLeafKindโ€‹

class max.nn.kv_cache.CacheLeafKind(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

source

Bases: Enum

What a child of a cache tree holds.

ATTENTIONโ€‹

ATTENTION = 'attention'

source

Keys and values a span of tokens wrote, read through an attention op.

RECURRENTโ€‹

RECURRENT = 'recurrent'

source

One fixed-size state carrying every token before it.