| dragon_serve_ollama | R Documentation |
Merges the adapter into the base model (if not done already) and
registers the result with Ollama, which imports safetensors directly for
the Llama, Qwen2, Gemma, and related families. Ollama then serves it
quickly on the CPU or GPU of whatever machine it runs on, and the returned
backend points dragon_generate() and dragon_chat() at it.
dragon_serve_ollama(
run,
name = NULL,
quantize = NULL,
ollama = Sys.which("ollama")
)
run |
A |
name |
Model name to register. Defaults to |
quantize |
Optional Ollama quantization such as |
ollama |
Path to the |
Needs the ollama command on the PATH and the Ollama service running.
A dragon_backend for the served model.
if (interactive()) {
backend <- dragon_serve_ollama(run)
options(dragonfarm.backend = backend)
dragon_chat(run)$say("Hello")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.