From bddaa92c924ffa3072280d26e5d6a899749ed01b Mon Sep 17 00:00:00 2001 From: Adam Wilson Date: Wed, 14 May 2025 19:33:47 -0600 Subject: [PATCH] LangChain WIP; TypeError: _BaseAutoModelClass.from_pretrained() missing 1 required positional argument: 'pretrained_model_name_or_path' --- tests/llm/llm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/llm/llm.py b/tests/llm/llm.py index adf6df160..cf60716c6 100644 --- a/tests/llm/llm.py +++ b/tests/llm/llm.py @@ -17,7 +17,7 @@ class Llm: model_path = os.path.join(base_dir, "phi3") tokenizer = AutoTokenizer.from_pretrained(model_path) model = AutoModelForCausalLM.from_pretrained( - model_id=model_path, + pretrained_model_name_or_path=model_path, device_map="cpu", # Use available GPU trust_remote_code=True, # If model requires custom code )