Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
ef3dceff
Unverified
Commit
ef3dceff
authored
Jun 23, 2021
by
Lysandre Debut
Committed by
GitHub
Jun 23, 2021
Browse files
Add mention of the huggingface_hub methods for offline mode (#12320)
parent
e98233dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
docs/source/installation.md
docs/source/installation.md
+12
-0
No files found.
docs/source/installation.md
View file @
ef3dceff
...
@@ -172,7 +172,19 @@ python examples/pytorch/translation/run_translation.py --model_name_or_path t5-s
...
@@ -172,7 +172,19 @@ python examples/pytorch/translation/run_translation.py --model_name_or_path t5-s
```
```
and it should succeed without any hanging waiting to timeout.
and it should succeed without any hanging waiting to timeout.
#### Fetching models and tokenizers to use offline
When running a script the first time like mentioned above, the downloaded files will be cached for future reuse.
However, it is also possible to download files and point to their local path instead.
Downloading files can be done through the Web Interface by clicking on the "Download" button, but it can also be handled
programmatically using the
`huggingface_hub`
library that is a dependency to
`transformers`
:
-
Using
`snapshot_download`
to download an entire repository
-
Using
`hf_hub_download`
to download a specific file
See the reference for these methods in the huggingface_hub
[
documentation
](
https://github.com/huggingface/huggingface_hub/tree/main/src/huggingface_hub
)
.
## Do you want to run a Transformer model on a mobile device?
## Do you want to run a Transformer model on a mobile device?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment