Learn R Programming

edgemodelr (version 0.2.0)

edge_download_url: Download a model from a direct URL

Description

Downloads a GGUF model file from any URL. Supports resume and validates GGUF format. This function is useful for downloading models from GPT4All CDN or other direct sources that don't require authentication.

Usage

edge_download_url(
  url,
  filename,
  cache_dir = NULL,
  force_download = FALSE,
  verify_checksum = TRUE,
  expected_sha256 = NULL,
  trust_first_use = FALSE,
  verbose = TRUE
)

Value

Path to the downloaded model file

Arguments

url

Direct download URL for the model

filename

Local filename to save as

cache_dir

Directory to store downloaded models (default: user cache directory)

force_download

Force re-download even if file exists

verify_checksum

Verify SHA-256 checksum if available (default: TRUE)

expected_sha256

Optional expected SHA-256 hash for the file

trust_first_use

Store a local hash if no known hash exists (default: FALSE)

verbose

Whether to print progress messages

Examples

Run this code
if (FALSE) {
# Download from GPT4All CDN (large file, not run in checks)
model_path <- edge_download_url(
  url = "https://gpt4all.io/models/gguf/mistral-7b-instruct-v0.1.Q4_0.gguf",
  filename = "mistral-7b.gguf"
)
}

Run the code above in your browser using DataLab