Skip to main content

Module cache

Module cache 

Source
Expand description

Aggregate ownership and admission for backend-managed live caches. Portable cache/state policy and prompt-cache schemas.

Runtime ownership, admission, storage transitions, and backing-store scheduling live in eredu-runtime so this crate remains declarative.

Structs§

CacheBlockId
Stable identity for one immutable sealed cache block.
CacheRankIdentity
Optional rank identity included in a stable cache block identifier.
PromptCacheBlock
One cache block catalog entry in a prompt-cache manifest.
PromptCacheDescriptor
Caller-supplied identity and geometry for a reusable prefix cache.
PromptCacheManifest
Versioned metadata inspectable without loading backend arrays.
PromptCacheModelIdentity
Cache-relevant structure derived from a prepared model.
PromptCacheOptions
Explicit publication behavior for a reusable prefix cache.
PromptCacheStateSegment
One named contiguous state range in a portable prompt-cache identity.
PromptCacheStateTensor
One independently validated fixed-size state tensor catalog entry.
PromptCacheTopology
Rank-local topology recorded in a prompt-cache manifest.
StateComponentPolicy
Symbolic geometry and persistence behavior of one named state component.
StateTensorPolicy
Exact semantic role, symbolic shape, and dtype contract for a state tensor.

Enums§

CachePolicyError
Invalid cache geometry or state-residency contract.
CacheRepresentation
Representation stored atomically in one cache block.
CacheTier
Logical location of a sealed cache block.
LayerCachePolicy
Exact state kind, attention policy, and tensor geometry for one decoder layer.
MutableStateResidency
Residency behaviors valid for mutable fixed-state tensors.
PoolingStateComponent
Semantic component of one append-only pooling stream.
PromptCacheError
Invalid reusable prompt-cache identity, schema, or catalog.
StateComponentRole
Stable semantic identity for one independently managed runtime component.
StateResidencyClass
Runtime ownership behavior for live model state.
StateTensorDimension
One dimension in a persisted fixed-state tensor.
StateTensorDtype
Accepted dtype family for one fixed-state tensor.
StateTensorOwner
Owner of one persisted non-attention state tensor.
StateTensorPresence
Condition under which a state tensor must be materialized.
StateTensorRole
Semantic role of one non-attention cache tensor.

Constants§

PROMPT_CACHE_SCHEMA_VERSION
Current reusable prompt-cache schema version.

Functions§

derive_prompt_cache_architecture_fingerprint
Derives a stable cache architecture fingerprint from ordered semantic fields.
prompt_cache_token_fingerprint
Hashes exact prefix token IDs as little-endian u32 values.
validate_prompt_cache_model_identity
Verifies that a caller descriptor was derived from the prepared model.