@@ -297,6 +297,7 @@ def qconfig_init(recipe: str = None, args: Any = None) -> dict:
297297 # ways to control which layers to be quantized/skipped
298298 qcfg ["qlayer_name_pattern" ] = []
299299 qcfg ["qskip_layer_name" ] = []
300+ qcfg ["qskip_large_mag_layers" ] = False
300301 qcfg ["qspecial_layers" ] = {}
301302
302303 # settings about quantizing bmm/matmul
@@ -538,9 +539,9 @@ def add_wanted_defaults_to_config(config: dict, minimal: bool = True) -> None:
538539
539540def qconfig_save (
540541 qcfg : dict ,
541- recipe : str | None = None ,
542+ recipe : str = None ,
542543 minimal : bool = True ,
543- fname : str | Path = "qcfg.json" ,
544+ fname = "qcfg.json" ,
544545) -> None :
545546 """
546547 Try to save qcfg into a JSON file (or use .pt format if something really can't be text-only).
@@ -550,8 +551,8 @@ def qconfig_save(
550551 Args:
551552 qcfg (dict): Quantized config.
552553 recipe (str, optional): String name for a save recipe. Defaults to None.
553- minimal (bool): Save a minimal quantized config. Defaults to True.
554- fname (str): File name to save quantized config. Defaults to "qcfg.json".
554+ minimal (bool, optional ): Save a minimal quantized config. Defaults to True.
555+ fname (str, optional ): File name to save quantized config. Defaults to "qcfg.json".
555556 """
556557
557558 # First check in qcfg for added save list
@@ -598,7 +599,6 @@ def qconfig_save(
598599 warnings .warn (message , UserWarning )
599600 with open (fname , "w" , encoding = "utf-8" ) as outfile :
600601 json .dump (temp_qcfg , outfile , indent = 4 )
601- logger .info (f"Quantization configuration saved to { fname } " )
602602
603603
604604def qconfig_load (fname : str = "qcfg.json" ) -> dict :
0 commit comments