Shortcuts

_choose_quant_func_and_quantize_tensor

torchao.quantization.quantize_.common._choose_quant_func_and_quantize_tensor(tensor: Tensor, quant_kwargs: QuantizeTensorKwargs) Tensor[source]

Given a tensor and a kwargs container, chooses a derived dtype (float8, int8, etc) to quantize tensor to, based on the type of quant_kwargs quantizes tensor to the derived dtype chosen in (1) This is needed to support flexible quantization of activation to various derived dtypes.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources