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

Method quantize

deepspeed/ops/fp_quantizer/quantize.py:30–36  ·  view source on GitHub ↗
(self,
                 input,
                 q_bits=8,
                 q_mantisa_bits=3,
                 stochastic_mode=False,
                 return_meta_tensor=False)

Source from the content-addressed store, hash-verified

28
29 @abc.abstractmethod
30 def quantize(self,
31 input,
32 q_bits=8,
33 q_mantisa_bits=3,
34 stochastic_mode=False,
35 return_meta_tensor=False) -> torch.Tensor:
36 ...
37
38 @abc.abstractmethod
39 def dequantize(self, input_q, fp_out=None, q_bits=8, q_mantisa_bits=3, scale=None) -> torch.Tensor:

Callers 2

__init__Method · 0.45
quantizeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected