Niko1221
0ee72a5041
Merge branch 'f-027-int' into f-027-hip
2026-10-26 10:54:58 +01:00
Niko1221
472de9cdac
PLE residency policy: admit the table only when RAM holds table + the expert arena + 8 GiB. The 0.2.7 rule (table + 8 GiB) admitted the 26.8 GiB table on a 64 GB Windows PC (RTX 5070, IQ3_S), where the engine then fills a 51 GiB pinned expert arena: the locked table left too little lockable memory and the expert load died with ERROR_WORKING_SET_QUOTA (1453). ple_resident_admit() (include/strata/core/ple_residency.hpp) sizes the arena from the native expert layout; unknown sizes or telemetry admit nothing. Unit test ple_residency_test.
2026-10-26 10:53:11 +01:00
Niko1221
8d56d41768
gfx12: native packs start the decode miss split at pcie_frac 0.15 (R9700: +9.9% decode at 8K, +25.6% at 32K, +10.4% under serve, first-token KL 0.0013 vs 0.55 with top-1 12/12); explicit --pcie-frac wins, STRATA_PCIE_FRAC_DEFAULT=old restores 0.55
2026-10-26 09:58:11 +01:00
Niko1221
1d00c018e1
Revert "gfx12: native packs start the decode miss split at pcie_frac 0.15 (R9700: +9.9% decode at 8K, +25.6% at 32K, +10.4% under serve, first-token KL 0.0013 vs 0.55 with top-1 12/12); explicit --pcie-frac wins, STRATA_PCIE_FRAC_DEFAULT=old restores 0.55"
...
This reverts commit 550c6ddbf90d57a0d018878115f6d0f9fa86cb74.
2026-10-25 21:03:43 +01:00
Niko1221
d7ad4a2762
gfx12: native packs start the decode miss split at pcie_frac 0.15 (R9700: +9.9% decode at 8K, +25.6% at 32K, +10.4% under serve, first-token KL 0.0013 vs 0.55 with top-1 12/12); explicit --pcie-frac wins, STRATA_PCIE_FRAC_DEFAULT=old restores 0.55
2026-10-25 19:57:35 +01:00
Niko1221
3b34b6c7b2
Engine: keep the PLE table resident in RAM when the PC can afford it (opt-out STRATA_PLE_AUTO_RAM=0); measured on p620 R9700 IQ3_S: 8K prompt PLE 845 -> 132 ms, 2125 -> 2611 tok/s, answer md5 identical
2026-10-25 16:42:05 +01:00
Niko1221
8aee4538f2
generate.cpp: the --spec-split comment no longer calls its windows exact (they are not bit-exact against no-split: batch-shape divergence); comment only
2026-10-25 11:14:00 +01:00
Niko1221
b18700c8f7
Adaptive tier: the engine chooses the asynchronous tier by measurement (arena, one CUDA GPU)
...
Without --adapt-async on the command line, the expert arena on one CUDA GPU (--serve, adaptive tier on, no --batch, no layer
split, no pipelined windows, no peer or remote tier) starts on the blocking tier, ignores 64 steady decode windows, measures 64,
and when the tier's wait is at least 5% of a window runs 64 windows on the asynchronous tier, going back (for the session) only if
that was more than 2% slower per token. One log line at each switch. --adapt-async 0|1 and STRATA_ADAPT_ASYNC=0 keep their meaning;
the identity gates run with --adapt-every 100000 and never reach it. Decision logic and its unit test are header-only
(adapt_async_default.hpp, adapt_async_default_test).
2026-10-24 13:27:00 +02:00
Niko1221
a8301a2709
Merge f-023-metalfix2: no expert-cache loan in the Metal CLI prompt path either
2026-10-22 18:42:02 +02:00
Niko1221
669023fc08
Merge f-023-strixpp: Strix Halo gets its 8192 prompt chunk back on Windows, and the HIP engine finds its own tuning table
2026-10-22 18:36:58 +02:00
Niko1221
b440640929
metal: no expert-cache loan in the CLI prompt path either (the 4K+ prompt of a plain strata run aborted in ExpertCache::fill_slot_queued)
2026-10-22 18:31:04 +02:00
Niko1221
f1b6a2144c
Merge f-023-df2: DFlash2 drafter (opt-in --draft dflash2) merged onto the combined branch, builds on CUDA, HIP and Metal
2026-10-22 17:05:26 +02:00
Niko1221
051db74cdf
gfx1151 on Windows: a bare --prefill auto may reach 8192 again (the 6144 cap of #1630 stays for other cards); STRATA_GFX1151_CHUNK=0 keeps 6144
2026-10-22 16:55:16 +02:00
Niko1221
b96f174775
Merge f-dflash2 (the DFlash2 drafter, opt-in) into f-023-int
2026-10-22 16:10:08 +02:00
Niko1221
f0010a607f
serve: the conversation cache is sized from the free RAM when --conversation-cache-mib is not given ( #3493 ): 40% of what is left above the parking floor, at most 8192, off under 1024, one log line; an explicit value (0 too) is kept; harness_reuse_probe.py; docs
2026-10-22 16:06:17 +02:00
Niko1221
bf8285b8c9
Merge f-dflash2-check: the per-context cost table for the cost-aware MTP window (opt-in, STRATA_SPEC_COST), phase 0 tools and launch-script fixes
2026-10-22 13:09:05 +02:00
Niko1221
e6dbbc312a
metal: no expert-cache loan for the prompt path (Prefill::relayout and the refill into given-back allocations), auto expert cache capped at 1500 slots; CI: Metal build job on a macOS runner
2026-10-22 12:55:09 +02:00
Niko1221
eebb870922
dflash2: reserve the drafter's head before the expert cache is sized, loud fallback lines naming the VRAM needed, Blackwell window cap 6 (draft_cap_test)
2026-10-22 12:44:45 +02:00
Niko1221
3ae2123bce
dflash2: --draft-conf (window cut by the selector's cumulative probability), drafter streams at high priority on CUDA
2026-10-22 08:51:54 +02:00
Niko1221
b1ebc3d7ca
spec: the cost-aware window keeps one row-cost table per context length (< 6K, < 24K, longer), seedable per bucket
2026-10-22 07:24:46 +02:00
Niko1221
ff9ca03f3c
dflash2: a verify window whose graph runs out of memory narrows the window instead of failing; --draft-cap, 5 by default on Strix Halo, a plain line on 12 GB NVIDIA
2026-10-22 06:24:00 +02:00
Niko1221
2ccf57ec46
spec: faster start-up adaptation of the expert tier in speculative runs (swap every 2 verify rounds for the first 200, then the normal interval); default on sm_86 only, STRATA_SPEC_ADAPT_EVERY / STRATA_SPEC_ADAPT_WARM set it elsewhere, an explicit --adapt-every is kept
2026-10-21 19:45:52 +02:00
Niko1221
89799596a6
dflash2: fused conv+residual+norm+quant, q/k norm+rope, K/V ring write and attention-output quantization; stage skip switches and small benches
2026-10-21 16:34:27 +02:00
Niko1221
e0d79b02f9
spec: with STRATA_SPEC_COST a round far above the known cost of its width (the first use captures a graph) counts as a tenth of a sample
2026-10-21 16:04:10 +02:00
Niko1221
d45cd9d3cf
spec: STRATA_SPEC_COST_TABLE seeds the row costs (a per-card table), the CLI prints the learned table at the end
2026-10-21 15:35:07 +02:00
Niko1221
5bc7f8cab3
dflash2: tiled Q8 GEMM, fused quantizers, head-major K/V ring with a prefetching attention, forked context update, PLE read-ahead, benches
2026-10-21 15:31:29 +02:00
Niko1221
d232721db6
spec: cost-aware chain rule keeps the best width seen and looks one or two drafts ahead (the row cost is not convex); unmeasured widths are probed a few times
2026-10-21 15:03:51 +02:00
Niko1221
5f49ec4599
spec: STRATA_SPEC_COST keeps an MTP draft only while the next row pays at the measured row cost (step-by-step chain rule in MtpDrafter, DraftPolicy::keep_draft)
2026-10-21 14:46:56 +02:00
Niko1221
6878105560
spec: STRATA_SPEC_COST, a cost-aware MTP window (DraftPolicy::best_rows: the window with the best expected tokens per ms from the chain's probabilities, a measured probability-to-acceptance table and the measured row costs); the trace now logs the probabilities the window was chosen from (A/B arm, off by default)
2026-10-21 14:07:25 +02:00
Niko1221
7f97c35aca
DFlash2 drafter for Qwen3.8-Flash-Next: Q8_0 pack tool, GPU forward (conv, K/V ring, windowed attention, top-16 selector), permanent verify/prefill taps, --draft dflash2 --draft-model (opt-in, MTP stays the fallback)
2026-10-21 14:04:15 +02:00
Niko1221
651a56806a
generate: STRATA_SPEC_TRACE, a per-round trace of the window rows, accepted drafts, round ms and MTP draft probabilities for offline window-length studies (bench only, off by default)
2026-10-21 13:46:06 +02:00
Niko1221
d276adf277
verify: STRATA_ROUTE_STATS (distinct and new-per-row routed experts per layer per window width) and a per-width GPU stage profile line for STRATA_SPEC_T_CYCLE runs (bench only, off by default)
2026-10-21 13:28:02 +02:00
Niko1221
d8f58af1b5
generate: STRATA_SPEC_T_CYCLE, a bench-only cycle of the verify window size with a per-width cost line (off by default)
2026-10-21 13:25:20 +02:00
Niko1221
17c9b92bc9
generate: STRATA_SPEC_T_CYCLE, a bench-only cycle of the verify window size with a per-width cost line (off by default)
2026-10-21 13:24:21 +02:00
Niko1221
68864c564e
Merge f-022-specfix: first-window HIP verify hang (PLE flag before the first launch of each window graph) + 1-token prompt starts the speculative loop
2026-10-21 03:48:34 +02:00
Niko1221
e0cfb80f53
Merge f-022-engfix: #3465 NaN retry reads the prompt batched, #3441/#3075 tool-call envelopes, #3503 cuda12 package keeps Pascal/Volta, #3480 queue priming respects GPU_MAX_HW_QUEUES
2026-10-21 01:48:02 +02:00
Niko1221
894f133b7d
Fix #3465 : after non-finite logits in a prompt window the retry reads the whole prompt batched
...
The reporter's prompts ended in non-finite logits in the window that reads the prompt's last few tokens (after the last turn boundary), every time and on every retry, and passed with --short-read 0. The cause on their machine (a Windows VM, sm_89, a Broadwell AVX2 CPU, IQ3_S) was not reproduced on a P100 with a Broadwell Xeon, an RTX 3060 or a Core Ultra.
The engine now reads the request that follows such a window with --short-read 0 for that one request, so the server's transparent retry succeeds instead of failing the same way. Nothing changes until a prompt window reports non-finite logits. STRATA_NAN_INJECT=1 exercises it.
2026-10-21 00:52:29 +02:00
Niko1221
4c3edf4765
generate: spec_loop_runs() names the speculative loop's start rule (+ test); STRATA_SPEC_WATCH=<s>, a stall watchdog with the stage names for the CLI's verify loop (stall report and thread dump, off by default)
2026-10-21 00:41:25 +02:00
Niko1221
f05725c332
Fix #3480 : the HIP queue priming stands aside when GPU_MAX_HW_QUEUES is 1 or 2
...
With the runtime capped to two hardware queues the two primed queues are all of them, and the high-priority draft stream and the draft side stream share them: a 4K prompt on an RX 9060 XT read 681-753 tok/s primed and 1188-1238 unprimed. Primed only when the cap is 3 or more or unset; STRATA_HIP_QUEUE_PRIME=nn still forces it. HIP code only (gfx12, Linux).
2026-10-21 00:37:50 +02:00
Niko1221
f801953992
Linux integrated GPU: the auto expert cache counts the RAM once (cache <= RAM available - desktop reserve); the APU warning uses the same reserve
...
A Strix Halo's free VRAM is the GPU pool (carve-out + GTT, nearly all RAM with ttm.pages_limit raised) while the cache copies experts into that
same RAM on top of the arena, so a cache sized from the pool alone could ask for more than the OS had left (OOM killer). The auto size is now
min(GPU free, MemAvailable - max(8 GiB, 8% of RAM)); --expert-cache N is kept as asked, STRATA_UMA_RESERVE_GIB=N sets the reserve (0 = old sizing).
2026-10-20 23:53:10 +02:00
Niko1221
aece46db89
generate: --spec on a native pack starts the speculative loop for a 1-token prompt (spec_pos -1 = unused, 0 is a real position)
2026-10-20 23:41:24 +02:00
Niko1221
1e7bcb8b6e
Merge f-022-cores: start-up line lists the CPU worker processors, experimental --pool-cores, thread names, Windows no-topology fallback
2026-10-20 22:15:28 +02:00
Niko1221
10edc50f05
start-up: no 'workers by default' line when --pool-cores gave the list (its own line says where they run)
2026-10-20 20:20:12 +02:00
Niko1221
7a55995818
CPU pool: say where the workers run, --pool-cores (experimental), names for the engine's threads
...
The start-up now has one plain line: CPU workers on logical processors 2,4,...,30 (15 workers, one per physical core; host on 0).
It says so when two workers share a core, when the host's core is taken, and when the OS did not say which processors are
siblings. --pool-cores LIST / STRATA_POOL_CORES pins the workers to exactly the listed logical processors (off by default;
siblings, the host's processor and processors the process may not use are warned about, never refused). The default placement
is unchanged. The pool workers, the host thread and the long-lived helper threads get names (strata-pool-N, strata-host,
strata-stage, strata-adapt, ...), so ps -L, /proc and Windows thread tools show which is which. Windows without core
information no longer counts every logical processor as a core when it picks the default worker count.
2026-10-20 19:16:15 +02:00
Niko1221
b1594fbbe5
Merge main (0.2.1.2 Strix Halo engine hotfix)
2026-10-20 18:46:37 +02:00
Niko1221
dea6920b81
hip-rdna3 on Windows: Strix Halo (gfx1151) keeps the expert arena unregistered by default; strata.exe finds rocm\bin for --version (delay-loaded ROCm math DLLs, bundled by package_windows.py)
2026-10-20 17:09:46 +02:00
Baptiste Rajaut
393eec80f9
fix: drop the pack and MTP files' page cache before the NUMA placement
2026-10-20 10:22:05 +02:00
Baptiste Rajaut
2614b82c9a
fix: list the pool's own worker cores for the start-up line and --aux-cpus under the NUMA split
2026-10-20 10:22:05 +02:00
Baptiste Rajaut
2496795bd9
fix: refuse a lopsided NUMA split and accept only 1/test for STRATA_NUMA_SPLIT
2026-10-20 10:22:04 +02:00
Baptiste Rajaut
709f8dc63d
feat: per-NUMA-node task slices and counters in the CPU expert pool (opt-in)
2026-10-20 10:22:04 +02:00