We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6cd8b2d commit 6b4d80bCopy full SHA for 6b4d80b
intel_extension_for_pytorch/transformers/optimize.py
@@ -2039,11 +2039,15 @@ def optimize(
2039
return _model
2040
2041
except RuntimeError as e:
2042
- logger.warning(
2043
- f"fail to apply ipex.llm.optimize due to: {e}, fallback to the origin model",
2044
- _type=WarningType.NotSupported,
2045
- )
2046
- return model
+ # if the model is not in the list, fallback without throwing errors
+ if not well_supported_model:
+ logger.warning(
+ f"fail to apply ipex.llm.optimize due to: {e}, fallback to the origin model",
+ _type=WarningType.NotSupported,
2047
+ )
2048
+ return model
2049
+ else:
2050
+ raise e
2051
2052
return model
2053
0 commit comments