ple: --ple-io ram: refused on Windows (no mlock), 'locked' only when mlock succeeded else 'loaded (not locked)', neutral comments + --help (review)
This commit is contained in:
1 parent
0d40c17d2f
commit
be41a09e5b
3 files changed
+24
-8
No files matched your search
@@ -319,8 +319,9 @@ void usage() {
|
||||
" --tokens-file PATH pretokenized prompt, commas or whitespace (alternative to --tokens)\n"
|
||||
" --ple-gguf PATH required PLE table (original second GGUF shard)\n"
|
||||
" --no-ple explicit diagnostic ablation of the PLE layer\n"
|
||||
" --ple-io direct|mmap|ram n-gram table reads (ram = mmap, locked in RAM at start); (plan v0.3 P2). direct (default): unbuffered SSD\n"
|
||||
" reads, the table never enters RAM or the file cache; mmap: A/B arm\n"
|
||||
" --ple-io direct|mmap|ram n-gram table reads (plan v0.3 P2). direct (default): unbuffered SSD\n"
|
||||
" reads, the table never enters RAM or the file cache; mmap: A/B arm;\n"
|
||||
" ram: mmap with the whole table locked in RAM at start (Linux/macOS)\n"
|
||||
" --ple-row-cache N bounded cache of fetched rows, 90 B each (default 1048576; 0 = off)\n"
|
||||
" --ple-inflight N outstanding SSD reads (default 64)\n"
|
||||
" --ple-delay-us U fault injection: each row read completes no earlier than U us\n"
|
||||
@@ -1200,6 +1201,12 @@ int main(int argc, char** argv) {
|
||||
std::fprintf(stderr, "strata generate: invalid --ple-io/--ple-row-cache/--ple-inflight/--ple-delay-us\n");
|
||||
return 2;
|
||||
}
|
||||
#if defined(_WIN32)
|
||||
if (o.ple_io == "ram") {
|
||||
std::fprintf(stderr, "strata generate: --ple-io ram is not available on Windows (no mlock); use --ple-io mmap\n");
|
||||
return 2;
|
||||
}
|
||||
#endif
|
||||
if (o.kv == "q4") o.kv = "q4_0";
|
||||
if (o.kv != "fp16" && o.kv != "int8" && o.kv != "q4_0" && o.kv != "k8v4") {
|
||||
std::fprintf(stderr, "strata generate: --kv must be fp16, int8, q4_0 or k8v4\n");
|
||||
@@ -1565,7 +1572,7 @@ int main(int argc, char** argv) {
|
||||
if (!o.ple_gguf.empty()) {
|
||||
strata::kernels::PleIoOptions pio;
|
||||
pio.mode = o.ple_io == "mmap" || o.ple_io == "ram" ? strata::kernels::PleIo::Mmap : strata::kernels::PleIo::Direct;
|
||||
pio.lock = o.ple_io == "ram"; // dual-3090: the whole table locked in RAM
|
||||
pio.lock = o.ple_io == "ram";
|
||||
const auto tpl = Clock::now();
|
||||
pio.max_inflight = (uint32_t) o.ple_inflight;
|
||||
pio.cache_rows = (uint64_t) o.ple_row_cache;
|
||||
@@ -1575,7 +1582,8 @@ int main(int argc, char** argv) {
|
||||
return 1;
|
||||
}
|
||||
if (pio.lock)
|
||||
std::fprintf(stderr, "strata generate: PLE table locked in RAM (--ple-io ram) in %.1f s\n",
|
||||
std::fprintf(stderr, "strata generate: PLE table %s (--ple-io ram) in %.1f s\n",
|
||||
ple_table.locked() ? "locked in RAM" : "loaded (not locked)",
|
||||
std::chrono::duration<double>(Clock::now() - tpl).count());
|
||||
const strata::core::WeightRef* wk = wt.find("blk.1.ple_key.weight");
|
||||
const strata::core::WeightRef* wv = wt.find("blk.1.ple_value.weight");
|
||||
|
||||
Reference in new issue
Block a user