(self, input: Tensor)
| 43 | self.bias = bias |
| 44 | |
| 45 | def forward(self, input: Tensor) -> Tensor: |
| 46 | weight = decompress(self.weight, default_compression_config) |
| 47 | if self.bias is None: |
| 48 | return F.linear(input.to(weight.dtype), weight) |
| 49 | return F.linear(input.to(weight.dtype), weight, self.bias.to(weight.dtype)) |
| 50 | |
| 51 | |
| 52 | def compress_module(module, target_device): |