Return the bytes held by the layers' cache tensors.
(self)
| 317 | return self._layers |
| 318 | |
| 319 | def memory_bytes(self) -> int: |
| 320 | """Return the bytes held by the layers' cache tensors.""" |
| 321 | return sum(layer.memory_bytes() for layer in self._layers) |
| 322 | |
| 323 | def set_write_position(self, pos: torch.Tensor): |
| 324 | """Set the write position shared by all layers. |