From a74acb6dd2c9509c0188c2d00f707bedbd29f84e Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Thu, 1 Oct 2026 03:03:17 +0200 Subject: [PATCH] CS-T: the partial pin of the RAM tier opt-in (STRATA_PARTIAL_PIN=1) On the RTX 5070 / 64 GB PC the GPU computing a share of the misses over PCIe measured no faster than the CPU: 7.30 and 7.44 tok/s with 24 and 16 GiB of a 40 GiB budget registered, against 7.05-7.74 unpinned, and registering costs startup time and driver memory. The default budget mode is now locked-only; the routing-aware prefetch (multi-run A/B: 6.93 -> 7.91 tok/s mean, identical answers) stays on with the GGUF in place. --- src/core/expert_source.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/expert_source.cpp b/src/core/expert_source.cpp index ca172d86..5d8e0556 100644 --- a/src/core/expert_source.cpp +++ b/src/core/expert_source.cpp @@ -1148,9 +1148,12 @@ bool FileExpertSource::pin_cache_complement( // read by the GPU over PCIe (--pcie-frac) and copied by DMA; only the rest is locked in the working // set (the registered prefix is page-locked by the driver already - locking it twice made the next // device allocation fail). + // opt-in (STRATA_PARTIAL_PIN=1): on the RTX 5070 PC the GPU's PCIe share of the misses measured no + // faster than the CPU computing them (7.30 / 7.44 tok/s with 24 / 16 GiB registered against 7.05-7.74 + // unpinned at a 40 GiB budget), and registering adds startup time and driver memory pressure static const bool partial_on = [] { - const char* v = std::getenv("STRATA_PARTIAL_PIN"); // 0: the A/B arm without it - return v == nullptr || std::atoi(v) != 0; + const char* v = std::getenv("STRATA_PARTIAL_PIN"); + return v != nullptr && std::atoi(v) != 0; }(); // at most STRATA_PARTIAL_PIN_GIB (default 24): registering 30 GiB of a 40 GiB arena left the driver // unable to page-lock the prompt path's small buffers afterwards (RTX 5070, WDDM)