With conda
Since Transformers version v4.0.0, we now have a conda channel: huggingface.
🤗 Transformers can be installed using conda as follows:
conda install -c huggingface transformers
Follow the installation pages of TensorFlow, PyTorch or Flax to see how to install them with conda.
Caching models
This library provides pretrained models that will be downloaded and cached locally. Unless you specify a location with
cache_dir=... when you use methods like from_pretrained, these models will automatically be downloaded in the
folder given by the shell environment variable TRANSFORMERS_CACHE. The default value for it will be the Hugging
Face cache home followed by /transformers/. This is (by order of priority):
shell environment variable HF_HOME
shell environment variable XDG_CACHE_HOME + /huggingface/
