(self, input)
| 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 | |
| 1119 | class VocabParallelEmbedding(TensorParallel_Layer): |