(self, input_: torch.Tensor)
| 30 | return output |
| 31 | |
| 32 | def forward_RowParallelLinear(self, input_: torch.Tensor) -> torch.Tensor: # type:ignore |
| 33 | # Set up backprop all-reduce. |
| 34 | if self.input_is_parallel: |
| 35 | input_parallel = input_ |
| 36 | else: |
| 37 | input_parallel = scatter_to_model_parallel_region(input_) |
| 38 | # Matrix multiply. |
| 39 | output_parallel = self.quanted_layer(input_parallel) |
| 40 | # All-reduce across all the partitions. |
| 41 | output_ = reduce_from_model_parallel_region(output_parallel) |
| 42 | if self.bias is not None: |
| 43 | output = output_ + self.bias |
| 44 | else: |
| 45 | output = output_ |
| 46 | return output |
| 47 | |
| 48 | def forward_LoraColumnParallelLinear(self, input_: torch.Tensor) -> torch.Tensor: # type: ignore |
| 49 | # Set up backprop all-reduce. |
nothing calls this directly
no outgoing calls
no test coverage detected