MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / reset

Method reset

deepspeed/utils/static_cache.py:168–171  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

166 return self.keys.nbytes + self.values.nbytes
167
168 def reset(self) -> None:
169 if self.is_initialized:
170 self.keys.zero_()
171 self.values.zero_()
172
173 def _compact_rows(self, active_indices: torch.Tensor, count: int | None = None) -> None:
174 """Compact only the row tensors; used by the multi-layer cache."""

Callers 1

_trim_leftMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected