Load model from local path not from Huggingface

#11
by andynmt - opened

I'm trying to load the model from my local machine but I keep getting this error:
Screenshot 2024-06-12 at 20.12.31.png

Does this mean that the T5ForConditionalGeneration.from_pretrained method can not load the model from local?
Does it need the "from_single_file" method?

I figured it out: you have to download the entire folder of the model and pass the local path to the folder not the model_id:

model_path = "./models/superprompt-v1"
model = T5ForConditionalGeneration.from_pretrained(model_path, use_safetensors=True)

I hope this helps!

roborovski changed discussion status to closed

Sign up or log in to comment