From d42f62be8495dd23d61a08b66817b79ca0f1055a Mon Sep 17 00:00:00 2001 From: Adam Wilson Date: Thu, 15 May 2025 12:05:12 -0600 Subject: [PATCH] try fixing model path --- tests/llm/llm_rag.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/llm/llm_rag.py b/tests/llm/llm_rag.py index 1bfda28ae..55d7f6201 100644 --- a/tests/llm/llm_rag.py +++ b/tests/llm/llm_rag.py @@ -29,12 +29,16 @@ model_path = os.path.join(base_dir, "cpu_and_mobile", "cpu-int4-rtn-block-32-acc print(f"Loading Phi-3 model from: {model_path}") # Load the tokenizer and model -tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True) +tokenizer = AutoTokenizer.from_pretrained( + pretrained_model_name_or_path=model_path, + trust_remote_code=True +) model = ORTModelForCausalLM.from_pretrained( - model_path, + model_id=model_path, provider="CPUExecutionProvider", trust_remote_code=True ) +model.name_or_path = model_path # Create the text generation pipeline pipe = pipeline(