From f718a391c03c1b1ac870e9a083ca686613bac48f Mon Sep 17 00:00:00 2001 From: fakezeta Date: Wed, 24 Apr 2024 02:45:37 +0200 Subject: [PATCH] fix missing TrustRemoteCode in OpenVINO model load (#2114) --- backend/python/transformers/transformers_server.py | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/python/transformers/transformers_server.py b/backend/python/transformers/transformers_server.py index 90053ed5..2f4140c2 100755 --- a/backend/python/transformers/transformers_server.py +++ b/backend/python/transformers/transformers_server.py @@ -149,6 +149,7 @@ class BackendServicer(backend_pb2_grpc.BackendServicer): device_map="CPU" self.model = OVModelForCausalLM.from_pretrained(model_name, compile=True, + trust_remote_code=request.TrustRemoteCode, ov_config={"PERFORMANCE_HINT": "LATENCY"}, device=device_map) self.OV = True