Are huggingface models downloaded on my machine?

Hi there,
While reading the documentation for the huggingface transformers, i came across a statement which says that the models are downloaded locally and cached on my computer. And although i have found the files that the documentation points to, i don’t entirely understand how an entire transformer model can be cached on my laptop without taking up significant space on my harddrive…the files i have found are less then 1mb…

can someone please point to further documentation or help me clarify whether the pipeline function acts as an API between my computer and huggingface hub to process the inputs?

Hi! transformers uses huggingface_hub to structure the cache. You can find detailed docs on it here (it’s also possible to scan it).

can someone please point to further documentation or help me clarify whether the pipeline function acts as an API between my computer and huggingface hub to process the inputs?

pipeline downloads the specified model from the Hub and runs inference on it locally. To run inference on a model hosted on the Hub, you can use the Inference API.