Error when running inference
Hi! I've been eager to try this model for documents, but I get an error when running it. It gives me an "Invalid credentials in Authorization header" because it can't seem to find the "https://huggingface.co/sergiopaniego/qwen2-7b-instruct-trl-sft-ChartQA/resolve/main/config.json" file. Is this model gated and I just didn't see that somehow, lol? Here is the full error below. Much appreciated!
ZeroGPU tensors packing: 0.00B [00:00, ?B/s]
ZeroGPU tensors packing: 0.00B [00:00, ?B/s]
- Running on local URL: http://0.0.0.0:7860, with SSR ⚡ (experimental, to disable set
ssr_mode=Falseinlaunch())
To create a public link, set share=True in launch().
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 409, in hf_raise_for_status
response.raise_for_status()
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/sergiopaniego/qwen2-7b-instruct-trl-sft-ChartQA/resolve/main/config.json
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/transformers/utils/hub.py", line 470, in cached_files
hf_hub_download(
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 961, in hf_hub_download
return _hf_hub_download_to_cache_dir(
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1068, in _hf_hub_download_to_cache_dir
_raise_on_head_call_error(head_call_error, force_download, local_files_only)
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1596, in _raise_on_head_call_error
raise head_call_error
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1484, in _get_metadata_or_catch_error
metadata = get_hf_file_metadata(
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1401, in get_hf_file_metadata
r = _request_wrapper(
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 285, in _request_wrapper
response = _request_wrapper(
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 309, in _request_wrapper
hf_raise_for_status(response)
File "/usr/local/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 482, in hf_raise_for_status
raise _format(HfHubHTTPError, str(e), response) from e
huggingface_hub.errors.HfHubHTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/sergiopaniego/qwen2-7b-instruct-trl-sft-ChartQA/resolve/main/config.json (Request ID: Root=1-681d246f-1a240fd7543a13bf4dcd69ab;341fcda9-4578-4de5-b78b-4e203d457ee2)
Invalid credentials in Authorization header
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/spaces/zero/wrappers.py", line 256, in thread_wrapper
res = future.result()
File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 451, in result
return self.__get_result()
File "/usr/local/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
raise self._exception
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/user/app/app.py", line 13, in predict
generator = pipeline("text-generation", model="sergiopaniego/qwen2-7b-instruct-trl-sft-ChartQA", device="cuda")
File "/usr/local/lib/python3.10/site-packages/transformers/pipelines/init.py", line 851, in pipeline
config = AutoConfig.from_pretrained(
File "/usr/local/lib/python3.10/site-packages/transformers/models/auto/configuration_auto.py", line 1145, in from_pretrained
config_dict, unused_kwargs = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, **kwargs)
File "/usr/local/lib/python3.10/site-packages/transformers/configuration_utils.py", line 591, in get_config_dict
config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)
File "/usr/local/lib/python3.10/site-packages/transformers/configuration_utils.py", line 650, in _get_config_dict
resolved_config_file = cached_file(
File "/usr/local/lib/python3.10/site-packages/transformers/utils/hub.py", line 312, in cached_file
file = cached_files(path_or_repo_id=path_or_repo_id, filenames=[filename], **kwargs)
File "/usr/local/lib/python3.10/site-packages/transformers/utils/hub.py", line 553, in cached_files
raise OSError(f"There was a specific connection error when trying to load {path_or_repo_id}:\n{e}")
OSError: There was a specific connection error when trying to load sergiopaniego/qwen2-7b-instruct-trl-sft-ChartQA:
401 Client Error: Unauthorized for url: https://huggingface.co/sergiopaniego/qwen2-7b-instruct-trl-sft-ChartQA/resolve/main/config.json (Request ID: Root=1-681d246f-1a240fd7543a13bf4dcd69ab;341fcda9-4578-4de5-b78b-4e203d457ee2)
Invalid credentials in Authorization header
Thanks for reporting!
The model is not gated so I recommend that you authenticate to HF Hub in your environment and also update the libraries to their latest version :)