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, )