MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / get_quant_range

Method get_quant_range

op_builder/fp_quantizer.py:42–51  ·  view source on GitHub ↗
(q_bits=None)

Source from the content-addressed store, hash-verified

40
41 @staticmethod
42 def get_quant_range(q_bits=None):
43 if q_bits == 8:
44 return 480
45 elif q_bits == 6:
46 return 28.
47 elif q_bits == 12:
48 return 510.
49 else:
50 assert (0), \
51 "Please specify the right quantization range for the selected precision!"

Calls

no outgoing calls

Tested by 2

qtorch_quantizeFunction · 0.36