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

Method forward

deepspeed/module_inject/layers.py:1110–1116  ·  view source on GitHub ↗
(self, input)

Source from the content-addressed store, hash-verified

1108 self.fused_loss_capture = None
1109
1110 def forward(self, input):
1111 capture = self.fused_loss_capture
1112 if capture is not None and capture.armed:
1113 # The fused loss projects ``input`` itself and reduces its gradient over TP, so the
1114 # column-parallel input collective must not run here as well.
1115 return capture.take(input)
1116 return super().forward(input)
1117
1118
1119class VocabParallelEmbedding(TensorParallel_Layer):

Callers

nothing calls this directly

Calls 2

takeMethod · 0.80
forwardMethod · 0.45

Tested by

no test coverage detected