MCPcopy Create free account
hub / github.com/BICLab/SpikingBrain-7B / __init__

Method __init__

W8ASpike/cache.py:19–25  ·  view source on GitHub ↗
(
        self,
        seen_tokens: int = 0
    )

Source from the content-addressed store, hash-verified

17 """
18
19 def __init__(
20 self,
21 seen_tokens: int = 0
22 ) -> Cache:
23
24 self.states: List[Dict[str, Any]] = []
25 self._seen_tokens = seen_tokens # Used in `generate` to keep tally of how many tokens the cache has seen
26
27 def __getitem__(self, layer_idx: int) -> torch.Tensor:
28 if layer_idx < len(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected