File tier: a pack's experts.bin is read unbuffered too (Windows)

setup's low-RAM packs have an experts.bin, and with it 0.1.31's tier mapped it: on an emulated 32 GB PC the mapped
reads took the RAM the budget was sized for, and available RAM fell below 1 GB (#286, measured yesterday).

- set_unbuffered also takes experts.bin (paths_ is the one file); read_direct reads one window per blob (a blob is
  contiguous there) and merges near ones as for the GGUF.
- blob() hands out the stage buffers for any unbuffered source (staged()), so prefetch, begin_layer and transient
  work as with the GGUF in place; the mapped experts.bin path is unchanged otherwise.

IQ2_XS pack with experts.bin, emulated 32 GB PC + 16 GB GPU, 16 GiB budget, 8K prompt + 256 tokens, two runs:
decode 100.2 / 100.6 tok/s, done at 17.2 / 15.5 s, the prompt path's host copies 2.1 s (the GGUF in place: 84-89
tok/s, 21.5-22.1 s, 4.3 s). Greedy tokens identical unbuffered, through the cache and on 0.1.31.
This commit is contained in:
sergiywith authored and Niko1221 committed 2026-10-02 22:02:39 +02:00
1 parent 8fe1a9b109
commit 49728cea44
3 files changed
+26 -12

No files matched your search

+1 -1
View File
@@ -2662,7 +2662,7 @@ int main(int argc, char** argv) {
// #286: with a RAM budget the hottest experts live in it, and the rest are read from the drive unbuffered
// when the file cache could not keep them beside the budget anyway (a 32 GB PC) - the mapped reads' page
// faults are small requests on the critical path, and their pages take the RAM the budget was sized for
if (src.gguf_mode() && (o.resident_budget > 0 || std::getenv("STRATA_UNBUFFERED_LOAD") != nullptr)) {
if (o.resident_budget > 0 || std::getenv("STRATA_UNBUFFERED_LOAD") != nullptr) {
std::string why;
const bool ub = src.set_unbuffered(o.resident_budget, why);
std::fprintf(stderr, "strata generate: the file tier reads %s (%s)\n",