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
| 37 | |
| 38 | @dataclass |
| 39 | class 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 |
no outgoing calls