Skip to content

PTQ-Level Efficiency, QAT-Level Accuracy | 训练后量化的效率,量化感知训练的精度

fix import typo

Zhang, Weiwei1d1674a6b99c7
diff --git a/auto_round/config.py b/auto_round/config.py
index 8d43ceaed..caf0bae9d 100644
--- a/auto_round/config.py
+++ b/auto_round/config.py
@@ -15,15 +15,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""Configs for Autoround quantization."""
-try:
- from neural_compressor.utils.utility import LazyImport
- torch = LazyImport("torch")
- from neural_compressor.utils import logger
-except: # pragma: no cover
- import logging
- import torch
- logger = logging.getLogger()
-
+
+import logging
+import torch
+logger = logging.getLogger()
import copy
import json
import os
@@ -226,4 +221,4 @@ class AutoroundQuantConfig(PretrainedConfig):
def get_config_dict(
cls, pretrained_model_name_or_path: Union[str, os.PathLike], **kwargs
) -> Tuple[Dict[str, Any], Dict[str, Any]]:
- return super().get_config_dict(pretrained_model_name_or_path, _configuration_file=QUANT_CONFIG, **kwargs)
\ No newline at end of file
+ return super().get_config_dict(pretrained_model_name_or_path, _configuration_file=QUANT_CONFIG, **kwargs)