default: ~/.cache/huggingface/
So if you don't have any specific environment variable set, the cache directory will be at
~/.cache/huggingface/transformers/.
Note: If you have set a shell environment variable for one of the predecessors of this library
(PYTORCH_TRANSFORMERS_CACHE or PYTORCH_PRETRAINED_BERT_CACHE), those will be used if there is no shell
environment variable for TRANSFORMERS_CACHE.
Offline mode
It's possible to run 🤗 Transformers in a firewalled or a no-network environment.
Setting environment variable TRANSFORMERS_OFFLINE=1 will tell 🤗 Transformers to use local files only and will not try to look things up.
Most likely you may want to couple this with HF_DATASETS_OFFLINE=1 that performs the same for 🤗 Datasets if you're using the latter.
Here is an example of how this can be used on a filesystem that is shared between a normally networked and a firewalled to the external world instances.
