From 7ef5a133a488fbd3df58a37b9339ab9d7b1cd196 Mon Sep 17 00:00:00 2001 From: Anton Bacaj Date: Mon, 26 Jun 2023 15:16:46 +0000 Subject: [PATCH] use absolute path --- download_model.py | 2 +- inference.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/download_model.py b/download_model.py index 9ebca0b..371bf4b 100644 --- a/download_model.py +++ b/download_model.py @@ -3,7 +3,7 @@ from huggingface_hub import hf_hub_download def download_mpt_quant(destination_folder: str, repo_id: str, model_filename: str): - local_path = os.path.relpath(destination_folder) + local_path = os.path.abspath(destination_folder) return hf_hub_download( repo_id=repo_id, filename=model_filename, diff --git a/inference.py b/inference.py index 73f84fa..2b7d821 100644 --- a/inference.py +++ b/inference.py @@ -51,7 +51,7 @@ def generate( if __name__ == "__main__": config = AutoConfig.from_pretrained("mosaicml/mpt-30b-chat", context_length=8192) llm = AutoModelForCausalLM.from_pretrained( - "models/mpt-30b-chat.ggmlv0.q4_1.bin", + os.path.abspath("models/mpt-30b-chat.ggmlv0.q4_1.bin"), model_type="mpt", config=config, )