Sharing downloaded models between users
I’d like several users to share downloaded models, such that when any of the users downloads a model, e.g. usingtokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)the other users would be able to use it as well for inference, without having to download it again. The users would all be using linux, but may use different hosts, have different python environments and package versions, etc. So, I’ve thought creating a shared NFS mount, e.g./modelsand mount it on all hosts. Then, for each user, symlink their HF cache hub dir to a shared path. E.g.ln -s /models ~/.cache/huggingface/hub.I don’t want to symlink~/.cache/huggingface/, since it also contains a personal HF token, andmodules.Assuming we can configure file permissions properly, could there still be issues such as:conflicts between different versions of packages, virtualenv/conda envs etc.file locking issues
2024-03-21T13:08:58Z
Did you implement this yet? I was thinking of doing something similar as downloading the same multi-gigabyte models on different computers in the network is not fun.