HazyResearch / manifest

Prompt programming with FMs.
Apache License 2.0
440 stars 46 forks source link

Unable to load local model : id must be in the form 'repo_name' or 'namespace/repo_name' #107

Open flotos opened 1 year ago

flotos commented 1 year ago

Description of the bug

When loading a local model using this command :

python3 -m manifest.api.app \
    --model_type huggingface \
    --model_name_or_path /workspace/models/minotaur-15b \
    --device 0 \
    --model_generation_type text-generation

I get the following error message : huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': '/fsx/bigcode/experiments/pretraining/conversions/starcoderplus/large-model'. Use repo_type argument if needed.

The path is indeed or valid one pulled from https://huggingface.co/openaccess-ai-collective/minotaur-15b. I tried by quoting "/workspace/models/minotaur-15b" or using a local path "./models/minotaur-15b".

To Reproduce

Clone the above repositor, and execute the specified command.

Expected behavior

It should load the model.

Environment (please complete the following information)

flotos commented 1 year ago

After digging through the code it seems repo path meant /organization/repoID, but never local path. I saw I can use the --cache option to save the models locally. But this imply that I can't use a locally trained model ?

lorr1 commented 1 year ago

Hey. I haven't seen this error before. Did you finetune minotaur and are trying to load it from a saved checkpoint? My immediate guess is the checkpoint is in a weird format but not sure. I have been able to load lots of finetuned models before.

RealTong commented 1 year ago

Same problem.

The local model cannot be loaded. It was downloaded from https://huggingface.co/NumbersStation/nsql-llama-2-7B

lorr1 commented 9 months ago

Did you just try passing NumbersStation/nsql-llama-2-7B as the model_name_or_path?