xenova / transformers.js

State-of-the-art Machine Learning for the web. Run 🤗 Transformers directly in your browser, with no need for a server!
https://huggingface.co/docs/transformers.js
Apache License 2.0
9.71k stars 571 forks source link

env.allowLocalModels and env.allowRemoteModels #791

Open MayuraRam opened 3 weeks ago

MayuraRam commented 3 weeks ago

Question

When I set env.allowLocalModels = true and look at the env object I see both env.allowLocalModels and env.allowRemoteModels set to true. Does this mean that it will look for models locally first and then if not found go to the remoteHost?

xenova commented 3 weeks ago

Hi there 👋 That's exactly correct! Like the python library, we first look for the model locally before attempting to download the model from the Hugging Face Hub. If the model is present locally, we use it. If it is not, we fallback to the Hugging Face Hub.