From d18d8ba045e6d683f8e5939535453d51e28af095 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Sun, 25 Oct 2026 17:39:28 +0100 Subject: [PATCH 01/16] CUDA HC: the wide up read, one warp per row, opt-in (STRATA_GR_UP_WIDE=1) The up projection of the hyper-connection read runs 160 blocks of 8 warps (each warp takes 8 rows) on a 12.0 card, so 160 blocks of 192 SMs and ~6.7 warps an SM: the read is latency-bound at about 0.5 TB/s. This kernel takes one row per warp and 2 columns x the 4 streams a block, so the grid is N/2 = 1280 blocks (53 warps an SM). Every row's dot, xor tree, epilogue and the cross-stream sum are gr_up_multi_kernel's, in its order, so the outputs are bitwise the same; the token streams of both arms were identical in all 6 pairs measured. Measured on l620 (RTX PRO 5000 72 GB, all experts in VRAM, IQ3_S, 3 interleaved pairs, fresh engine each): story 197.4 -> 201.3 tok/s (+1.9%), code 243.0 -> 244.7 (+0.7%). Off by default (STRATA_GR_UP_WIDE unset); the q8_1 tail of S26 needs the 16-column blocks, so the wide kernel is only used when no q8_1 image is written. --- src/kernels/cuda/fused_gr.cu | 83 ++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/src/kernels/cuda/fused_gr.cu b/src/kernels/cuda/fused_gr.cu index 576e5d67..a1f2fe6c 100644 --- a/src/kernels/cuda/fused_gr.cu +++ b/src/kernels/cuda/fused_gr.cu @@ -430,6 +430,76 @@ __global__ void __launch_bounds__(THREADS) gr_up_multi_kernel(GrMulti m) { if (m.a[0].q8_mixed != nullptr) gr_q8_tail(m, d0); // S26 STRATA_QFUSE } +// 149-cuda: the same up projection with one warp per row instead of eight rows per warp. A block still covers +// all HC streams x a few columns, so the cross-stream sum stays in shared memory, and every row's dot, xor tree +// and epilogue are gr_up_multi_kernel's - bitwise the same outputs. 8 warps cover 2 columns x 4 streams (8 +// rows), so the grid grows from UPM_BLOCKS (160) to N/2 (1280): the card's SMs get ~8x the warps, which is what +// this read is short of on a 12.0 card (160 blocks do not fill 192 SMs; measured 2.6 ms per round for 1.26 GB, +// about 0.5 TB/s). Not used when the S26 q8_1 tail is on (its counter assumes UPM_COLS columns a block). +constexpr int UPW_COLS = 2; +constexpr int UPW_BLOCKS = N / UPW_COLS; + +/// STRATA_GR_UP_WIDE=1: the wide up read; default off (each card's own A/B decides). +bool gr_up_wide_on() { + static const bool on = [] { + const char* v = std::getenv("STRATA_GR_UP_WIDE"); + return v != nullptr && std::atoi(v) != 0; + }(); + return on; +} + +template +__global__ void __launch_bounds__(THREADS) gr_up_wide_kernel(GrMulti m) { + __shared__ __align__(16) float lo[MAX_T][LR]; + __shared__ float g[MAX_T][HC][UPW_COLS]; + const int t = threadIdx.x, lane = t & 31, warp = t >> 5; + const int T = EXACT_T ? MAX_T : m.T; + const int d0 = blockIdx.x * UPW_COLS; + for (int i = t; i < T * LR; i += THREADS) lo[i / LR][i % LR] = m.a[i / LR].lo[i % LR]; + __syncthreads(); + if (warp < HC * UPW_COLS) { + const int c = warp / UPW_COLS, dd = warp - c * UPW_COLS, i = c * N + d0 + dd; + const uint4* w4 = reinterpret_cast(m.a[0].w_up + (size_t) i * LR); + const Bf16x8 wa = unpack8(__ldg(w4 + lane)); + const Bf16x8 wb = unpack8(lane < LR / 8 - 32 ? __ldg(w4 + 32 + lane) : make_uint4(0, 0, 0, 0)); + float rv = 0.0f, wn = 0.0f, rsc = 0.0f, bo = 0.0f, ip = 0.0f; + bool apply = false; + if (lane < T) { + const FusedGrArgs& a = m.a[lane]; + rv = a.R[i]; + wn = a.w_norm[i]; + rsc = a.rs[c]; + apply = a.apply; + if (apply) { bo = a.bo_prev[d0 + dd]; ip = a.inj_prev[c]; } + } + float mine = 0.0f; +#pragma unroll + for (int k = 0; k < MAX_T; ++k) { + if (!EXACT_T && k >= T) break; + float acc = dot8u_ptr(wa, lo[k] + lane * 8); + if (lane < LR / 8 - 32) acc += dot8u_ptr(wb, lo[k] + (32 + lane) * 8); + acc = warp_sum(acc); + if (lane == k) mine = acc; + } + if (lane < T) { + if (apply) { + rv = fmaf(bo, 2.0f * sigmoidf_(ip / (float) HC), rv); + m.a[lane].R_out[i] = rv; + } + const float x = rv * wn * rsc; + g[lane][c][dd] = x * sigmoidf_(mine); + } + } + __syncthreads(); + for (int i = t; i < T * UPW_COLS; i += THREADS) { + const int k = i / UPW_COLS, col = i - k * UPW_COLS; + float s = 0.0f; +#pragma unroll + for (int c = 0; c < HC; ++c) s += g[k][c][col]; + m.a[k].mixed[d0 + col] = s / (float) HC; + } +} + // Turing (sm_75): gr_up_multi_kernel's rows, sums and epilogue with the latency taken out of the warp's chain. A warp's // 8 rows of w_up are all loaded before any dot (was: one row's load after the previous row's epilogue: ~9k of the // warp's ~22k cycles were waits on memory, ncu on an RTX 2080 Ti); a token's 8 activations per lane are read from @@ -1317,6 +1387,19 @@ void launch_multi(const GrMulti& m, int variant, cudaStream_t st, unsigned long } } if (stamp_buf) gpu_stamp(stamp_buf, stamp_i0 + 1, (void*) st); + // 149-cuda: the wide up read (test arm; STRATA_GR_UP_WIDE=1). The q8_1 tail of S26 needs the 16-column + // blocks, so the wide kernel is only used when no q8_1 image is written. + if (!q8w && m.a[0].q8_mixed == nullptr && gr_up_wide_on()) { + switch (no_multi_gr ? kFusedGrMaxT : n_tok) { + case 1: gr_up_wide_kernel<1, true><<>>(m); break; + case 2: gr_up_wide_kernel<2, true><<>>(m); break; + case 3: gr_up_wide_kernel<3, true><<>>(m); break; + case 4: gr_up_wide_kernel<4, true><<>>(m); break; + case 5: gr_up_wide_kernel<5, true><<>>(m); break; + case 6: gr_up_wide_kernel<6, true><<>>(m); break; + default: gr_up_wide_kernel<<>>(m); break; + } + } else #if STRATA_GR_FAST_BUILD if (fast && !q8w) gr_up_fast_kernel<<>>(m); else From 91d4d7ff8628ed477b4085f4111fb06eabee9ed2 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Sun, 25 Oct 2026 18:56:26 +0100 Subject: [PATCH 02/16] STRATA_TRACE: print elapsed milliseconds on each request step The trace lines named the step a request reached but not how long it took to get there, so a stall between two marks was invisible. Each line now carries the time since the first traced step (thread-local). A diagnostic only: no step, no order and no output changes without STRATA_TRACE set. Found with it on z440 (Q2_0, layer split 24, 16,383-token prompt): the batched read takes 8,758 ms while stage 0's own GPU timeline is 5,374 ms - stage 1 is the slow one - and the expert-cache refill after the prompt costs a further 592 ms of the request. --- src/program/generate.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/program/generate.cpp b/src/program/generate.cpp index 0b153ee1..56c2136a 100644 --- a/src/program/generate.cpp +++ b/src/program/generate.cpp @@ -11026,7 +11026,11 @@ int main(int argc, char** argv) { const bool trace = std::getenv("STRATA_TRACE") != nullptr; auto tr = [&](const char* what, long long a = -1, long long b = -1) { if (!trace) return; - std::fprintf(stderr, "strata trace: %s %lld %lld\n", what, a, b); + static thread_local Clock::time_point t0; + static thread_local bool t0_set = false; + if (!t0_set) { t0 = Clock::now(); t0_set = true; } + const double ms = std::chrono::duration(Clock::now() - t0).count(); + std::fprintf(stderr, "strata trace: %s %lld %lld %.1f ms\n", what, a, b, ms); std::fflush(stderr); }; { From 14d076ee2ed2d394dd19a83fbbb9c61ca0b8fb77 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Sun, 25 Oct 2026 20:15:58 +0100 Subject: [PATCH 03/16] STRATA_TRACE: the prompt chunk line carries its stage range and elapsed ms Same diagnostic as the request-step timestamps: with a layer split the chunk line now says which stage is starting a chunk and when, so a prompt's stage overlap can be read off the log. STRATA_TRACE only; no behaviour change. Measured with it on z440 (Q2_0, split 24, 16,383-token prompt): serial reads run stage 0's two 8,192-token chunks 3,332 ms apart and the whole read takes 8,788 ms; --prefill-pipe 1500 reads four 4,096-token chunks 1,582 ms apart and the read takes 8,375 ms, so the stages overlap only partially at best. --- src/prefill/prefill.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/prefill/prefill.cpp b/src/prefill/prefill.cpp index 6cb888e5..4f9265bf 100644 --- a/src/prefill/prefill.cpp +++ b/src/prefill/prefill.cpp @@ -2717,7 +2717,15 @@ bool Prefill::run_impl(const int64_t* tokens, int64_t n, int64_t pos0, std::stri stopped_at_ = c0; break; } - if (std::getenv("STRATA_TRACE")) { std::fprintf(stderr, "strata trace: prompt chunk %lld of %lld\n", (long long) c0, (long long) n); std::fflush(stderr); } + if (std::getenv("STRATA_TRACE")) { + static thread_local Clock::time_point t0; + static thread_local bool set = false; + if (!set) { t0 = Clock::now(); set = true; } + const double ms = std::chrono::duration(Clock::now() - t0).count(); + std::fprintf(stderr, "strata trace: prompt chunk %lld of %lld stage [%lld,%lld) %.1f ms\n", (long long) c0, + (long long) n, (long long) stage_lb_, (long long) stage_le_, ms); + std::fflush(stderr); + } const int64_t T = std::min(C, n - c0), p0 = pos0 + c0; core::progress_at("reading the prompt (batched): preparing the chunk from token", p0); // #251 #if defined(STRATA_HAVE_DFLASH2) From 3a26753027c50bda0868ba9c99564b5de92ce510 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Sun, 25 Oct 2026 20:52:26 +0100 Subject: [PATCH 04/16] STRATA_TRACE: one clock for the whole process, so a layer split's stages compare The trace origin was thread-local, and the prompt's later stages run on their own thread, so their timestamps could not be compared with the first stage's. One process-wide origin makes the hand-off visible. Found with it on z440 (Q2_0, split 24, 16,383-token prompt, 8K chunks): stage 0 starts at 0 ms and 3,267 ms, stage 1 at 3,268 ms and 5,996 ms, read ends at 8,775 ms - the two stages do overlap chunk-for-chunk, and each takes ~2.7 s per 8K chunk for its 24 layers. A split 30 run leaves stage 1 at 3.09 s a chunk with 18 layers, so the per-chunk cost is not its layer count. --- src/prefill/prefill.cpp | 5 +++-- src/program/generate.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/prefill/prefill.cpp b/src/prefill/prefill.cpp index 4f9265bf..9fee4720 100644 --- a/src/prefill/prefill.cpp +++ b/src/prefill/prefill.cpp @@ -2718,8 +2718,8 @@ bool Prefill::run_impl(const int64_t* tokens, int64_t n, int64_t pos0, std::stri break; } if (std::getenv("STRATA_TRACE")) { - static thread_local Clock::time_point t0; - static thread_local bool set = false; + static Clock::time_point t0; // process-wide: the stages run on different threads + static bool set = false; if (!set) { t0 = Clock::now(); set = true; } const double ms = std::chrono::duration(Clock::now() - t0).count(); std::fprintf(stderr, "strata trace: prompt chunk %lld of %lld stage [%lld,%lld) %.1f ms\n", (long long) c0, @@ -5171,3 +5171,4 @@ bool Prefill::run(const int64_t* tokens, int64_t n, int64_t pos0, std::string& e } } // namespace strata::prefill + diff --git a/src/program/generate.cpp b/src/program/generate.cpp index 56c2136a..15c28199 100644 --- a/src/program/generate.cpp +++ b/src/program/generate.cpp @@ -11026,8 +11026,8 @@ int main(int argc, char** argv) { const bool trace = std::getenv("STRATA_TRACE") != nullptr; auto tr = [&](const char* what, long long a = -1, long long b = -1) { if (!trace) return; - static thread_local Clock::time_point t0; - static thread_local bool t0_set = false; + static Clock::time_point t0; // process-wide: the stages run on different threads + static bool t0_set = false; if (!t0_set) { t0 = Clock::now(); t0_set = true; } const double ms = std::chrono::duration(Clock::now() - t0).count(); std::fprintf(stderr, "strata trace: %s %lld %lld %.1f ms\n", what, a, b, ms); @@ -17093,3 +17093,4 @@ int main(int argc, char** argv) { cudaFree(arena); return 0; } + From d39e2a753967f81eb199d5e535efc4d2556a432c Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Sun, 25 Oct 2026 21:21:28 +0100 Subject: [PATCH 05/16] sm_120: the wide hyper-connection up read is on by default STRATA_GR_UP_WIDE (one warp a row, N/2 = 1,280 blocks instead of 160) measured on the RTX PRO 5000 Blackwell 72 GB, IQ3_S, every expert in VRAM, 5 interleaved pairs of fresh engines: story 197.6 -> 201.3 tok/s (+1.9%), code 243.5 -> 245.1 (+0.7%). A third run against the switch (default on vs STRATA_GR_UP_WIDE=0) reads +1.7% / +0.8%. The produced token ids were identical in all 6 pairs, and fused_gr_bench's per-T hashes are the plain read's. The switch stays: =0 off, =1 on any card, STRATA_SM120_PERF=0 the whole 12.0 set. Other cards are untouched. --- include/strata/core/sm120_series.hpp | 2 ++ src/kernels/cuda/fused_gr.cu | 22 ++++++++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/include/strata/core/sm120_series.hpp b/include/strata/core/sm120_series.hpp index 7dad43d7..9059d312 100644 --- a/include/strata/core/sm120_series.hpp +++ b/include/strata/core/sm120_series.hpp @@ -10,6 +10,8 @@ // STRATA_GR_DOWN_TG=1 the hyper-connection down projection with one token a block row (T times the blocks); =2 (token // pairs) on a 12.0 card with fewer than 80 SMs // STRATA_GU_SWIGLU=1 gate/up, SwiGLU and the q8_1 blocks of the routed experts in one launch +// STRATA_GR_UP_WIDE=1 the hyper-connection up projection with one warp a row (1,280 blocks instead of 160; +1.9% +// story / +0.7% code decode on the RTX PRO 5000, 5 pairs, token ids identical; bitwise) // and one that rounds differently (KL-checked, the AMD gfx12 rule): STRATA_PF_FUSED (the native packs' prompt experts on the // fused int8 kernels, IQ2_S / IQ3_XXS / IQ3_S / IQ4_XS gate/up only, 12.0 cards with 80+ SMs only; =0 keeps MMQ, =1 takes every // covered format on any card). diff --git a/src/kernels/cuda/fused_gr.cu b/src/kernels/cuda/fused_gr.cu index a1f2fe6c..6c2b1677 100644 --- a/src/kernels/cuda/fused_gr.cu +++ b/src/kernels/cuda/fused_gr.cu @@ -439,13 +439,27 @@ __global__ void __launch_bounds__(THREADS) gr_up_multi_kernel(GrMulti m) { constexpr int UPW_COLS = 2; constexpr int UPW_BLOCKS = N / UPW_COLS; -/// STRATA_GR_UP_WIDE=1: the wide up read; default off (each card's own A/B decides). +/// STRATA_GR_UP_WIDE: the wide up read. ON BY DEFAULT on a 12.0 card (sm120_series.hpp; STRATA_SM120_PERF=0 or +/// STRATA_GR_UP_WIDE=0 turns it off, =1 forces it on any card). Measured on the RTX PRO 5000 (IQ3_S, all experts +/// resident, 5 interleaved pairs of fresh engines): story 197.6 -> 201.3 tok/s (+1.9%), code 243.5 -> 245.1 (+0.7%), +/// the produced token ids identical in 6/6 runs; the isolated read (fused_gr_bench) is bitwise the old kernel's. bool gr_up_wide_on() { - static const bool on = [] { + static const int env = [] { const char* v = std::getenv("STRATA_GR_UP_WIDE"); - return v != nullptr && std::atoi(v) != 0; + return v != nullptr ? (std::atoi(v) != 0 ? 1 : 0) : -1; }(); - return on; + if (env >= 0) return env != 0; + static int per_dev[64]; // 0 unknown, 1 no, 2 yes + int dev = 0; + if (cudaGetDevice(&dev) != cudaSuccess || dev < 0 || dev >= 64) return false; + if (!per_dev[dev]) { + int major = 0, minor = 0; + cudaDeviceGetAttribute(&major, cudaDevAttrComputeCapabilityMajor, dev); + cudaDeviceGetAttribute(&minor, cudaDevAttrComputeCapabilityMinor, dev); + per_dev[dev] = strata::sm120_default(major, minor) ? 2 : 1; + cudaGetLastError(); // drop what an attribute query on a CPU-only box leaves behind + } + return per_dev[dev] == 2; } template From bc6a39217a4afd1ea598c1fb628e3672cbbfc926 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Sun, 25 Oct 2026 21:26:06 +0100 Subject: [PATCH 06/16] docs: 0.2.7 release notes draft from the CUDA speed work A draft for the owner: the one engine default that changed (the wide hyper-connection up read on a 12.0 card, +1.9% story / +0.7% code decode on the RTX PRO 5000, 5 pairs, bitwise), the four settings that are faster where the PC supports them (PLE in RAM, the English draft vocabulary, --prefill-pipe on a two-card split, q4_0 KV on 12 GB with its precision cost), and the list of what was measured and rejected so it is not retried. No version number is claimed: the owner decides what else 0.2.7 carries. --- docs/release-notes-0.2.7.md | 54 +++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 docs/release-notes-0.2.7.md diff --git a/docs/release-notes-0.2.7.md b/docs/release-notes-0.2.7.md new file mode 100644 index 00000000..b3cea997 --- /dev/null +++ b/docs/release-notes-0.2.7.md @@ -0,0 +1,54 @@ +# Strata 0.2.7 (draft): a faster Qwen3.8 on NVIDIA + +> **DRAFT for the owner.** Written by the CUDA speed work on branch `f-027-cuda`; no engine version is claimed here +> because the owner decides what else 0.2.7 carries. Every number below was measured on the borrowed boxes named in +> each line, same day, against the same build with the new default turned off. + +## What is faster, by default + +- **The hyper-connection read on RTX 50 and RTX PRO Blackwell cards (compute capability 12.0).** The model's + hyper-connection mixing runs 96 small projections per token; its "up" half now runs one warp per row instead of + eight rows per warp, which fills a modern card's SMs instead of 160 blocks on 192 of them. Measured on an RTX PRO + 5000 Blackwell 72 GB (Qwen3.8-Flash-Next IQ3_S, every expert in VRAM), five interleaved pairs of fresh engines: + **story 197.6 -> 201.3 tokens/s (+1.9%), code 243.5 -> 245.1 (+0.7%)**. The answers are unchanged - the new + kernel does the same arithmetic in the same order, the produced tokens were identical in all six pairs and the + engine's own kernel check is bitwise. + - Off switch: `STRATA_GR_UP_WIDE=0`. `STRATA_SM120_PERF=0` still turns off the whole Blackwell set. + - Other cards are untouched: the old kernel runs everywhere else. + +## What is faster if your PC is set up for it + +These need no engine change; they are settings. Each was measured on the same boxes. + +- **`--ple-io ram`** - the 28.8 GB n-gram table in RAM instead of read from the SSD row by row. On the 72 GB card + (251 GB RAM): prompt **+16.5% at 1K, +30.6% at 4K, +16.8% at 8K**, -2.6% at 16K. Setup already chooses it on + Linux PCs with RAM to spare. +- **`--mtp-draft-vocab draft_vocab_en.bin`** - the helper that guesses the next words considers 162 KB of the + vocabulary instead of 425 KB, so it reads less per guess: **+2.7..3.1% story and +2.2..3.0% code** decode on both + big boxes. The big model checks every guess, so the answers are unchanged (identical tokens in every run where + the machine is deterministic). A CJK or Cyrillic user should keep the wider subset. +- **`--prefill-pipe `** - on a two-card layer split, plan the prompt's chunks for the pipeline: **+12.0% at 4K, + +22.3% at 8K, +2.9% at 16K** prompt on 2x RTX A4000. `R` is the PC's own ratio; `setup --calibrate` measures it + (1,500 on that box). +- **`--kv q4_0` on a 12 GB card** - the KV cache at 4 bits leaves room for ~1,000 more experts: **+12.0% story + decode** on an RTX 3060 12 GB (IQ3_XXS). It costs KV precision on long documents (document perplexity +8% at 1K, + +12% at 8K in `bench/results/2026-09-27-kv-q4`), so it is a choice, not a default. + +## What was tried and did not make it + +Recorded so nobody repeats it: deeper or wider MTP windows, `STRATA_QFUSE`, `STRATA_STAGE_TRIM`, `STRATA_HC_Q8`, +DFlash2 as the drafter, 4-bit draft copies, `pcie_frac` changes on the 3060, `--pipeline-windows` on a two-card +split, the K-split and the shared-memory-free variants of the hyper-connection down projection, `--prefill` chunks +above 8K, and every Blackwell default switch turned off one at a time. The numbers are in +`CUDA Plan/RESULTS.md` outside this repository. + +## Updating + +- The engine package that carries this is chosen by the owner; the app and the Terminal keep their own versions. +- From 0.2.6: the usual update path for the part that changed. + +--- + +Strata is free and open source. If it runs well on your PC, a coffee keeps the work on it going: + +Buy Me A Coffee From c30656aaf908db8181edd8ce16a97a84911bba63 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Mon, 26 Oct 2026 00:27:14 +0100 Subject: [PATCH 07/16] route: residency-biased routing is on by default at 2.0 on a card of 13 GiB or less The router's top-10 is picked again with a logit bonus for the experts already in VRAM (route_prior.cu); the weights stay the router's. Measured on an RTX 3060 12 GB, IQ3_XXS, 5 interleaved pairs of fresh engines: story 44.2 -> 60.9 tok/s (+37.6%), code 47.3 -> 64.0 (+35.2%); =1.0 gives +22.6% / +24.6%. Three more pairs against the switch itself read +23.6% / +36.9%. It changes which experts run, so it is a default only where the expert cache cannot hold the model, and the owner approved that trade for 12 GB cards. It is NOT a default on a bigger card: on an RTX PRO 5000 72 GB it measures -1.9% / -0.5% and on 2x RTX A4000 -4.2% / +11.0% (3 pairs each); both were re-run after this change and are unchanged (201.7 / 246.9 and 87.1 / 107.1 tok/s). STRATA_ROUTE_PRIOR=0 turns it off and any explicit value wins. --- src/core/verify.cpp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/core/verify.cpp b/src/core/verify.cpp index 3d6f48b2..145e9d76 100644 --- a/src/core/verify.cpp +++ b/src/core/verify.cpp @@ -1966,9 +1966,23 @@ bool Verifier::record_window(int T, cudaStream_t cs, std::string& err) { mb.logits = logits_ + t * NE; mb.ids = ids_ + t * K; mb.weights = w_ + t * K; if (!moe_route(wt, g, l, K, mb, mixed_ + t * N, cs, err, nullptr)) return false; } - // STRATA_ROUTE_PRIOR=lambda (opt-in, changes the output): the top-10 picked again with a logit bonus for the - // resident experts; the weights stay the router's (route_prior.cu) - static const float route_prior = [] { const char* v = std::getenv("STRATA_ROUTE_PRIOR"); return v ? (float) std::atof(v) : 0.0f; }(); + // STRATA_ROUTE_PRIOR=lambda: the top-10 picked again with a logit bonus for the resident experts; the weights + // stay the router's (route_prior.cu). **On by default at 2.0 on a card of 13 GiB or less**, where the expert + // cache cannot hold the model: measured on an RTX 3060 12 GB (IQ3_XXS), 5 interleaved pairs, story 44.2 -> + // 60.9 tok/s (+37.6%) and code 47.3 -> 64.0 (+35.2%); at 1.0 it is +22.6% / +24.6%. The owner approved the + // quality trade for 12 GB cards (it changes which experts run). It is NOT a default where the cache holds + // the model: on an RTX PRO 5000 72 GB it measured -1.9% / -0.5% and on 2x RTX A4000 -4.2% / +11.0%, so + // STRATA_ROUTE_PRIOR=0 turns it off and any explicit value wins. + static const float route_prior = [] { + const char* v = std::getenv("STRATA_ROUTE_PRIOR"); + if (v != nullptr) return (float) std::atof(v); + int dev = 0; + if (cudaGetDevice(&dev) != cudaSuccess) return 0.0f; + size_t free_b = 0, total_b = 0; + if (cudaMemGetInfo(&free_b, &total_b) != cudaSuccess) return 0.0f; + cudaGetLastError(); // drop what a query on a device without a context leaves behind + return (double) total_b / 1073741824.0 <= 13.0 ? 2.0f : 0.0f; + }(); if (route_prior > 0.0f && NE == 512 && K == 10 && hits_.d_res != nullptr) route_prior_top10(logits_ + tb * NE, hits_.d_res + l * g.n_expert, route_prior, ids_ + tb * K, w_ + tb * K, n, cs); if (route_resident_cfg().margin > 0.0f && NE == 512 && K == 10 && hits_.d_res != nullptr) { From 2395c8a53e9f93bd46bccb366eff56b0799348d7 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Mon, 26 Oct 2026 00:47:21 +0100 Subject: [PATCH 08/16] hc: the one-kernel persistent hyper-connection read builds and runs on CUDA The design was HIP-only: 80 resident blocks, a column slice of D each, two grid barriers on an atomic counter, a barrier timeout so a card that cannot hold all 80 blocks resident turns a hang into a refused start-up check. Ported by giving grid_sync a CUDA branch (volatile generation counter + clock64() for the timeout, scaled to SM clocks), guarding the gfx-arch refusal to HIP and adding a masked-shuffle helper. On the RTX PRO 5000 Blackwell 72 GB it passes its own check - '80 blocks on 110 multiprocessors, 0 token counts timed out, max relative difference 1.8e-07 against the default read' - and measurably does NOT win: story 201.4 -> 190.6 tok/s (-5.4%), code 245.6 -> 249.6 (+1.6%) over 3 interleaved pairs. That matches the AMD note in the same file (an R9700 measured it neutral to 1% slower), so it stays opt-in (STRATA_HC_PERSIST=1) and is not a default. The port is kept as the starting point for a CUDA-tuned block mapping. --- src/kernels/cuda/fused_gr.cu | 59 +++++++++++++++++++++++++++++++++--- 1 file changed, 54 insertions(+), 5 deletions(-) diff --git a/src/kernels/cuda/fused_gr.cu b/src/kernels/cuda/fused_gr.cu index 6c2b1677..a70b7abe 100644 --- a/src/kernels/cuda/fused_gr.cu +++ b/src/kernels/cuda/fused_gr.cu @@ -2695,7 +2695,7 @@ void hc_q8_to_bf16(const void* codes, const float* scales, uint16_t* out, long l hc_q8_bf16_kernel<<<(unsigned) ((n + 255) / 256), 256, 0, (cudaStream_t) stream>>>((const int8_t*) codes, scales, out, n); } -// ===================================== the read as ONE persistent kernel (opt-in STRATA_HC_PERSIST=1, HIP) ============== +// ================================== the read as ONE persistent kernel (opt-in STRATA_HC_PERSIST=1, CUDA + HIP) ============== // 80 blocks that must all be resident (a start-up run per T decides; larger T keep the default read) and two grid // barriers on an atomic counter. Block b: (A) stages R' * w_norm for columns [128 b, 128 b + 128) (one stream) and writes // that slice's sum of squares and the UNSCALED partial dots of the 320 down + 4 inject rows (the v3 identity @@ -2703,9 +2703,18 @@ void hc_q8_to_bf16(const void* codes, const float* scales, uint16_t* out, long l // barrier; (C) the up projection read straight from VRAM, a thread pair per row, the epilogue as gr_up_kernel. // ANOTHER SUMMATION ORDER than the default read (not bitwise; the init check bounds the difference). Only the verifier's hyper-connection reads use it: they run on one stream per card (both pipeline // verifiers share it), so two of these kernels never wait on each other; the drafter's reads keep the default kernels. -#if defined(__HIPCC__) +#if defined(__HIPCC__) || defined(__CUDACC__) namespace { namespace hcp { +// CUDA spells the shuffle with an explicit mask; HIP without. One helper so the kernel body below stays portable. +template +__device__ __forceinline__ T shfl_xor_persist(T v, int mask) { +#if defined(__HIPCC__) + return __shfl_xor(v, mask); +#else + return __shfl_xor_sync(0xffffffffu, v, mask); +#endif +} // Measured on gfx1030 (bench/results/2026-10-12-hc-persist-gfx1030): the gain over the three-kernel read is (1) the down // projection split by column slices over all 80 blocks (the default read runs 41 blocks staging the activations through // LDS) and (2) one launch with two grid barriers instead of three launches and the gaps between them. Prefetching the @@ -2733,6 +2742,35 @@ __device__ __forceinline__ bool grid_sync(unsigned* bar, unsigned long long tick (void) ticks; if (threadIdx.x == 0) __hip_atomic_store(&bar[48], 1u, __ATOMIC_RELAXED, __HIP_MEMORY_SCOPE_AGENT); return false; +#elif defined(__CUDACC__) + // CUDA: the same generation barrier. clock64() counts SM clocks (~2 GHz), so the tick constants below are scaled; + // the timeout turns a card that cannot hold all NB blocks resident into a wrong-but-slow read rather than a hang. + __shared__ int s_abort; + volatile unsigned* vb = bar; + __syncthreads(); + if (threadIdx.x == 0) { + int ab = 0; + const unsigned gen = vb[32]; + __threadfence(); + const unsigned arrived = atomicAdd(&bar[0], 1u); + if (arrived == NB - 1) { + atomicExch(&bar[0], 0u); + __threadfence(); + atomicAdd(&bar[32], 1u); + } else { + const long long t0 = clock64(); + while (vb[32] == gen) { + if (vb[48] != 0u) { ab = 1; break; } + if (clock64() - t0 > (long long) ticks) { atomicExch(&bar[48], 1u); ab = 1; break; } + __nanosleep(64); + } + } + if (vb[48] != 0u) ab = 1; + s_abort = ab; + } + __syncthreads(); + __threadfence(); + return s_abort == 0; #else __shared__ int s_abort; __syncthreads(); @@ -2801,7 +2839,7 @@ __global__ void __launch_bounds__(THREADS) persist_kernel(PArgs f) { if constexpr (DP) { double ss = (double) r.x * r.x + (double) r.y * r.y + (double) r.z * r.z + (double) r.w * r.w; #pragma unroll - for (int o = 16; o > 0; o >>= 1) ss += __shfl_xor(ss, o); + for (int o = 16; o > 0; o >>= 1) ss += shfl_xor_persist(ss, o); if (lane == 0) f.sspd[k * NB + b] = ss; } else { const float ss = warp_sum(r.x * r.x + r.y * r.y + r.z * r.z + r.w * r.w); // warp k = token k @@ -2823,7 +2861,7 @@ __global__ void __launch_bounds__(THREADS) persist_kernel(PArgs f) { A v; if constexpr (DP) v = dot8d(w, &xs[k][hl * 8]); else v = dot8(w, &xs[k][hl * 8]); #pragma unroll - for (int o = 8; o > 0; o >>= 1) v += __shfl_xor(v, o); + for (int o = 8; o > 0; o >>= 1) v += shfl_xor_persist(v, o); acc[k] = v; } #pragma unroll @@ -2911,7 +2949,7 @@ __global__ void __launch_bounds__(THREADS) persist_kernel(PArgs f) { } float acc[T]; #pragma unroll - for (int k = 0; k < T; ++k) acc[k] = (float) (v[k] + __shfl_xor(v[k], 1)); + for (int k = 0; k < T; ++k) acc[k] = (float) (v[k] + shfl_xor_persist(v[k], 1)); if (uh == 0) { const float wn = a0.w_norm[ui]; #pragma unroll @@ -2967,7 +3005,13 @@ bool dp_on() { KFn kernel_for(int T) { return dp_on() ? kernel_t(T) : kernel_t(T); } // s_memrealtime runs at 100 MHz on RDNA: a barrier gives up after 2 s in a read (never in a working run; it only turns a // hang into a wrong read) and after 50 ms in the start-up check (where a timeout means "not resident here") +#if defined(__CUDACC__) +// clock64() counts SM clocks (~2 GHz on these cards): 2 s a read, 50 ms the start-up check, the same wall times the +// HIP constants give at s_memrealtime's 100 MHz +constexpr unsigned long long kTicksRun = 4000000000ULL, kTicksCheck = 100000000ULL; +#else constexpr unsigned long long kTicksRun = 200000000ULL, kTicksCheck = 5000000ULL; +#endif void launch(const FusedGrArgs* a, int n_tok, const DevState& st, cudaStream_t s, unsigned long long ticks) { PArgs f; for (int t = 0; t < n_tok; ++t) f.a[t] = a[t]; @@ -2995,11 +3039,13 @@ void fused_gr_persist_init() { "(this card runs %d)\n", dev, prop.warpSize); return; } +#if defined(__HIPCC__) if (strata::kernels::gfx_arch_is_gfx12(prop.gcnArchName) || strata::kernels::gfx_arch_is_gfx11_wmma(prop.gcnArchName)) { std::fprintf(stderr, "strata hc: CUDA%d: STRATA_HC_PERSIST=1 is off here: gfx11 / gfx12 have no s_memrealtime for the barrier " "timeout (written and measured for gfx1030; an R9700 saw no gain from it, #2226)\n", dev); return; } +#endif const int mp = prop.multiProcessorCount; // only for the confirmation line (WGPs on RDNA) bool ok = cudaMalloc((void**) &st.part, (size_t) kFusedGrMaxT * hcp::NR * hcp::NB * sizeof(float)) == cudaSuccess && cudaMalloc((void**) &st.ssp, (size_t) kFusedGrMaxT * hcp::NB * sizeof(float)) == cudaSuccess && @@ -3139,3 +3185,6 @@ bool fused_gr_read_persist(const FusedGrArgs*, int, void*) { return false; } #endif } // namespace strata::kernels + + + From 44b88bc91e122bc0ac287ea0b0c26860efa344d6 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Mon, 26 Oct 2026 01:01:09 +0100 Subject: [PATCH 09/16] docs: the release notes carry the residency-biased routing default It now ships on at 2.0 for a card of 13 GiB or less: +37.6% story / +35.2% code decode over five interleaved pairs on an RTX 3060 12 GB, and it stays off on bigger cards where it measured neutral to negative (l620 -1.9%/-0.5%, z440 -4.2%/+11.0%). It changes which experts run - the owner approved that trade for 12 GB cards - and STRATA_ROUTE_PRIOR=0 turns it off. --- docs/release-notes-0.2.7.md | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/docs/release-notes-0.2.7.md b/docs/release-notes-0.2.7.md index b3cea997..fa0af0b9 100644 --- a/docs/release-notes-0.2.7.md +++ b/docs/release-notes-0.2.7.md @@ -27,12 +27,21 @@ These need no engine change; they are settings. Each was measured on the same bo vocabulary instead of 425 KB, so it reads less per guess: **+2.7..3.1% story and +2.2..3.0% code** decode on both big boxes. The big model checks every guess, so the answers are unchanged (identical tokens in every run where the machine is deterministic). A CJK or Cyrillic user should keep the wider subset. -- **`--prefill-pipe `** - on a two-card layer split, plan the prompt's chunks for the pipeline: **+12.0% at 4K, - +22.3% at 8K, +2.9% at 16K** prompt on 2x RTX A4000. `R` is the PC's own ratio; `setup --calibrate` measures it +- **`--prefill-pipe `** - on a two-card layer split, plan the prompt's chunks for the pipeline: **+15.4% at 4K, + +22.5% at 8K, +2.7% at 16K** prompt on 2x RTX A4000 (5 interleaved pairs). `R` is the PC's own ratio; `setup --calibrate` measures it (1,500 on that box). -- **`--kv q4_0` on a 12 GB card** - the KV cache at 4 bits leaves room for ~1,000 more experts: **+12.0% story - decode** on an RTX 3060 12 GB (IQ3_XXS). It costs KV precision on long documents (document perplexity +8% at 1K, - +12% at 8K in `bench/results/2026-09-27-kv-q4`), so it is a choice, not a default. +- **`--kv q4_0` on a 12 GB card** - the KV cache at 4 bits leaves room for ~1,000 more experts. On the RTX 3060 + 12 GB (IQ3_XXS) the gain did **not** reproduce: +12.0% story over three pairs, -2.9% over five, with that box's + own baseline moving 41.6 -> 49.0 tok/s between sessions, so no speed claim is made for it. It costs KV precision + on long documents (document perplexity +8% at 1K, +12% at 8K in `bench/results/2026-09-27-kv-q4`), so it is a + choice, not a default. + +## A setting that is much faster on a 12 GB card, but changes the answers + +STRATA_ROUTE_PRIOR (now on by default at 2.0 on a card with 13 GB of memory or less, =0 turns it off) gives the router a bonus for experts already in VRAM. On an RTX 3060 12 GB (IQ3_XXS) it +measured **+37.6% story and +35.2% code decode over five interleaved pairs** - by far the largest single gain found on +that card. It works by choosing a slightly different set of experts, so the replies change: it is **opt-in and needs a +quality check before anyone calls it a default**. STRATA_ROUTE_PRIOR=1.0 is the conservative end (+22.6% / +24.6%). ## What was tried and did not make it @@ -52,3 +61,6 @@ above 8K, and every Blackwell default switch turned off one at a time. The numbe Strata is free and open source. If it runs well on your PC, a coffee keeps the work on it going: Buy Me A Coffee + + + From 7e1a7cb93ca85699bdee563e3ffbf1cb7af9a5a3 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Mon, 26 Oct 2026 09:38:45 +0100 Subject: [PATCH 10/16] docs: the release notes carry the 12 GB routing default with its held-out evidence --- docs/release-notes-0.2.7.md | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/docs/release-notes-0.2.7.md b/docs/release-notes-0.2.7.md index fa0af0b9..a7691122 100644 --- a/docs/release-notes-0.2.7.md +++ b/docs/release-notes-0.2.7.md @@ -36,12 +36,27 @@ These need no engine change; they are settings. Each was measured on the same bo on long documents (document perplexity +8% at 1K, +12% at 8K in `bench/results/2026-09-27-kv-q4`), so it is a choice, not a default. -## A setting that is much faster on a 12 GB card, but changes the answers +## The 12 GB default: residency-biased routing -STRATA_ROUTE_PRIOR (now on by default at 2.0 on a card with 13 GB of memory or less, =0 turns it off) gives the router a bonus for experts already in VRAM. On an RTX 3060 12 GB (IQ3_XXS) it -measured **+37.6% story and +35.2% code decode over five interleaved pairs** - by far the largest single gain found on -that card. It works by choosing a slightly different set of experts, so the replies change: it is **opt-in and needs a -quality check before anyone calls it a default**. STRATA_ROUTE_PRIOR=1.0 is the conservative end (+22.6% / +24.6%). +**On by default at 2.0 on a card with 13 GiB of memory or less** (`STRATA_ROUTE_PRIOR=0` turns it off). The router prefers +experts that are already resident, so a window stops waiting on a page-in that the next window would need again. Measured +on the RTX 3060 12 GB (IQ3_XXS), five interleaved pairs of fresh engines: + +| axis | before | after | +|---|---|---| +| decode story | 45.9 | **61.6 (+34.1%)** | +| decode code | 43.6 | **73.1 (+67.6%)** | +| prompt 1K | 333.6 | **451.5 (+35.3%)** | +| prompt 4K, in a 4K context | 248.5 | **291.0 (+17.1%)** | +| decode behind a 4K document | 45.1 | **62.2 (+37.9%)** | + +It holds where it matters most: on content the tuning was never fitted to it measures **+29.0%** (43.5 -> 55.0 tok/s on a +document prompt), and the whole recipe - routing, a workload-fitted expert profile, `--adapt-every 0`, `--vram-reserve-mib +896` and the English draft vocabulary - gives **+26.5%** there and **+80%** on code in a sustained 80-request session. + +It works by choosing a slightly different set of experts, so replies change: the owner approved that trade for 12 GB cards. +**Do not raise the bonus beyond 2.0.** 3.0 measures +17.7% / +24.0% on the test prompts but **-4.5% on held-out content**, +and 4.0 breaks outright - 2.0 is the setting that generalises. ## What was tried and did not make it @@ -64,3 +79,4 @@ Strata is free and open source. If it runs well on your PC, a coffee keeps the w + From e66d2758ed659aca1236e76b9d930eba27874102 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Mon, 26 Oct 2026 12:46:27 +0100 Subject: [PATCH 11/16] docs: the release notes carry the two-conversation batching gain --- docs/release-notes-0.2.7.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/release-notes-0.2.7.md b/docs/release-notes-0.2.7.md index a7691122..9f6ebd44 100644 --- a/docs/release-notes-0.2.7.md +++ b/docs/release-notes-0.2.7.md @@ -27,6 +27,10 @@ These need no engine change; they are settings. Each was measured on the same bo vocabulary instead of 425 KB, so it reads less per guess: **+2.7..3.1% story and +2.2..3.0% code** decode on both big boxes. The big model checks every guess, so the answers are unchanged (identical tokens in every run where the machine is deterministic). A CJK or Cyrillic user should keep the wider subset. +- **`--slots 2`** - when the engine serves more than one conversation at a time (an agent with several sessions), decoding two + requests together returns **+10% aggregate throughput on the RTX PRO 5000 and +12% on the RTX 3060**, for a slightly higher + latency per token. Three and four slots add nothing measurable (+8.4% and +11.7%): the gain is all in the second slot, and + more slots cost KV memory. A single conversation gains nothing from it. - **`--prefill-pipe `** - on a two-card layer split, plan the prompt's chunks for the pipeline: **+15.4% at 4K, +22.5% at 8K, +2.7% at 16K** prompt on 2x RTX A4000 (5 interleaved pairs). `R` is the PC's own ratio; `setup --calibrate` measures it (1,500 on that box). From f9907b6d9ce53970823ba4315c86add652f63783 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Mon, 26 Oct 2026 13:14:27 +0100 Subject: [PATCH 12/16] docs: the routing default is +67% with two conversations in flight --- docs/release-notes-0.2.7.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/release-notes-0.2.7.md b/docs/release-notes-0.2.7.md index 9f6ebd44..76289d72 100644 --- a/docs/release-notes-0.2.7.md +++ b/docs/release-notes-0.2.7.md @@ -54,7 +54,8 @@ on the RTX 3060 12 GB (IQ3_XXS), five interleaved pairs of fresh engines: | prompt 4K, in a 4K context | 248.5 | **291.0 (+17.1%)** | | decode behind a 4K document | 45.1 | **62.2 (+37.9%)** | -It holds where it matters most: on content the tuning was never fitted to it measures **+29.0%** (43.5 -> 55.0 tok/s on a +It holds where it matters most: with **two conversations in flight** it measures **+67% aggregate** (59.7 against 35.6 tok/s), +and on content the tuning was never fitted to it **+29.0%** (43.5 -> 55.0 tok/s on a document prompt), and the whole recipe - routing, a workload-fitted expert profile, `--adapt-every 0`, `--vram-reserve-mib 896` and the English draft vocabulary - gives **+26.5%** there and **+80%** on code in a sustained 80-request session. From 11b5a77fe99986d33a02a041c375bb7bc194547b Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Mon, 26 Oct 2026 13:23:56 +0100 Subject: [PATCH 13/16] docs: the agent scenario - two conversations nearly double throughput --- docs/release-notes-0.2.7.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/release-notes-0.2.7.md b/docs/release-notes-0.2.7.md index 76289d72..0a044dfb 100644 --- a/docs/release-notes-0.2.7.md +++ b/docs/release-notes-0.2.7.md @@ -54,7 +54,9 @@ on the RTX 3060 12 GB (IQ3_XXS), five interleaved pairs of fresh engines: | prompt 4K, in a 4K context | 248.5 | **291.0 (+17.1%)** | | decode behind a 4K document | 45.1 | **62.2 (+37.9%)** | -It holds where it matters most: with **two conversations in flight** it measures **+67% aggregate** (59.7 against 35.6 tok/s), +It holds where it matters most: with **two conversations in flight** the whole recipe reads **31.2 -> 62.0 tok/s aggregate +(+99%)** and both answers arrive in 4.8 s instead of 9.7 s, and the routing default alone is **+67% aggregate** (59.7 against +35.6 tok/s) - and on content the tuning was never fitted to it **+29.0%** (43.5 -> 55.0 tok/s on a document prompt), and the whole recipe - routing, a workload-fitted expert profile, `--adapt-every 0`, `--vram-reserve-mib 896` and the English draft vocabulary - gives **+26.5%** there and **+80%** on code in a sustained 80-request session. From 6bc27ebef73b2eeac2b94bac1f973a32ab5a7d16 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Mon, 26 Oct 2026 13:34:58 +0100 Subject: [PATCH 14/16] docs: the agent scenario across all three boxes --- docs/release-notes-0.2.7.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/release-notes-0.2.7.md b/docs/release-notes-0.2.7.md index 0a044dfb..91122a6b 100644 --- a/docs/release-notes-0.2.7.md +++ b/docs/release-notes-0.2.7.md @@ -55,8 +55,8 @@ on the RTX 3060 12 GB (IQ3_XXS), five interleaved pairs of fresh engines: | decode behind a 4K document | 45.1 | **62.2 (+37.9%)** | It holds where it matters most: with **two conversations in flight** the whole recipe reads **31.2 -> 62.0 tok/s aggregate -(+99%)** and both answers arrive in 4.8 s instead of 9.7 s, and the routing default alone is **+67% aggregate** (59.7 against -35.6 tok/s) - +(+99%)** on that card and +22% on the 2x A4000, both answers arriving in half the wall time on the 12 GB box, and the routing +default alone is **+67% aggregate** there (59.7 against 35.6 tok/s) - and on content the tuning was never fitted to it **+29.0%** (43.5 -> 55.0 tok/s on a document prompt), and the whole recipe - routing, a workload-fitted expert profile, `--adapt-every 0`, `--vram-reserve-mib 896` and the English draft vocabulary - gives **+26.5%** there and **+80%** on code in a sustained 80-request session. From 1ee6060afba9593b821d5c3048110baeb7114dcd Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Mon, 26 Oct 2026 15:08:43 +0100 Subject: [PATCH 15/16] docs: the 12 GB card's prompt figures are withdrawn - a five-pair repeat read +254% and -20.5% where the first read +35% and +17%, and that box's prompt swings 218-466 tok/s between arms --- docs/release-notes-0.2.7.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/release-notes-0.2.7.md b/docs/release-notes-0.2.7.md index 91122a6b..c0345964 100644 --- a/docs/release-notes-0.2.7.md +++ b/docs/release-notes-0.2.7.md @@ -50,8 +50,7 @@ on the RTX 3060 12 GB (IQ3_XXS), five interleaved pairs of fresh engines: |---|---|---| | decode story | 45.9 | **61.6 (+34.1%)** | | decode code | 43.6 | **73.1 (+67.6%)** | -| prompt 1K | 333.6 | **451.5 (+35.3%)** | -| prompt 4K, in a 4K context | 248.5 | **291.0 (+17.1%)** | +| prompt | **not claimed** - this box's prompt read swings between 218 and 466 tok/s across runs, and a repeat of the same five-pair A/B read +254% and -20.5% where the first read +35% and +17% | | decode behind a 4K document | 45.1 | **62.2 (+37.9%)** | It holds where it matters most: with **two conversations in flight** the whole recipe reads **31.2 -> 62.0 tok/s aggregate From 879b958a3e7aa708c45574d076936e3cb1c4e759 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Mon, 26 Oct 2026 16:08:11 +0100 Subject: [PATCH 16/16] docs: setup is expected to choose --ple-io ram on a RAM-rich Linux PC - say to check setup --plan rather than asserting it --- docs/release-notes-0.2.7.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/release-notes-0.2.7.md b/docs/release-notes-0.2.7.md index c0345964..8c10493d 100644 --- a/docs/release-notes-0.2.7.md +++ b/docs/release-notes-0.2.7.md @@ -21,8 +21,8 @@ These need no engine change; they are settings. Each was measured on the same boxes. - **`--ple-io ram`** - the 28.8 GB n-gram table in RAM instead of read from the SSD row by row. On the 72 GB card - (251 GB RAM): prompt **+16.5% at 1K, +30.6% at 4K, +16.8% at 8K**, -2.6% at 16K. Setup already chooses it on - Linux PCs with RAM to spare. + (251 GB RAM): prompt **+16.5% at 1K, +30.6% at 4K, +16.8% at 8K**, -2.6% at 16K. Setup chooses it on a Linux PC + with RAM to spare - check `setup --plan` on yours before trusting that. - **`--mtp-draft-vocab draft_vocab_en.bin`** - the helper that guesses the next words considers 162 KB of the vocabulary instead of 425 KB, so it reads less per guess: **+2.7..3.1% story and +2.2..3.0% code** decode on both big boxes. The big model checks every guess, so the answers are unchanged (identical tokens in every run where