(
self,
seen_tokens: int = 0
)
| 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): |
nothing calls this directly
no outgoing calls
no test coverage detected