MCPcopy Create free account
hub / github.com/AIS-SNU/Smart-Infinity / __init__

Method __init__

deepspeed/runtime/weight_quantizer.py:13–19  ·  view source on GitHub ↗
(self, mlp_extra_grouping=True, mp_size=1)

Source from the content-addressed store, hash-verified

11class 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)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected