Learn R Programming

edgemodelr (version 0.2.0)

edge_quick_setup: Quick setup for a popular model

Description

Quick setup for a popular model

Usage

edge_quick_setup(
  model_name,
  cache_dir = NULL,
  verify_checksum = TRUE,
  expected_sha256 = NULL,
  trust_first_use = FALSE,
  verbose = TRUE
)

Value

List with model path and context (if llama.cpp is available)

Arguments

model_name

Name of the model from edge_list_models()

cache_dir

Directory to store downloaded models

verify_checksum

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

expected_sha256

Optional expected SHA-256 hash for the model file

trust_first_use

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

verbose

Whether to print setup progress messages

Examples

Run this code
if (FALSE) {
# Quick setup with TinyLlama (downloads model, not run in checks)
setup <- edge_quick_setup("TinyLlama-1.1B")
ctx <- setup$context

if (!is.null(ctx)) {
  response <- edge_completion(ctx, "Hello!")
  cat("Response:", response, "\n")
  edge_free_model(ctx)
}
}

Run the code above in your browser using DataLab