|
|
@@ -382,7 +382,19 @@ export class LlamaCpp {
|
|
|
// probe GPU normally for legacy local-only setups.
|
|
|
const gpuMode = resolveLlamaGpuMode(process.env);
|
|
|
const loadLlama = async (gpu) => await getLlama({
|
|
|
- build: "autoAttempt",
|
|
|
+ // `never` = load a prebuilt binary only; never invoke cmake at query
|
|
|
+ // time. When the GPU auto-probe picks a backend whose prebuilt binary
|
|
|
+ // is incompatible with the host (e.g. the `code` LXC has libvulkan.so.1
|
|
|
+ // but no GPU device and no glslc), `autoAttempt` would compile
|
|
|
+ // llama.cpp from source per-GPU — a 30-60s+ blocking stall that then
|
|
|
+ // fails for lack of glslc and leaves a half-built localBuilds/ dir,
|
|
|
+ // hanging interactive `qmd query`. `never` instead falls straight
|
|
|
+ // through the prebuilt candidate list (Vulkan -> CUDA -> CPU) and lands
|
|
|
+ // on the prebuilt CPU binary. node-llama-cpp ships prebuilts for every
|
|
|
+ // platform we deploy on, so the source-build fallback is dead weight.
|
|
|
+ // Completes i-c28wngnd (which only covered the QMD_EMBED_ENDPOINT=cpu
|
|
|
+ // path) for the interactive / gpu:"auto" path. (i-tgac7ig3)
|
|
|
+ build: "never",
|
|
|
logLevel: LlamaLogLevel.error,
|
|
|
gpu,
|
|
|
});
|