Shortcuts

Float8StaticActivationFloat8WeightConfig

class torchao.quantization.Float8StaticActivationFloat8WeightConfig(scale: Tensor, activation_dtype: dtype = torch.float8_e4m3fn, weight_dtype: dtype = torch.float8_e4m3fn, granularity: Optional[Union[PerTensor, PerRow, Tuple[Union[PerTensor, PerRow], Union[PerTensor, PerRow]]]] = None, mm_config: Optional[Float8MMConfig] = None, set_inductor_config: bool = True)[source]

Configuration for applying float8 static symmetric quantization to

Parameters:
  • scale (torch.Tensor) – The scale tensor for activation quantization.

  • activation_dtype (torch.dtype) – The target data type for activation quantization. Default is torch.float8_e4m

  • weight_dtype (torch.dtype) – The target data type for weight quantization. Default is torch.float8_e4m

  • mm_config (Float8MMConfig) – Configuration for the matrix multiplication. Default uses fast accumulation.

  • set_inductor_config (bool) – if True, adjusts torchinductor settings to recommended values.

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