Cache#
- class sdm.cache.Cache(*args: Mapping[Hashable, object] | Iterable[tuple[Hashable, object]], **kwargs: object)#
A mutable mapping of model cache values.
- class Mode(value)#
The operating mode of a
Cache.A cache alternates between two phases: (1) recording key/value projections from a fit pass, and (2) replaying them across subsequent predict passes. Possible values are:
- record#
Allows recording of data.
- replay#
Allows replaying of data.
- property kv_cache_dtype: KVCacheDType#
The storage dtype of cached key/value projections.