if (FALSE) {
# Load local GGUF model
model <- model_load("/path/to/my_model.gguf")
# Download from Hugging Face and cache locally
hf_path = "https://huggingface.co/Qwen/Qwen3-0.6B-GGUF/resolve/main/Qwen3-0.6B-Q8_0.gguf"
model <- model_load(hf_path)
# Load with GPU acceleration (offload 10 layers)
model <- model_load("/path/to/model.gguf", n_gpu_layers = 10)
# Download to custom cache directory
model <- model_load(hf_path,
cache_dir = file.path(tempdir(), "my_models"))
# Force fresh download (ignore cache)
model <- model_load(hf_path,
force_redownload = TRUE)
# High-performance settings for large models
model <- model_load("/path/to/large_model.gguf",
n_gpu_layers = -1, # All layers on GPU
use_mlock = TRUE) # Lock in memory
# Load with minimal verbosity (quiet mode)
model <- model_load("/path/to/model.gguf", verbosity = 2L)
}
Run the code above in your browser using DataLab