project-baize / baize-chatbot

Let ChatGPT teach your own chatbot in hours with a single GPU!
https://arxiv.org/abs/2304.01196
GNU General Public License v3.0
3.15k stars 275 forks source link

ValueError: Can't find 'adapter_config.json' at 'project-baize/baize-lora-7B' #51

Open tryharder31 opened 1 year ago

tryharder31 commented 1 year ago

I am trying to use the Baize API/CLI. I have followed the instructions on the readme. When I run this line:

python3 -m fastchat.model.apply_lora --base huggyllama/llama-7b --target ./model_weights/baize-7b --lora project-baize/baize-lora-7B

I get the following error. Any ideas what's going on?

Thanks!

│ /opt/conda/lib/python3.10/site-packages/peft/peft_model.py:169 in from_pretrained │ │ │ │ 166 │ │ │ │ 167 │ │ # load the config │ │ 168 │ │ config = PEFT_TYPE_TO_CONFIG_MAPPING[ │ │ ❱ 169 │ │ │ PeftConfig.from_pretrained(model_id, subfolder=kwargs.get("subfolder", None) │ │ 170 │ │ ].from_pretrained(model_id, subfolder=kwargs.get("subfolder", None), kwargs) │ │ 171 │ │ │ │ 172 │ │ if (getattr(model, "hf_device_map", None) is not None) and len( │ │ │ │ /opt/conda/lib/python3.10/site-packages/peft/utils/config.py:110 in from_pretrained │ │ │ │ 107 │ │ │ │ │ pretrained_model_name_or_path, CONFIG_NAME, subfolder=subfolder, k │ │ 108 │ │ │ │ ) │ │ 109 │ │ │ except Exception: │ │ ❱ 110 │ │ │ │ raise ValueError(f"Can't find '{CONFIG_NAME}' at '{pretrained_model_name │ │ 111 │ │ │ │ 112 │ │ loaded_attributes = cls.from_json_file(config_file) │ │ 113 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ValueError: Can't find 'adapter_config.json' at 'project-baize/baize-lora-7B'

JetRunner commented 1 year ago

It does have the config: https://huggingface.co/project-baize/baize-lora-7B/blob/main/adapter_config.json

Maybe network issue? Try download the model weights to your machine and use a local path.