MCPcopy Create free account
hub / github.com/THUDM/GLM / forward

Method forward

mpu/layers.py:169–176  ·  view source on GitHub ↗
(self, input_)

Source from the content-addressed store, hash-verified

167 stride=1, return_master_weight=False)
168
169 def forward(self, input_):
170 input_parallel = copy_to_model_parallel_region(input_)
171 output_parallel = F.embedding(input_parallel, self.weight,
172 self.padding_idx, self.max_norm,
173 self.norm_type, self.scale_grad_by_freq,
174 self.sparse)
175 output = gather_from_model_parallel_region(output_parallel)
176 return output
177
178
179class ColumnParallelLinear(torch.nn.Module):

Callers

nothing calls this directly

Tested by

no test coverage detected