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

Method __init__

deepspeed/ops/fp_quantizer/quantize.py:45–56  ·  view source on GitHub ↗
(self, quantization_config)

Source from the content-addressed store, hash-verified

43class FP_Quantize(Quantizer):
44
45 def __init__(self, quantization_config) -> None:
46 global fp_quant_module
47 super().__init__(group_size=quantization_config.group_size)
48 if fp_quant_module is None:
49 fp_quant_module = FPQuantizerBuilder().load()
50 self.cuda_impl = getattr(fp_quant_module, "CUDA_IMPL", True)
51 self.q_config = quantization_config
52
53 self.orig_dtype = None
54 self.num_groups = None
55 self.input_q = None
56 self.scale = None
57
58 def _validate_shape(self, input):
59 if self.group_size <= 0:

Callers

nothing calls this directly

Calls 3

FPQuantizerBuilderClass · 0.90
__init__Method · 0.45
loadMethod · 0.45

Tested by

no test coverage detected