(self, max_cache_len: int)
| 44 | is_sliding = False |
| 45 | |
| 46 | def __init__(self, max_cache_len: int): |
| 47 | self.max_cache_len = max_cache_len |
| 48 | self.keys: torch.Tensor | None = None |
| 49 | self.values: torch.Tensor | None = None |
| 50 | self.is_initialized = False |
| 51 | self._write_position: torch.Tensor | None = None |
| 52 | |
| 53 | def set_write_position(self, pos: torch.Tensor): |
| 54 | if not isinstance(pos, torch.Tensor) or pos.dim() not in (0, 1): |
nothing calls this directly
no outgoing calls
no test coverage detected