ggml_model_backend: Backend a fitted ggml model actually ran on

View source: R/diagnostics.R

ggml_model_backendR Documentation

Backend a fitted ggml model actually ran on

Description

Reports the backend the model was actually compiled onto, making a silent backend = "auto" fallback to CPU (when no GPU is available) inspectable. Works on a raw sequential/functional model or a fitted parsnip engine object.

Usage

ggml_model_backend(object, verbose = FALSE)

Arguments

object

A compiled/fitted ggml_sequential_model, ggml_functional_model or ggmlr_parsnip_model.

verbose

If FALSE (default) returns a single string ("vulkan" or "cpu"). If TRUE returns a list with details (see Value).

Value

If verbose = FALSE, a length-1 character: the backend in use ("vulkan" or "cpu"). If verbose = TRUE, a list with: requested (what was asked: "auto"/"cpu"/"vulkan"), used ("vulkan"/"cpu"), device (GPU device description, or "cpu") and fallback (logical: TRUE when a non-CPU backend was requested but CPU was used instead).

See Also

ggml_training_history


ggmlR documentation built on July 14, 2026, 1:08 a.m.