databrickslabs / dolly

Databricks’ Dolly, a large language model trained on the Databricks Machine Learning Platform
https://www.databricks.com/blog/2023/03/24/hello-dolly-democratizing-magic-chatgpt-open-models.html
Apache License 2.0
10.81k stars 1.16k forks source link

HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': 's3://skillsai-llms/dolly_LLM/dolly-7b-cust_trained_v5'. Use `repo_type` argument if needed. #198

Closed deepakkrish91 closed 1 year ago

deepakkrish91 commented 1 year ago

Hi fine tuned dolly-v2-7b using PEFT and LoRa method in databricks. I was able to store the custom model in dbfs and invoke the same for inference. But when I migrated the same model to S3 bucket to use it in aws, getting an error while invoking - Though the model repo has all dependent files and the path is also correct, not able to invoke the model using the below command.

######## Load peft config for pre-trained checkpoint etc. peft_model_id = "s3://skillsai-llms/dolly_LLM/dolly-7b-cust_trained_v5" config = PeftConfig.from_pretrained(peft_model_id)

HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': 's3://skillsai-llms/dolly_LLM/dolly-7b-cust_trained_v5'. Use repo_type argument if needed.

During handling of the above exception, another exception occurred:

ValueError Traceback (most recent call last)

in 1 # Load peft config for pre-trained checkpoint etc. 2 peft_model_id = "s3://skillsai-llms/dolly_LLM/dolly-7b-cust_trained_v5" ----> 3 config = PeftConfig.from_pretrained(peft_model_id) /opt/conda/lib/python3.7/site-packages/peft/utils/config.py in from_pretrained(cls, pretrained_model_name_or_path, subfolder, **kwargs) 112 ) 113 except Exception: --> 114 raise ValueError(f"Can't find '{CONFIG_NAME}' at '{pretrained_model_name_or_path}'") 115 116 loaded_attributes = cls.from_json_file(config_file) ValueError: Can't find 'adapter_config.json' at 's3://skillsai-llms/dolly_LLM/dolly-7b-cust_trained_v5'
srowen commented 1 year ago

I don't think an s3 URI works here. But this is a question about HF or PEFT, not this model