use absolute path

This commit is contained in:
Anton Bacaj 2023-06-26 15:16:46 +00:00
parent d027b38efd
commit 7ef5a133a4
2 changed files with 2 additions and 2 deletions

View file

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

View file

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