This gist shares a little workflow and script for a task that most people using university HPCs for NLP research will need to do: downloading and storing HuggingFace models for use on compute nodes.
What this workflow is for:
- Context: you want to use HuggingFace models on Della (or other HPC clusters).
- Problem 1: you cannot call
AutoModel.from_pretrained('model/name')
at run time because compute nodes are not connected to the internet. - Problem 2: running
AutoModel.from_pretrained()
on the head node is impractical because the model is too large to be loaded. - Problem 3: you do not want to save the model weights to the default
~/.cache/
because you only get 10GB of storage on/home