Skip to main content

download_model_files

Function download_model_files 

Source
pub(super) fn download_model_files(
    cache_dir: &Path,
    show_progress: bool,
    variant: ModelVariant,
) -> Result<ModelFiles>
Expand description

Downloads (or retrieves from the local hf-hub snapshot cache) the ONNX model and tokenizer files for the given model variant.

show_progress enables hf-hub’s download progress bar; pass true only for the leader worker (worker 0) so progress is shown exactly once.