MCPcopy Create free account
hub / github.com/OpenSparseLLMs/MoM / clear_torch_cache

Function clear_torch_cache

lm-eval-harness/lm_eval/models/utils.py:191–193  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

189
190
191def clear_torch_cache() -> None:
192 gc.collect()
193 torch.cuda.empty_cache()
194
195
196def get_dtype(dtype: Union[str, torch.dtype]) -> torch.dtype:

Callers 1

_detect_batch_sizeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected