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

Class ExpertCache

cake-core/src/models/common/disk_expert_provider.rs:22–25  ·  view source on GitHub ↗

Simple LRU cache for dequantized expert weights. Avoids re-dequantizing the same popular experts across tokens.

Source from the content-addressed store, hash-verified

20/// Simple LRU cache for dequantized expert weights.
21/// Avoids re-dequantizing the same popular experts across tokens.
22struct ExpertCache {
23 entries: RwLock<HashMap<usize, ExpertWeights>>,
24 capacity: usize,
25}
26
27/// Pre-computed tensor names for a single expert (avoids format! on hot path).
28struct ExpertNames {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected