We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f1681b0 commit 29de539Copy full SHA for 29de539
optimum/exporters/openvino/model_patcher.py
@@ -23,6 +23,10 @@
23
24
25
def patch_model_with_bettertransformer(model):
26
+ # check that the model has not yet been pathced
27
+ if hasattr(model, "use_bettertransformer") and model.use_bettertransformer is True:
28
+ return model
29
+
30
if is_transformers_version("<", "4.36") or is_torch_version("<", "2.1.1"):
31
COLOR_RED = "\033[1;31m"
32
COLOR_RESET = "\033[0m"
0 commit comments