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

Method offload

deepspeed/linear/quantization.py:78–83  ·  view source on GitHub ↗
(self, revert=False)

Source from the content-addressed store, hash-verified

76 return self.data
77
78 def offload(self, revert=False):
79 if getattr(self, 'ds_offload', False):
80 if revert:
81 self.data = self.to(get_accelerator().current_device_name())
82 else:
83 self.data = self.to('cpu')
84
85 def __getstate__(self):
86 state = self.__dict__

Callers 1

full_weightMethod · 0.45

Calls 3

toMethod · 0.95
get_acceleratorFunction · 0.90
current_device_nameMethod · 0.45

Tested by

no test coverage detected