Skip to content

Commit a398824

Browse files
Merge pull request vllm-project#10 from slyalin/trust_remote_code_passthrough
Passthrough trust_remote_code
2 parents 9a36d7b + d617241 commit a398824

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

vllm/model_executor/openvino_model_loader.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,13 @@ def get_model(model_config: ModelConfig,
449449
if is_openvino_optimum_intel():
450450
import openvino as ov
451451
from optimum.intel import OVModelForCausalLM
452-
pt_model = OVModelForCausalLM.from_pretrained(model_config.model, export=True, compile=False, load_in_8bit=False, trust_remote_code=True) # need stateful because it also enables SDPA
452+
pt_model = OVModelForCausalLM.from_pretrained(
453+
model_config.model,
454+
export=True,
455+
compile=False,
456+
load_in_8bit=False,
457+
trust_remote_code=model_config.trust_remote_code
458+
)
453459
if not hasattr(pt_model, 'ov_node_factory'):
454460
from openvino.runtime.utils.node_factory import NodeFactory
455461
# Keep factory to destroy it in a particular moment when all other objects referencing custom nodes are destoyed

0 commit comments

Comments
 (0)