Skip to contents

Download a model manually

Usage

download_model(
  model_url,
  output_path = NULL,
  show_progress = TRUE,
  verify_integrity = TRUE,
  max_retries = 3,
  hf_token = NULL
)

Arguments

model_url

URL of the model to download (currently only supports https://)

output_path

Local path where to save the model (optional, will use cache if not provided)

show_progress

Whether to show download progress (default: TRUE)

verify_integrity

Verify file integrity after download (default: TRUE)

max_retries

Maximum number of download retries (default: 3)

hf_token

Optional Hugging Face access token to use for this download. Defaults to the existing `HF_TOKEN` environment variable.

Value

The path where the model was saved

Examples

if (FALSE) { # \dontrun{
# Download to specific location
download_model(
  "https://example.com/model.gguf",
  file.path(tempdir(), "my_model.gguf")
)

# Download to cache (path will be returned)
cached_path <- download_model("https://example.com/model.gguf")
} # }