Distribute and run LLMs with a single file.
C++ cross-platformggufllama-cpplocal-ailocal-inferencelocal-llmopen-source-aisingle-file-executablespeech-to-text
docs(support): document the Vulkan GPU backend (#1029) (#1033)
Tai An486e6c5f9356
diff --git a/docs/support.md b/docs/support.mdindex eb849703..a82b2f49 100644--- a/docs/support.md+++ b/docs/support.md@@ -36,16 +36,30 @@ llamafile supports the following CPUs:## GPU support-llamafile ships GPU acceleration for Apple Metal, NVIDIA, and AMD. There is-no Vulkan or Intel oneAPI/SYCL backend, so on hardware outside the table-below llamafile runs on the CPU.+llamafile ships GPU acceleration for Apple Metal, NVIDIA, AMD, and Vulkan.+There is no Intel oneAPI/SYCL backend, but Vulkan covers a lot of the+hardware that CUDA and ROCm do not. On hardware outside the table below,+llamafile runs on the CPU.++CUDA, ROCm, and Vulkan dynamic libraries are loaded as follows. The executable looks+for prebuilt `ggml-(cuda|rocm|vulkan).(so|dll)` files in this order:++- in the same directory (deliberately first, so a hand-built DSO overrides everything else)+- in the llamafile bundle+- in `~/.llamafile/v/LLAMAFILE_VERSION`+- in `$HOME`++Check out [Building the GPU libraries](building_dlls.md) for more info on how these libraries are built.+On macOS, Vulkan runs through MoltenVK; Apple Silicon users normally want the built-in Metal+backend instead. If any library loads but reports no usable device, llamafile skips it and continues+with the next backend rather than failing.| Vendor | Backend | Platforms | Status | Notes ||--------|---------|-----------|--------|-------|| Apple | Metal (built-in) | macOS ARM64 | Supported | Offload is enabled by default; disable with `-ngl 0` or `--gpu disable` || NVIDIA | CUDA / cuBLAS | Linux, Windows, WSL | Supported | Pass `-ngl 999` to offload; Windows release binaries ship prebuilt DLLs || AMD | HIP / rocBLAS | Linux, Windows | Supported | Pass `-ngl 999` to offload; multi-GPU may be broken on Radeon (see below) |-| Intel / other | — | — | Not supported | No Vulkan or SYCL backend; runs on CPU. For these, build llama.cpp directly |+| Any (incl. Intel) | Vulkan | Linux, Windows, macOS | Supported | Pass `-ngl 999` to offload; select with `--gpu vulkan`. Used in `--gpu auto` when no vendor backend is available |The 0.10.* series has not been tested on every GPU and platform yet, sotreat the AMD and Windows paths in particular as best-effort.@@ -116,9 +130,10 @@ To check:- Pass `-ngl 999` on NVIDIA and AMD to request maximum offloading (Metaloffloads by default).-- Force a specific backend with `--gpu nvidia` or `--gpu amd`. This turns- an otherwise quiet CPU fallback into an explicit startup error, which- makes a missing or misconfigured CUDA/ROCm toolchain easy to spot.+- Force a specific backend with `--gpu nvidia`, `--gpu amd`, or+ `--gpu vulkan`. This turns an otherwise quiet CPU fallback into an+ explicit startup error, which makes a missing or misconfigured+ CUDA/ROCm/Vulkan installation easy to spot.- Watch the startup logs for the messages about building and loading theGPU module. If you don't see them, llamafile is running on the CPU.