Python function
download_weight_files
download_weight_files()
max.pipelines.download_weight_files(huggingface_model_id, filenames, revision=None, force_download=False, max_workers=8)
Downloads weight files for a Hugging Face model and returns local paths.
-
Parameters:
-
- huggingface_model_id (str) – The Hugging Face model identifier, that is,
modularai/Llama-3.1-8B-Instruct-GGUF - filenames (list[str]) – A list of file paths relative to the root of the Hugging Face repo. If files provided are available locally, download is skipped, and the local files are used.
- revision (str | None) – The Hugging Face revision to use. If provided, we check our cache directly without needing to go to Hugging Face directly, saving a network call.
- force_download (bool) – A boolean, indicating whether we should force the files to be redownloaded, even if they are already available in our local cache, or a provided path.
- max_workers (int) – The number of worker threads to concurrently download files.
- huggingface_model_id (str) – The Hugging Face model identifier, that is,
-
Return type:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!