<h3 dir="auto">System Info</h3>
<ul dir="auto">
<li><code class="notranslate">transformers</code> version: 4.9.1</li>
<li>Platform: Linux-4.15.0-210-generic-x86_64-with-debian-buster-sid</li>
<li>Python version: 3.7.10</li>
<li>PyTorch version (GPU?): 1.9.0 (True)</li>
<li>Tensorflow version (GPU?): not installed (NA)</li>
<li>Flax version (CPU?/GPU?/TPU?): not installed (NA)</li>
<li>Jax version: not installed</li>
<li>JaxLib version: not installed</li>
<li>Using GPU in script?: Yes</li>
<li>Using distributed or parallel set-up in script?: No</li>
</ul>
<h3 dir="auto">Who can help?</h3>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ArthurZucker/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ArthurZucker">@ArthurZucker</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/younesbelkada/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/younesbelkada">@younesbelkada</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Narsil/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Narsil">@Narsil</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sgugger/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sgugger">@sgugger</a></p>
<h3 dir="auto">Information</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> The official example scripts</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> My own modified scripts</li>
</ul>
<h3 dir="auto">Tasks</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> An officially supported task in the <code class="notranslate">examples</code> folder (such as GLUE/SQuAD, ...)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> My own task or dataset (give details below)</li>
</ul>
<h3 dir="auto">Reproduction</h3>
<ol dir="auto">
<li><code class="notranslate">from transformers import BertTokenizer, BertModel</code></li>
<li><code class="notranslate">tokenizer = BertTokenizer.from_pretrained('bert-large-cased')</code></li>
</ol>
<p dir="auto">As discussed <a href="https://huggingface.co/bert-large-cased#:~:text=from%20transformers%20import%20BertTokenizer%2C%20BertModel%0Atokenizer%20%3D%20BertTokenizer.from_pretrained(%27bert%2Dlarge%2Dcased%27)" rel="nofollow">here</a></p>
<p dir="auto">Leads to the following <code class="notranslate">HTTPError</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="HTTPError                                 Traceback (most recent call last)
&lt;ipython-input-6-5c580443a1ad&gt; in &lt;module&gt;
----&gt; 1 tokenizer = BertTokenizer.from_pretrained('bert-large-cased')

~/miniconda3/envs/cmd-chall/lib/python3.7/site-packages/transformers/tokenization_utils_base.py in from_pretrained(cls, pretrained_model_name_or_path, *init_inputs, **kwargs)
   1646             # At this point pretrained_model_name_or_path is either a directory or a model identifier name
   1647             fast_tokenizer_file = get_fast_tokenizer_file(
-&gt; 1648                 pretrained_model_name_or_path, revision=revision, use_auth_token=use_auth_token
   1649             )
   1650             additional_files_names = {

~/miniconda3/envs/cmd-chall/lib/python3.7/site-packages/transformers/tokenization_utils_base.py in get_fast_tokenizer_file(path_or_repo, revision, use_auth_token)
   3406     &quot;&quot;&quot;
   3407     # Inspect all files from the repo/folder.
-&gt; 3408     all_files = get_list_of_files(path_or_repo, revision=revision, use_auth_token=use_auth_token)
   3409     tokenizer_files_map = {}
   3410     for file_name in all_files:

~/miniconda3/envs/cmd-chall/lib/python3.7/site-packages/transformers/file_utils.py in get_list_of_files(path_or_repo, revision, use_auth_token)
   1685         token = None
   1686     model_info = HfApi(endpoint=HUGGINGFACE_CO_RESOLVE_ENDPOINT).model_info(
-&gt; 1687         path_or_repo, revision=revision, token=token
   1688     )
   1689     return [f.rfilename for f in model_info.siblings]

~/miniconda3/envs/cmd-chall/lib/python3.7/site-packages/huggingface_hub/hf_api.py in model_info(self, repo_id, revision, token)
    246         )
    247         r = requests.get(path, headers=headers)
--&gt; 248         r.raise_for_status()
    249         d = r.json()
    250         return ModelInfo(**d)

~/miniconda3/envs/cmd-chall/lib/python3.7/site-packages/requests/models.py in raise_for_status(self)
    951 
    952         if http_error_msg:
--&gt; 953             raise HTTPError(http_error_msg, response=self)
    954 
    955     def close(self):

HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/api/models/bert-large-cased"><pre class="notranslate"><code class="notranslate">HTTPError                                 Traceback (most recent call last)
&lt;ipython-input-6-5c580443a1ad&gt; in &lt;module&gt;
----&gt; 1 tokenizer = BertTokenizer.from_pretrained('bert-large-cased')

