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

Class QuantizationConfig

deepspeed/linear/config.py:39–54  ·  view source on GitHub ↗

Configuration settings for quantization for LoRAOptimizedLinear, QuantizedLinear, and QuantizedParameter Attributes: q_bits (int): The number of bits used for quantization. Default is 8. mantissa_bits (int): The number of bits reserved for the mantissa in fixed-point qu

Source from the content-addressed store, hash-verified

37
38@dataclass
39class QuantizationConfig:
40 """
41 Configuration settings for quantization for LoRAOptimizedLinear, QuantizedLinear,
42 and QuantizedParameter
43
44 Attributes:
45 q_bits (int): The number of bits used for quantization. Default is 8.
46 mantissa_bits (int): The number of bits reserved for the mantissa in fixed-point quantization. Default is 3.
47 group_size (int): The number of elements used for quantization. Default is 512.
48 q_dtype (torch.dtype): The data type to quantize to. Default is uint8. (in CUDA, buffers are allocated as
49 uint8, but inside the kernels the quantization is done to fp8)
50 """
51 q_bits: int = 8
52 mantissa_bits: int = 3
53 group_size: int = 512
54 q_dtype: torch.dtype = torch.uint8

Callers 12

_quantizerFunction · 0.90
test_fp_quant_metaFunction · 0.90
test_fp_quant_selectiveFunction · 0.90
test_fp_quantFunction · 0.90
test_hf_cloneMethod · 0.90
testMethod · 0.90
testMethod · 0.90
__new__Method · 0.70

Calls

no outgoing calls

Tested by 11

_quantizerFunction · 0.72
test_fp_quant_metaFunction · 0.72
test_fp_quant_selectiveFunction · 0.72
test_fp_quantFunction · 0.72
test_hf_cloneMethod · 0.72
testMethod · 0.72
testMethod · 0.72