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

Method extra_repr

deepspeed/module_inject/layers.py:439–446  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

437 return new_obj
438
439 def extra_repr(self):
440 out_features, in_features = None, None
441 if self.weight is not None:
442 out_features, in_features = self.weight.ds_shape[-2:] if is_zero_param(
443 self.weight) else self.weight.shape[-2:]
444 dtype = self.weight.dtype if self.weight is not None else None
445 return "in_features={}, out_features={}, bias={}, dtype={}".format(in_features, out_features, self.bias
446 is not None, dtype)
447
448 def move(self, tensor):
449 # TODO: consider the timing of deletion

Callers

nothing calls this directly

Calls 1

is_zero_paramFunction · 0.90

Tested by

no test coverage detected