download_model: Download a model manually

View source: R/api.R

download_modelR Documentation

Download a model manually

Description

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

## Not run: 
# 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")

## End(Not run)

localLLM documentation built on Nov. 3, 2026, 1:09 a.m.