dkushari
Databricks Employee
Databricks Employee

Hi @Mahsa, can you use the local disk as a cache instead of a volume? It should work. Please see below

%pip install -U "transformers==4.44.2" "huggingface_hub>=0.20.0" accelerate datasets evaluate torch safetensors
dbutils.library.restartPython()


from transformers import pipeline

sentiment_classifier = pipeline(
    task="text-classification",
    model="nickwong64/bert-base-uncased-poems-sentiment",
    trust_remote_code=True,
    model_kwargs={'cache_dir': '/local_disk0/tmp/hf_cache'}
)