Offline Set-up of Models
To use Huggingface models offline you will need to download the models on a machine connected to the internet and then copy them across. The easiest way to do this is to get the AI service(s) running on a machine connected to the internet and let it download all of the models for you.
More Information about how the Huggingface cache works can be found here:
AI Service Set Up
Get the respective AI Service set up on an internet connected machine.
Enable the transformers based steps in your configuration.
Run the service with run.bat
These are large files and may take a few minutes.
You should see log messages that indicate its downloading models from the internet –
Find the models
Find your models.
On a windows, by default, they can be found in: Local Disk > Users > username > .cache > huggingface > transformers
Zip them up and move them to the same place on the target server.
Make sure you place them into the right users .cache folder. You are probably running the service as a different user on the target system.
On the target system set an environment variable:
TRANSFORMERS_OFFLINE=1
Run the service.
Last updated