~/miniconda3/envs/cmd-chall/lib/python3.7/site-packages/transformers/tokenization_utils_base.py in from_pretrained(cls, pretrained_model_name_or_path, *init_inputs, **kwargs)
   1646             # At this point pretrained_model_name_or_path is either a directory or a model identifier name
   1647             fast_tokenizer_file = get_fast_tokenizer_file(
-&gt; 1648                 pretrained_model_name_or_path, revision=revision, use_auth_token=use_auth_token
   1649             )
   1650             additional_files_names = {

~/miniconda3/envs/cmd-chall/lib/python3.7/site-packages/transformers/tokenization_utils_base.py in get_fast_tokenizer_file(path_or_repo, revision, use_auth_token)
   3406     """
   3407     # Inspect all files from the repo/folder.
-&gt; 3408     all_files = get_list_of_files(path_or_repo, revision=revision, use_auth_token=use_auth_token)
   3409     tokenizer_files_map = {}
   3410     for file_name in all_files:

~/miniconda3/envs/cmd-chall/lib/python3.7/site-packages/transformers/file_utils.py in get_list_of_files(path_or_repo, revision, use_auth_token)
   1685         token = None
   1686     model_info = HfApi(endpoint=HUGGINGFACE_CO_RESOLVE_ENDPOINT).model_info(
-&gt; 1687         path_or_repo, revision=revision, token=token
   1688     )
   1689     return [f.rfilename for f in model_info.siblings]

~/miniconda3/envs/cmd-chall/lib/python3.7/site-packages/huggingface_hub/hf_api.py in model_info(self, repo_id, revision, token)
    246         )
    247         r = requests.get(path, headers=headers)
--&gt; 248         r.raise_for_status()
    249         d = r.json()
    250         return ModelInfo(**d)

~/miniconda3/envs/cmd-chall/lib/python3.7/site-packages/requests/models.py in raise_for_status(self)
    951 
    952         if http_error_msg:
--&gt; 953             raise HTTPError(http_error_msg, response=self)
    954 
    955     def close(self):

HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/api/models/bert-large-cased
</code></pre></div>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">Should run without <code class="notranslate">HTTPError</code></p>
<p dir="auto">`File /usr/local/lib/python3.9/dist-packages/huggingface_hub/utils/_errors.py:259, in hf_raise_for_status(response, endpoint_name)<br>
258 try:<br>
--&gt; 259     response.raise_for_status()<br>
260 except HTTPError as e:</p>
<p dir="auto">File /usr/local/lib/python3.9/dist-packages/requests/models.py:1021, in Response.raise_for_status(self)<br>
1020 if http_error_msg:<br>
-&gt; 1021     raise HTTPError(http_error_msg, response=self)</p>
<p dir="auto">HTTPError: 504 Server Error: Gateway Time-out for url: <a href="https://huggingface.co/api/models/bert-base-uncased/tree/main?recursive=True" rel="nofollow">https://huggingface.co/api/models/bert-base-uncased/tree/main?recursive=True</a></p>
<p dir="auto">The above exception was the direct cause of the following exception:</p>
<p dir="auto">HfHubHTTPError                            Traceback (most recent call last)<br>
Cell In[6], line 2<br>
1 from transformers import BertTokenizer<br>
----&gt; 2 tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')</p>
<p dir="auto">File ~/.local/lib/python3.9/site-packages/transformers/tokenization_utils_base.py:1654, in PreTrainedTokenizerBase.from_pretrained(cls, pretrained_model_name_or_path, *init_inputs, **kwargs)<br>
1651     vocab_files[file_id] = pretrained_model_name_or_path<br>
1652 else:<br>
1653     # At this point pretrained_model_name_or_path is either a directory or a model identifier name<br>
-&gt; 1654     fast_tokenizer_file = get_fast_tokenizer_file(<br>
1655         pretrained_model_name_or_path,<br>
1656         revision=revision,<br>
1657         use_auth_token=use_auth_token,<br>
1658         local_files_only=local_files_only,<br>
1659     )<br>
1660     additional_files_names = {<br>
1661         "added_tokens_file": ADDED_TOKENS_FILE,<br>
1662         "special_tokens_map_file": SPECIAL_TOKENS_MAP_FILE,<br>
1663         "tokenizer_config_file": TOKENIZER_CONFIG_FILE,<br>
1664         "tokenizer_file": fast_tokenizer_file,<br>
1665     }<br>
1666     # Look for the tokenizer files</p>
<p dir="auto">File ~/.local/lib/python3.9/site-packages/transformers/tokenization_utils_base.py:3486, in get_fast_tokenizer_file(path_or_repo, revision, use_auth_token, local_files_only)<br>
3466 """<br>
3467 Get the tokenizer file to use for this version of transformers.<br>
3468<br>
(...)<br>
3483     <code class="notranslate">str</code>: The tokenizer file to use.<br>
3484 """<br>
3485 # Inspect all files from the repo/folder.<br>
-&gt; 3486 all_files = get_list_of_files(<br>
3487     path_or_repo, revision=revision, use_auth_token=use_auth_token, local_files_only=local_files_only<br>
3488 )<br>
3489 tokenizer_files_map = {}<br>
3490 for file_name in all_files:</p>
<p dir="auto">File ~/.local/lib/python3.9/site-packages/transformers/file_utils.py:2103, in get_list_of_files(path_or_repo, revision, use_auth_token, local_files_only)<br>
2101 else:<br>
2102     token = None<br>
-&gt; 2103 return list_repo_files(path_or_repo, revision=revision, token=token)</p>
<p dir="auto">File /usr/local/lib/python3.9/dist-packages/huggingface_hub/utils/_deprecation.py:103, in _deprecate_arguments.._inner_deprecate_positional_args..inner_f(*args, **kwargs)<br>
101         message += "\n\n" + custom_message<br>
102     warnings.warn(message, FutureWarning)<br>
--&gt; 103 return f(*args, **kwargs)</p>
<p dir="auto">File /usr/local/lib/python3.9/dist-packages/huggingface_hub/utils/_validators.py:120, in validate_hf_hub_args.._inner_fn(*args, **kwargs)<br>
117 if check_use_auth_token:<br>
118     kwargs = smoothly_deprecate_use_auth_token(fn_name=fn.<strong>name</strong>, has_token=has_token, kwargs=kwargs)<br>
--&gt; 120 return fn(*args, **kwargs)</p>
<p dir="auto">File /usr/local/lib/python3.9/dist-packages/huggingface_hub/hf_api.py:1966, in HfApi.list_repo_files(self, repo_id, revision, repo_type, timeout, token)<br>
1936 @_deprecate_arguments(version="0.17", deprecated_args=["timeout"], custom_message="timeout is not used anymore.")<br>
1937 @validate_hf_hub_args<br>
1938 def list_repo_files(<br>
(...)<br>
1945     token: Optional[Union[bool, str]] = None,<br>
1946 ) -&gt; List[str]:<br>
1947     """<br>
1948     Get the list of files in a given repo.<br>
1949<br>
(...)<br>
1964         <code class="notranslate">List[str]</code>: the list of files in a given repository.<br>
1965     """<br>
-&gt; 1966     return [<br>
1967         f.rfilename<br>
1968         for f in self.list_files_info(<br>
1969             repo_id=repo_id, paths=None, revision=revision, repo_type=repo_type, token=token<br>
1970         )<br>
1971     ]</p>
<p dir="auto">File /usr/local/lib/python3.9/dist-packages/huggingface_hub/hf_api.py:1966, in (.0)<br>
1936 @_deprecate_arguments(version="0.17", deprecated_args=["timeout"], custom_message="timeout is not used anymore.")<br>
1937 @validate_hf_hub_args<br>
1938 def list_repo_files(<br>
(...)<br>
1945     token: Optional[Union[bool, str]] = None,<br>
1946 ) -&gt; List[str]:<br>
1947     """<br>
1948     Get the list of files in a given repo.<br>
1949<br>
(...)<br>
1964         <code class="notranslate">List[str]</code>: the list of files in a given repository.<br>
1965     """<br>
-&gt; 1966     return [<br>
1967         f.rfilename<br>
1968         for f in self.list_files_info(<br>
1969             repo_id=repo_id, paths=None, revision=revision, repo_type=repo_type, token=token<br>
1970         )<br>
1971     ]</p>
<p dir="auto">File /usr/local/lib/python3.9/dist-packages/huggingface_hub/hf_api.py:1932, in HfApi.list_files_info(self, repo_id, paths, revision, repo_type, token)<br>
1930 encoded_path = "/" + quote(path, safe="") if path else ""<br>
1931 tree_url = f"{self.endpoint}/api/{repo_type}s/{repo_id}/tree/{revision}{encoded_path}"<br>
-&gt; 1932 for subpath_info in paginate(path=tree_url, headers=headers, params={"recursive": True}):<br>
1933     if subpath_info["type"] == "file":<br>
1934         yield _format_as_repo_file(subpath_info)</p>
<p dir="auto">File /usr/local/lib/python3.9/dist-packages/huggingface_hub/utils/_pagination.py:36, in paginate(path, params, headers)<br>
34 session = get_session()<br>
35 r = session.get(path, params=params, headers=headers)<br>
---&gt; 36 hf_raise_for_status(r)<br>
37 yield from r.json()<br>
39 # Follow pages<br>
40 # Next link already contains query params</p>
<p dir="auto">File /usr/local/lib/python3.9/dist-packages/huggingface_hub/utils/_errors.py:301, in hf_raise_for_status(response, endpoint_name)<br>
297     raise BadRequestError(message, response=response) from e<br>
299 # Convert <code class="notranslate">HTTPError</code> into a <code class="notranslate">HfHubHTTPError</code> to display request information<br>
300 # as well (request id and/or server error message)<br>
--&gt; 301 raise HfHubHTTPError(str(e), response=response) from e</p>
<p dir="auto">HfHubHTTPError: 504 Server Error: Gateway Time-out for url: <a href="https://huggingface.co/api/models/bert-base-uncased/tree/main?recursive=True%60" rel="nofollow">https://huggingface.co/api/models/bert-base-uncased/tree/main?recursive=True`</a></p>