MCPcopy Create free account
hub / github.com/AIS-SNU/Smart-Infinity / forward

Method forward

deepspeed/compression/basic_layer.py:109–118  ·  view source on GitHub ↗
(self, input)

Source from the content-addressed store, hash-verified

107 return None
108
109 def forward(self, input):
110 if self.weight_quantization_enabled_in_forward and self.weight_quantization_enabled:
111 weight = self.weight_quantizer(self.weight, self.weight.target_bits, None, None,
112 self.weight_quantize_num_groups)
113 else:
114 weight = self.weight
115
116 out = nn.functional.embedding(input, weight, self.padding_idx, self.max_norm, self.norm_type,
117 self.scale_grad_by_freq, self.sparse)
118 return out
119
120
121class LinearLayer_Compress(nn.Linear):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected