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

Method __getstate__

deepspeed/linear/quantization.py:85–90  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

83 self.data = self.to('cpu')
84
85 def __getstate__(self):
86 state = self.__dict__
87 state["data"] = self.data
88 state["quantization_config"] = self.quantization_config
89 state["requires_grad"] = self.requires_grad
90 return state
91
92 def __setstate__(self, state):
93 self.quantizer = state["quantizer"]

Callers 2

__deepcopy__Method · 0.95
__copy__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected