How to move huggingface's pretrained model to another machine?
Hi everyone, I’m having two computers, let’s call themAandB.On my computerA, I have my huggingface’stextattack/bert-base-uncased-imdbmodel already downloaded.My computerB, however, does not have access to the internet and cannot download the model.A and B can communicate through ssh. Now I’m trying to move the downloaded model from A to B by moving the entire~/.cache/huggingfaceto B, but when I run my code on computer B, it still attempts to download the model from the internet.Maybe the pretrained model in A is located somewhere else? How do I move my model from A to B?Thanks.
2021-08-02T11:01:05Z
Computer B is still trying to access the internet to check if there is a new version of the model you are using. You have to set the environment variableTRANSFORMERS_OFFLINEto some truthy value (like yes)
2021-08-02T11:16:41Z
It worked!Thank you so much.