(self, bsize, device, dtype, length:int=None)
| 128 | return self.quantizer(None, known_latent=token_data) |
| 129 | |
| 130 | def init_cache(self, bsize, device, dtype, length:int=None): |
| 131 | cache_shape = self.cache_shape.copy() |
| 132 | cache_shape[1] = length or cache_shape[1] |
| 133 | self.cache = T.full((bsize, *cache_shape), CACHE_FILL_VALUE, device=device, dtype=dtype).transpose(0, 1) |
| 134 | |
| 135 | def deinit_cache(self): |
| 136 | self.cache = [None] * self.cache_num_layers |
nothing calls this directly
no outgoing calls
no test coverage detected