Open wenrolland opened 8 months ago
Hey! This is happening because Tiny-LLama-NSFW-Chatbot is a LoRA, not a full set of model weights. If you specify a base model to apply the LoRA to it will work. So like this, for example:
models:
- model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
parameters:
weight: 1.0
- model: TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T+bilalRahib/Tiny-LLama-NSFW-Chatbot # base+lora
parameters:
weight: 1.0
merge_method: linear
dtype: float16
Ok, thanks Charles ! I'll try this. How can you identify a LoRa on Huggingface, other than the size maybe?
Ok, thanks Charles ! I'll try this. How can you identify a LoRa on Huggingface, other than the size maybe?
You can see that its a lora from the fact that it has a adapter_config.json and adapater_model.safetensors file rather than a config.json and model-x.safetensors file
LoRA stands for Low-Rank Adaptation/Adapter which is where the adapter_model name comes from
Noted, thanks Carsten. Much appreciated.
I'm not sure what I'm doing wrong, but I tried with the example here (https://github.com/arcee-ai/mergekit/blob/main/examples/linear.yml) and it worked so my installation is good. I edited the yaml file and selected the models I wanted to merge, and I keep getting the same error on both models :
OSError: bilalRahib/Tiny-LLama-NSFW-Chatbot does not appear to have a file named config.json. Checkout 'https://huggingface.co/bilalRahib/Tiny-LLama-NSFW-Chatbot/main' for available files.
Here is the content of the yaml config file :
Here is the complete traceback :
mergekit-yaml c1.yaml . --cuda --lazy-unpickle --allow-crimes Traceback (most recent call last): File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\huggingface_hub\utils_errors.py", line 304, in hf_raise_for_status response.raise_for_status() File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\requests\models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/bilalRahib/Tiny-LLama-NSFW-Chatbot/resolve/main/config.json
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\utils\hub.py", line 398, in cached_file resolved_file = hf_hub_download( ^^^^^^^^^^^^^^^^ File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\huggingface_hub\utils_validators.py", line 118, in _inner_fn return fn(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^ File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\huggingface_hub\file_download.py", line 1261, in hf_hub_download metadata = get_hf_file_metadata( ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\huggingface_hub\utils_validators.py", line 118, in _inner_fn return fn(args, **kwargs) ^^^^^^^^^^^^^^^^^^^ File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\huggingface_hub\file_download.py", line 1667, in get_hf_file_metadata r = _request_wrapper( ^^^^^^^^^^^^^^^^^ File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\huggingface_hub\file_download.py", line 385, in _request_wrapper response = _request_wrapper( ^^^^^^^^^^^^^^^^^ File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\huggingface_hub\file_download.py", line 409, in _request_wrapper hf_raise_for_status(response) File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\huggingface_hub\utils_errors.py", line 315, in hf_raise_for_status raise EntryNotFoundError(message, response) from e huggingface_hub.utils._errors.EntryNotFoundError: 404 Client Error. (Request ID: Root=1-65f753ec-699b48b9145c019039d80929;b23a3445-8b78-4681-84c4-b405860cdd94)
Entry Not Found for url: https://huggingface.co/bilalRahib/Tiny-LLama-NSFW-Chatbot/resolve/main/config.json.
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Scripts\mergekit-yaml.exe__main.py", line 7, in
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\click\core.py", line 783, in invoke
return callback(*args, *kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Python\AI-Proj\mergekit\mergekit\options.py", line 76, in wrapper
f(args, kwargs)
File "D:\Python\AI-Proj\mergekit\mergekit\scripts\run_yaml.py", line 47, in main
run_merge(
File "D:\Python\AI-Proj\mergekit\mergekit\merge.py", line 46, in run_merge
get_architecture_info(m.config(trust_remote_code=options.trust_remote_code))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Python\AI-Proj\mergekit\mergekit\common.py", line 121, in config
return AutoConfig.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\models\auto\configuration_auto.py", line 1111, in from_pretrained
config_dict, unused_kwargs = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\configuration_utils.py", line 633, in get_config_dict
config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\configuration_utils.py", line 688, in _get_config_dict
resolved_config_file = cached_file(
^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\utils\hub.py", line 452, in cached_file
raise EnvironmentError(
OSError: bilalRahib/Tiny-LLama-NSFW-Chatbot does not appear to have a file named config.json. Checkout 'https://huggingface.co/bilalRahib/Tiny-LLama-NSFW-Chatbot/main' for available files.