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

Method forward

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

takeMethod · 0.80
forwardMethod · 0.45

Tested by

no test coverage detected