(self, mlp_extra_grouping=True, mp_size=1)
| 11 | class WeightQuantization(object): |
| 12 | |
| 13 | def __init__(self, mlp_extra_grouping=True, mp_size=1): |
| 14 | self.dense_scales = [] |
| 15 | self.qkv_scales = [] |
| 16 | self.mlp4hh_scales = [] |
| 17 | self.mlph4h_scales = [] |
| 18 | self.mlp_extra_grouping = mlp_extra_grouping |
| 19 | self.mp_size = mp_size |
| 20 | |
| 21 | def quantize_data(self, data, quantize_bits, groups, key=None): |
| 22 | data_groups = torch.split(data.float().view(-1), data.numel() // groups) |
nothing calls this directly
no outgoing calls
no test coverage detected