diff --git a/optimum/intel/ipex/modeling_base.py b/optimum/intel/ipex/modeling_base.py index c462eed046..b19e45af1e 100644 --- a/optimum/intel/ipex/modeling_base.py +++ b/optimum/intel/ipex/modeling_base.py @@ -131,6 +131,8 @@ def __init__( else: self._device = torch.device("cpu") + config = config or model.config + OptimizedModel.__init__(self, model=model, config=config) self.model.to(self._device)