| llama_supports_gpu | R Documentation |
Returns 'TRUE' if at least one GPU backend (e.g. Vulkan) was detected at runtime. Use the result to decide whether to pass 'n_gpu_layers != 0' to [llama_load_model].
llama_supports_gpu()
A logical scalar: TRUE if at least one GPU backend
(e.g. Vulkan) is available, FALSE otherwise.
if (llama_supports_gpu()) {
message("GPU available, will use Vulkan backend")
} else {
message("GPU not available, using CPU only")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.