From 78c5cbbc2438b0eed4a2a6525445a2ff3a379f28 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Tue, 13 Oct 2026 06:23:47 +0200 Subject: [PATCH] q36_llama_dump: STRATA_DUMP_NGL, the GPU layers for a file that does not fit the card --- tools/qwen35/q36_llama_dump.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/qwen35/q36_llama_dump.cpp b/tools/qwen35/q36_llama_dump.cpp index 7a2c378a..cd8ee4ba 100644 --- a/tools/qwen35/q36_llama_dump.cpp +++ b/tools/qwen35/q36_llama_dump.cpp @@ -69,6 +69,9 @@ int main(int argc, char** argv) { else if (a == "--dump-full-logits") dump_full = v; else { std::fprintf(stderr, "unknown option %s\n", a.c_str()); return 2; } } + // STRATA_DUMP_NGL: the GPU layers when the caller asks for the GPU (--ngl > 0) but the file does not fit (UD-Q4_K_XL + // on a 12 GB card); the other layers run on llama.cpp's CPU backend + if (const char* g = std::getenv("STRATA_DUMP_NGL"); g != nullptr && ngl > 0) ngl = std::atoi(g); llama_backend_init(); llama_model_params mp = llama_model_default_params(); mp.n_gpu_layers = ngl;