From b144a532efe7864adc0fbfb8d662e39fa4daa020 Mon Sep 17 00:00:00 2001 From: Jesse Cai Date: Mon, 30 Dec 2024 10:16:59 -0800 Subject: [PATCH] formatting --- torchao/quantization/quant_api.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/torchao/quantization/quant_api.py b/torchao/quantization/quant_api.py index 28f4ad9a9..c7c0de04d 100644 --- a/torchao/quantization/quant_api.py +++ b/torchao/quantization/quant_api.py @@ -803,7 +803,9 @@ def _int8_symm_per_token_reduced_range_quant(x: torch.Tensor) -> torch.Tensor: ) -def _int8_symm_per_token_reduced_range_quant_noop_decode(x: torch.Tensor) -> torch.Tensor: +def _int8_symm_per_token_reduced_range_quant_noop_decode( + x: torch.Tensor, +) -> torch.Tensor: mapping_type = MappingType.SYMMETRIC target_dtype = torch.int8 eps = 1e-5 @@ -825,7 +827,9 @@ def _int8_symm_per_token_reduced_range_quant_noop_decode(x: torch.Tensor) -> tor def int8_dynamic_activation_int8_weight( - layout=PlainLayout(), act_mapping_type=MappingType.SYMMETRIC, weight_only_decode=False + layout=PlainLayout(), + act_mapping_type=MappingType.SYMMETRIC, + weight_only_decode=False, ): """ Applies int8 dynamic symmetric per-token activation and int8 per-channel weight