""" DO THIS **BEFORE** IMPORTING transformers """ # INSIDE SCRIPT import os os.environ['TRANSFORMERS_CACHE'] = '/blabla/cache/' # FROM BASH # export TRANSFORMERS_CACHE=/blabla/cache/ """ Use variable HF_HOME instead for the library datasets """