Things I want to do
When you run test code for a model, the model may be automatically downloaded and executed from huggingface. However, in most cases, the downloaded model is not saved near the code that was executed. (You can see that it is saved locally because it is not downloaded again on subsequent runs.)
Since it’s a model, the file size is large, so you should organize it as needed.
This article explains where downloaded files are saved in a Windows 11 environment.
Storage location
The model will be saved in the following location:
C:\Users\username\.cache\huggingface
* The username is your Windows login name.
* Depending on the environment, ‘Users’ may be displayed as ‘Users’.
bonus
How to set the model’s location using from_pretrained
Set the argument of `from_pretrained` to `cache_dir=’path’`. A relative path is fine.
How to set the model location in hf_hub_download
Set the `cache_dir=’path’` argument to `hf_hub_download`. A relative path is fine.


コメント