Learn R Programming

edgemodelr (version 0.2.0)

edge_load_ollama_model: Load an Ollama model by partial SHA-256 hash

Description

Find and load an Ollama model using a partial SHA-256 hash instead of the full path. This is more convenient than typing out the full blob path.

Usage

edge_load_ollama_model(partial_hash, n_ctx = 2048L, n_gpu_layers = 0L)

Value

Model context if successful, throws error if not found or incompatible

Arguments

partial_hash

First few characters of the SHA-256 hash

n_ctx

Maximum context length (default: 2048)

n_gpu_layers

Number of layers to offload to GPU (default: 0)

Examples

Run this code
if (FALSE) {
# Load model using first 8 characters of SHA hash
# ctx <- edge_load_ollama_model("b112e727")
# result <- edge_completion(ctx, "Hello", n_predict = 10)
# edge_free_model(ctx)
}

Run the code above in your browser using DataLab