Commit Graph
835 Commits
Author SHA1 Message Date
Niko1221 f7ea7005c1 Merge f-spark-s2 a5104df5b into f-own-int 2026-11-11 20:13:43 +01:00
Niko1221 9a56a36250 generate: name the CPU expert pool on arm64 in the start log line
On arm64 every x86 CPU test is false, so the line read "ggml-cpu (older-CPU
build)" even when the pool is the Strata quant layer. Print, on arm64 only,
"[DRAFT] CPU expert kernels: the Strata quant layer (NEON)" when
STRATA_OWN_CPU_QUANT is defined and "[DRAFT] CPU expert kernels: ggml-cpu
(NEON)" otherwise. The x86 expression is unchanged. The wording stays [DRAFT]
until the owner words it (par/OWNER-WORDING-1111.md, ARM POOL).
2026-11-11 16:45:09 +01:00
Niko1221 fefaa985c1 Merge main c1ff07f1a into f-own-int 2026-11-11 16:44:44 +01:00
Niko1221 a5104df5bf engine: the shared-memory page drop only in a Linux CUDA build, its line only when pages were given back
The block that gives the GGUF's cached expert pages back (generate.cpp, after the prompt path is set up) was under no
backend guard. cudaDevAttrIntegrated is true on AMD APUs under HIP (hipDeviceAttributeIntegrated) and on every Mac under
the Metal layer, the gfx906 layer has no such attribute, and Windows has no page drop, so on those builds the block either
ran ungated on a class it was not measured on, printed its line with nothing freed, or did not compile. The whole block
(call and log line) is now inside #if __linux__ && !STRATA_USE_HIP && !STRATA_HIP_GFX906 && !STRATA_GPU_METAL, and the
[DRAFT] line prints only when pages were actually given back. tools/test_uma_drop_guard.py checks that the call, the
setting's reads and the line all sit inside that guard. The register's two read lines follow the move.
2026-11-11 15:45:26 +01:00
Niko1221 d3d4d16120 engine: the page-drop line is a [DRAFT] for the owner's wording; STRATA_UMA_DROP_PAGES in the settings register
The log line of the shared-memory page drop is plain words now and marked [DRAFT] until the owner words it
(par/OWNER-WORDING-1111.md, SPARK). The numbers (bytes given back, time, free memory before and after) print only with
STRATA_UMA_DROP_PAGES=2. The switch is in data/settings-register.json as a research setting (the A/B arm of the gate),
not documented for users.
2026-11-11 13:11:41 +01:00
Niko1221 3220dbc0e0 engine: a shared-memory GPU with every expert resident gives the model file's cached expert pages back
On a GPU that shares the system RAM (cudaDevAttrIntegrated, the DGX Spark's GB10) CUDA counts only the RAM the kernel has
free: cudaMemGetInfo equals MemFree, not MemAvailable (measured: 62.59 GiB free = MemFree, MemAvailable 118.77 GiB). The
start reads every expert of the GGUF into the cache through the mapping, and those 47 GB of pages stay in the page cache
as a second copy of the cache's bytes. At READY the box had 1.3-1.6 GiB of MemFree, and the picture reader's own CUDA start
failed ("CUDA error: out of memory ... cudaSetDevice") in most starts, so a 2048x1536 picture took 91-105 s on the CPU
reader instead of about 3 s on the card.

When every expert is in the GPU cache on such a device (one GPU, the GGUF read in place), the engine now gives those
pages back after the prompt path is set up: madvise(MADV_DONTNEED) and posix_fadvise(DONTNEED) per expert blob, whole
pages inside the blob only. The experts of the slots the prompt path borrows keep their pages, because the refill after a
borrowed prompt reads them again. The cache holds the same bytes either way, so no output bit changes.
STRATA_UMA_DROP_PAGES=0 keeps the pages (for A/B runs).
2026-11-11 12:22:53 +01:00
Niko1221 cd97450504 Merge main 6c642df75 into f-own-int (round 16: network waits, robustness, Windows kill-on-close job start, GitHub and transfer fixes)
Conflict: tools/test_setup_llama_archive.py, deleted on f-own-int (e43ff9885, no llama.cpp archive
download in the own stack) and changed on main (fd40eb0fd, its urlopen mock moved to netpolicy):
kept deleted.
2026-11-11 10:21:31 +01:00
Niko1221 042bc2b5a4 Merge f-evict-report (AMD Linux: driver-pause time in the stall report and per request) into f-main-1111b 2026-11-11 10:20:16 +01:00
Niko1221 03e687ace4 AMD Linux: show how long the driver paused the GPU (stall report and request line)
The amdgpu driver suspends all GPU queues of a process while the kernel moves
or reclaims host pages the GPU maps, and counts the time per GPU in
/sys/class/kfd/kfd/proc/<pid>/stats_<gpu id>/evicted_ms. On p620 a slow
prompt read lost about exactly that time (RESULTS-GH-URGENT, option 1) and no
log showed it.

- include/strata/core/gpu_pause_time.hpp: header-only reader (sum over the
  process's GPUs; a missing, unreadable or non-numeric counter = not
  available, -1) and the two lines.
- generate.cpp: read once when a request begins and once at its end (a line
  only when the request saw >= 100 ms), and in each pass of the stall report
  beside the memory line (the change over the report's 2 s). HIP on Linux
  only; every other build returns "not available" and prints nothing.
- tests/core/gpu_pause_time_test.cpp: fake KFD tree (present, several GPUs,
  missing, unreadable, garbage) and the line formats.

Both lines are the owner-approved wording of 11-11. The test also reads a
missing KFD tree 10,000 times: not available, no line, mean cost printed.
2026-11-11 07:50:00 +01:00
Niko1221 2f52b86360 Merge f-gh1110 (automatic RAM copy wording of 11-11 morning) into f-main-1111 2026-11-11 07:38:29 +01:00
Niko1221 c28474dc4f automatic RAM copy: two lines in the owner's wording of 11-11 morning
The prompt-path line of the automatic RAM copy reads "A larger automatic
RAM copy (...)" (was "A larger the automatic RAM copy"), and the uncovered
lend-slots line asks to "Free more RAM for the automatic RAM copy (...)"
(was "Raise the automatic RAM copy"). With --resident-budget-gib given,
both lines stay byte for byte.
2026-11-11 07:38:29 +01:00
Niko1221 7ae0bc8ade Merge f-robust-0215 ca9c53c1f into f-main-1111
serve STOP on a closed pipe, the launch worker after quit, the stall report
asks the prompt's GPU work, ISA-floor parity legs, the sleep stand-in, a
Windows child in the kill-on-close job before it runs, and the approved
wording of their lines.

Conflict: CMakeLists.txt, where f-gh1110 and this branch both add test
targets after batch_telemetry_test (conversation_heap_test and
stream_watch_test). Both blocks are kept.
2026-11-11 00:15:00 +01:00
Niko1221 40334701c0 expert cache and RAM copy: the free-memory line and the automatic RAM copy's lines in the approved wording
The line for a free-memory query that failed (#5708) and the clamp line of
the automatic RAM copy now read as the owner approved them on 11-11; the
placeholder markers are gone. The four other messages that named
--resident-budget-gib on the automatic path name "the automatic RAM copy"
there; with the flag given they stay byte for byte. resident_ram_copy_test
checks the automatic clamp line in full.
2026-11-11 00:11:41 +01:00
Niko1221 feaa928f90 resident RAM copy: STRATA_RESIDENT_PIN also for the automatic copy; its clamp line names no flag
The engine read STRATA_RESIDENT_PIN only while parsing --resident-experts
and --resident-budget-gib. When the expert arena does not fit and the
engine takes the RAM copy by itself, the fallback set the pin
unconditionally, so STRATA_RESIDENT_PIN=0 left that copy page-locked
(the #5718 cap test's arm Z: "page-locked and mapped" with the variable
set). On the same path the clamp line said "--resident-budget-gib 47.07
exceeds available RAM" although no such flag was given.

New header include/strata/core/resident_ram_copy.hpp:
resident_pin_from_env (one reading of the variable: "0" pageable, unset
or anything else page-locked, as the two string compares before),
auto_ram_copy_mode (the fallback's mode, now reading it) and
resident_clamp_line (the clamp line by where the budget came from).
generate.cpp's two flag branches and the fallback use them; generate
tells the file source the budget is the automatic one
(FileExpertSource::budget_is_automatic) before pin_cache_complement.

Unset variable: the same mode and the same bytes as before on every
path except the automatic copy's clamp line. That line now carries a
placeholder wording marked [DRAFT] (resident_ram_copy.hpp, the
Automatic case); the flag's line and the what-fits line are unchanged
byte for byte (checked by the test).

Test: tests/core/resident_ram_copy_test.cpp (cpu-check). On the old
behaviour (the fallback's pin always on, the flag's line for any
budget) it fails 5 checks; now it passes.
2026-11-10 23:24:39 +01:00
Niko1221 711a7e9378 engine: the stall report asks the prompt path's compute stream whether its work is done
A prompt read waits in cudaStreamSynchronize on its compute stream
(prefill.cpp, "waiting for the GPU (attention, router)"). When that wait
never returned, the watchdog's stall report and the release after it asked
only the verify window's streams, so a GPU that never finished the work
could not be told from a host that was not woken after it had finished
(#5718 follow-up).

New include/strata/core/stream_watch.hpp: a small list of the streams a
host may be waiting on. Prefill::run_impl names its compute stream there
while it reads; stall_report (both passes, before the release) prints one
line per named stream from cudaStreamQuery: finished, still running, or the
query's error. Works through the HIP shim and metal_compat (cudaStreamQuery,
cudaErrorNotReady). The line's wording is a PLACEHOLDER marked [DRAFT],
pending review.

Test: tests/core/stream_watch_test.cpp (cpu-check; faked queries, no GPU).
2026-11-10 20:52:55 +01:00
Niko1221 7ee50cc8c7 split: price each stage's prompt loan on its own card (#5722)
Prefill::bytes_needed answers for the current device (prefill.cpp fused_ring
decides the fused layout per card), and part_slots / ring_room priced every
participant of a layer split with whatever device was current, CUDA0's. On an
RTX 5080 + RTX 4090 split the 4090's loan was 2882 MiB for buffers that take
3014 MiB there, and its prompt path stepped down to small chunks.

New helper split_ring.hpp split_part_figure(on_device, dev, fn) evaluates
fn() with the participant's device current (OnDevice, put back after);
generate.cpp part_slots and ring_room's bytes_needed_no_ring go through it.
CUDA0's own part (dev -1) is priced as before. On like cards every device
gives the same figure, so the numbers are unchanged.

Test: tests/program/split_part_price_test.cpp (cpu-check, faked devices).
With the old pricing: CUDA1 lent 2880 MiB for 3014 MiB of buffers, reads
6144-token chunks (fail); now lent 3016 MiB, reads 8192; 2 and 4 like cards
give identical slot counts over the 256..32768 chunk grid. No mixed-card
machine was available: no real mixed-card run backs this.
2026-11-10 18:30:45 +01:00
Niko1221 8c71c49278 conversation cache: an evicted parked conversation gives its RAM back to the system (#5697)
A ConversationBuffer's segments are plain allocations of up to 16 MiB. Once
glibc's dynamic mmap threshold has risen (the first freed segment raises it)
they come from the heap, and free() returns only the heap's top: an entry
below a newer one stayed resident, so the physical-RAM gate evicted every
parked conversation and still refused ("evicted 2, 0 still parked"). Two
comments said the opposite.

evict_oldest() now calls release_free_heap() (glibc: malloc_trim(0); a no-op
elsewhere) after dropping the entry; make_room() keeps dropping entries without
it (drop_oldest), as the image allocated right after reuses that memory. The
admission gate in generate.cpp also hands freed memory back once before it
evicts anything, so memory freed by make_room or dropped checkpoints counts.
Nothing changes while the gate admits at the first check.

Test: src/core/conversation_heap_test.cpp (cpu-check). Boston, glibc 2.39,
3 x 512 MiB parked, evict the oldest: before 0 MiB returned (RSS 1539 ->
1539 MiB, 0.01 ms); after 511 MiB returned (1539 -> 1027 MiB, 8.8-9.3 ms).
2026-11-10 17:52:17 +01:00
Niko1221 c7c78ed4f3 NVIDIA: a bare --prefill auto takes the 32768 chunk ceiling on compute capability 7.0 (Volta) single cards too
The 8.0-and-up rule (nv_chunk.hpp) left Volta at 8192 as "not measured".  Measured on one Tesla V100-SXM2 32 GB (gen3 x8 link, UD-Q4_K_XL,
33% of the experts in VRAM), 5 alternating pairs of 8192 against 32768: 4K +0.3%, 8K +0.2%, 20K +134.1%, 32K +111.2%; decode after the prompts unchanged;
first-token KL mean 3.7e-5 (20K) and 4.0e-4 (32K), top-1 13 of 13.  Turing (7.5) and Pascal (6.x) keep 8192; a layer split keeps 8192 (four V100s read a
20K prompt 27-30% slower with larger chunks).  nv_chunk_card_ok takes the lowest card's major and minor; the unit test pins 7.0 yes, 7.5 and 6.x no.
2026-11-10 17:39:28 +01:00
Niko1221 d5d5b08379 Merge f-0213-shape (61d883315): a new-shape Qwen4 engine ships as its own component strata-q4-<shape> beside the Strata engine, picked by the model (owner 11-08: separate components; wording approved 'A ok, 1 yes, 2 later, 3 yes') - feed member shape_engines, setup/launch/update/Mac paths, strata --geometry checked against the signed manifest at install, older Controls never offer the model; l620 e2e (Flash-Next engine hash unchanged), Windows long-path install, Mac m1002 run 2026-11-08 22:20:12 +01:00
Niko1221 e3bd5cfdef Merge f-0213-defaults (a04860fad): DFlash2 per-device defaults - Strix Halo and Blackwell cc 12.0 cards with >= 48 GB draft window 6 -> 8 (all sets), conf 0.55 for IQ3_S only on that Blackwell class; end to end through the Terminal's flags, 3 interleaved rounds: Strix UD-Q4_K_XL x1.052 (output differs, deterministic; owner 11-08: ship as is), Strix UD-IQ4_XS-v31 x1.020 (identical), l620 IQ3_S x1.028 (identical); every other card unchanged 2026-11-08 22:09:21 +01:00
Niko1221 d362bc5f00 Engine: no Windows 2560 MiB reserve floor on an integrated (UMA) HIP device (G16)
On Windows HIP, an auto expert cache with no --vram-reserve-mib kept a floor of 2560 MiB free on any card of 15 GiB or more (#1376, made for a 20 GB discrete
card that paged). On a Strix Halo that room is not free: the RAM budget's page-locked complement takes it straight back (cache + complement 71.72 GiB at 2560 and
71.73 GiB at 700 on UD-Q4_K_XL), so the prompt path's own buffers found 0 MiB and the engine stepped its chunk down 16384 ... 1024 for ever; strata launch of a
UD-Q4_K_XL config with no reserve (pictures off, or a model with no picture reader) never started.

The floor now goes through strata::core::wddm_auto_reserve_mib(integrated, total, current, floor): a discrete card of 15 GiB or more still gets 2560, an
integrated GPU (the device property the UMA sizing already reads) keeps the engine's default 700. Discrete cards, Linux and every config that passes
--vram-reserve-mib are unchanged (the block is under _WIN32 + STRATA_USE_HIP and behind !vram_reserve_given). Unit test in uma_cache_test.

CUDA sm_120 sm build (vendored ggml), base vs change from the same path: the binaries are bit-identical (sha256 2b603395...).
Strix (gfx1151, public-0.2.12-style config with no reserve) with the new engine: starts in 77 s and answers 3 chats; the old engine never started it.
2026-11-08 21:13:59 +01:00
Niko1221 febc0226f5 strata --geometry: prints the name of the model shape the kernels are compiled for (the geometry header's kGeometryName; flash_next for the default build). One host line beside --families; no compile flag, no kernel changes. 2026-11-08 20:56:46 +01:00
Niko1221 6ec4d68ab2 DFlash2 per-device defaults (11-08 CONF-SWEEP): Strix Halo window 5 -> 8; Blackwell cc 12.0 with >= 48 GB conf 0.35 -> 0.55 and window 6 -> 8
Strix Halo (gfx1151): engine cap 5 -> 8 and the Terminal writes --spec 8; conf stays 0.35.
Measured (5 interleaved pairs, 5/5 faster): UD-Q4_K_XL +5.3%, UD-IQ4_XS-v31 +2.1%.
UD-Q4_K_XL greedy output differs from the old width's (deterministic run to run); v31 is identical.

Blackwell sm_120 (cc 12.0) with at least 48 GB: cap 6 -> 8, --draft-conf 0.55 (RTX PRO 5000 72 GB,
IQ3_S +2.4%, 5/5 pairs, output identical). The DGX Spark (cc 12.1) and consumer cards under 48 GB keep
conf 0.35 and cap 6. dflash2_auto_cap now takes the compute minor and the card's memory; drafting.py
writes --spec 8 only on these two classes (window_for), so no other card's effective window changes.

draft_cap_test, tests/terminal drafting tests (new test_drafting_card_window.py) and the snapshot
goldens (nv_resident and strix_halo_win only) are updated.
2026-11-08 20:04:02 +01:00
Niko1221 b12773820f #5327: the owner's wording for the "loads anyway" warning, and the RAM notices on stdout in --serve mode only
The warning now reads "the experts need X GiB of RAM and Y GiB is free, but free memory, file cache and reserved huge pages can hold
them, so they load anyway (same answers). STRATA_ARENA_FILE_CACHE=0 reads them from the file instead."  It and the "not enough RAM for
the expert arena ... reads the experts from the file" notice go to stdout only with --serve (before READY, which the server ignores; a
service log has them).  A plain generate run keeps its token stream clean: stderr only, as before the PR.
2026-11-08 19:02:58 +01:00
pjgmobile 28bd0185f9 #5327: on Linux an expert-arena shortfall the file cache can serve loads through it again - the 0.1.55 warn-and-proceed (free pages + Cached+Buffers+SReclaimable-Shmem-Dirty cover the need: MemAvailable credits only half the cache), said loudly on stdout as well, because a service setup never sees stderr; the #4846 refusal stays for shortfalls it cannot serve (#4051's anonymous RAM), under a cgroup limit, and on Windows, and STRATA_ARENA_FILE_CACHE=0 turns the credit off; tests 2026-11-08 17:24:35 +01:00
Niko1221 dcaf4755c1 ple_direct_rows_per_s: the probe's output buffer is PLE_N_HEADS x PLE_HEAD_DIM floats a token, not 2560 (heap overflow of 24 KB at hidden 4096; on Metal it corrupted Apple's shader-cache objects and the first window of strata --serve at q4_big died in MTLCompilerFSCache::getElementImpl) 2026-11-08 09:04:39 +01:00
Niko1221 4dad59ab37 Merge f-q4-geometry (fc1c4e429): the model shape is fixed at build time (-DSTRATA_GEOMETRY / -DSTRATA_GEOMETRY_FILE); the default Flash-Next build is unchanged (CUDA SASS 3573/3573, HIP gfx1201 3920/3920, gfx1151 path-string offsets only, SYCL 22/22 checksums, Metal 10/10 tokens, CUDA 130/130 tokens); Qwen4 test shapes q4_lite/q4_mid/q4_big pass logits gate 2 on CUDA (Qwen4 prep) 2026-11-08 04:48:39 +01:00
Niko1221 6f379c8e7c generate.cpp: string literals of the PLE checks 2026-11-07 21:29:14 +01:00
Niko1221 caebc48411 generate.cpp: PLE constants declared at function scope, string literals fixed 2026-11-07 21:24:17 +01:00
Niko1221 f3e99e58d5 geometry: attention G, fused_gr tiles and fast up for hc_lr 256-512, top-k from the geometry in native_moe, native activation buffers follow n_embd/n_ff, PLE hash constants read from the model file 2026-11-07 21:21:16 +01:00
Niko1221 75822f3e9e generate.cpp: the expert layout is loaded for the compiled geometry's layer count 2026-11-07 20:59:19 +01:00
Niko1221 88e6634390 Revert "engine: on AMD that is not gfx12, a UD-Q5_K_XL / UD-Q6_K_XL style file (most expert gate/up tensors Q5_K or Q6_K) runs the K-quant MMQ prompt kernels by default (STRATA_MMQ_KQ=1; was setup's unsloth_default_env; owner yes 11-07); STRATA_MMQ_KQ=0 turns it off"
This reverts commit ffb94c578c.
2026-11-07 18:40:47 +01:00
Niko1221 055274c882 Merge main b0fc432ed (step 4, step 2, 1A) into f-clean-1c
# Conflicts:
#	data/settings-register.json
2026-11-07 18:40:24 +01:00
Niko1221 5e1ea3ff6e tools/q4geo_synth.py: synthetic qwen4exp GGUFs at any shape in the type mix of an Unsloth UD file, and the geometry header of a shape or a real file; routing trace layer bound from the geometry 2026-11-07 18:16:50 +01:00
Niko1221 af7759b69e geometry: the compiled shape is a header chosen at configure time (STRATA_GEOMETRY / STRATA_GEOMETRY_FILE), with the constraints every shape must meet in one place 2026-11-07 18:04:24 +01:00
Niko1221 e62f3c1ffd Retire STRATA_DF2_GATE and STRATA_DF2_ROW_MS: the calibrated DFlash2 gate (cleanup 4.5 batch D)
Removes AdaptiveGate, df2_gate_on() and df2_gate_row_ms() (window_rule.hpp), their three
sites in generate.cpp and their block in window_rule_test.cpp. The opt-in gate measured
2.7-4.9% slower; with it off (the default) the window rule is unchanged. The register
marks both retired in 0.2.13.
2026-11-07 16:28:46 +01:00
Niko1221 ffb94c578c engine: on AMD that is not gfx12, a UD-Q5_K_XL / UD-Q6_K_XL style file (most expert gate/up tensors Q5_K or Q6_K) runs the K-quant MMQ prompt kernels by default (STRATA_MMQ_KQ=1; was setup's unsloth_default_env; owner yes 11-07); STRATA_MMQ_KQ=0 turns it off 2026-11-07 14:55:49 +01:00
Niko1221 567c46873f engine: on CUDA a GGUF that carries the hyper-connection projections as Q8_0 (Unsloth UD-* files) reads them as Q8_0 by default (STRATA_HC_Q8=1; was setup's unsloth_default_env; owner yes 11-07); STRATA_HC_Q8=0 turns it off 2026-11-07 14:55:06 +01:00
Niko1221 0a50eda160 engine: on Linux with every card gfx12 the chunked GDN scan is on from the first chunk (STRATA_GDN_CHUNKED=1 by default; was the launcher's GDN_STACK_GFX12; owner yes 11-07); STRATA_GDN_CHUNKED=0 turns it off 2026-11-07 14:54:00 +01:00
Niko1221 6858c919ca engine: STRATA_GDN_TC=1 and STRATA_GDN_CONVL2=2 are the Linux CUDA engine's own defaults (was the launcher's GDN_STACK_CUDA; owner yes 11-07); =0 turns each off 2026-11-07 14:53:32 +01:00
Niko1221 c9abd38a7f engine: the exact parallel-request stack is the Linux CUDA engine's own default with 2 or more batch slots (was the launcher's PARALLEL_STACK_ENV); each switch keeps =0, a value you set is kept 2026-11-07 14:09:51 +01:00
Niko1221 0a0e4463ea file tier: the re-check after the RAM copy counts only the page cache the group can really have (on by default; STRATA_FILE_TIER_HONEST=0 turns it off)
I/O path only: the same bytes are read, only HOW the experts outside the RAM copy are read (unbuffered or through the file cache) is chosen differently.

file_tier_unbuffered took its `avail` from cgroup_available_bytes, which credits the group's whole `file` counter as reclaimable. On a RAM-budget
config that credit includes pages the engine holds itself: P2003 (RTX 3060, 46 GB, 36 GiB group), UD-IQ4_XS-v31, 22 GiB RAM copy: the re-check read 18.7 GiB
available when the group had 11 GiB left (limit 36, current 24.8). With held = 0.52 >= 0.5 the timed drive probe was skipped and the file tier switched to the file
cache (direct reads 7.9 GB/s vs 2.5 GB/s cached): prompts 2.5-3x slower (pp2k 85 vs 273 tok/s, pp8k 195 vs 580), decode 10-14% slower. The one start that read
12.0 GiB kept the fast mode, which is why the first start of a session was sometimes fast.

Now the smaller of that figure and the conversation cache's sampler (only the clean inactive file cache is credited, the group's own limit, no operator
cap) decides. The --memory-limit-mib cap is not applied: it bounds the engine's own allocations, not the page cache (counting it sent IQ3_S unbuffered and cut its decode
2-3x). A flip now prints once: "strata: expert reads now go through the file cache (X GiB of RAM free for them, Y GiB limit)"; the technical line is behind STRATA_TRACE.
STRATA_UNBUFFERED_LOAD still forces either mode.

Measured on P2003 (build wip11, n >= 3 starts per arm, interleaved fresh engines, I/O-quiet before each start, memory watch on, floor 14336 MiB):
 v31 unforced: main flipped in 5 of 6 starts, this change 0 of 9 (6 + 3): pp2k 85-94 -> 263-273 tok/s, pp8k 187-198 -> 580-590, code_py decode +14 to +20%;
 v31 DFlash2 vs MTP in the kept state (3 rounds): DFlash2 +2 to +14% per kind (json_extract -3.5%);
 IQ3_S: the file cache stays (9 of 9 starts), decode level with main (code_py 17.0 vs 15.6 tok/s, json_extract 14.2 vs 13.4, page cache evicted before every start);
 low RAM (6-7 GiB ballast, budget 16 GiB): no regression, MemAvailable minimum 14911 MiB;
 memory minimum with the unbuffered state 15.6-15.8 GB (floor 14.3 GB), no arm stopped.
Not P1.8: main and the P1.8 build flip alike.

(cherry picked from commit be3831e9d944fb44ac36d176f4764e30df0f9f6b)
2026-11-06 15:51:21 +01:00
bulhenvaster bca7931f3d peer tier: STRATA_ADAPT_OVERLAP=1 with --peer-device (the peer's copies land while the next window runs)
In peer mode the adaptive overlap was refused, so every decode window first waited for the previous round's copies. With the overlap the peer
tier issues its copies in layer order, signals each layer's landing the way the primary does (a stream-ordered D2H copy of the layer number into
a pinned int, or host functions), its residency table takes the swaps at the window's start (flip_pending), and a layer waits for a tier's copies
only when that tier swapped in it (AdaptGate: peer_landed, peer_has, per-tier last). The wait before a window clears the peer's marks with the
primary's. Without the variable nothing changes.

Ported from #2720 (bulhenvaster), rebased by hand onto the current gate (the watchdog label stays). Not ported: STRATA_PEER_LAUNCH_IN_POOL
(the author measured no gain on his build), the new decode timing line and the documentation paragraph.

(cherry picked from commit e78b64a7348d685dfd11799fdb395661f2120436)
2026-11-06 15:47:43 +01:00
sergqwer 24c6c2f682 Admit the PCIe share's fetched misses to the GPU cache (opt-in STRATA_ADAPT_FETCH=1|2)
Decode reads missed expert blobs from host RAM three ways; the PCIe share's
blobs cross into VRAM anyway and were dropped after the window. With the
switch set, the share takes each layer's most-routed misses and a fetched
expert routed enough more than the layer's least-routed resident expert that
the window does not route is copied straight into that expert's slot
(fetch_blobs gets an optional dst2 target per blob). =2 leaves the tier's own
swaps out of a layer where an admission ran. STRATA_ADAPT_FETCH_VERIFY=1 reads
every admitted slot back. Off, with a log line saying why, where it cannot run.
Unset changes nothing.

Ported from PR 2964 (sergqwer) onto f-0216-core; the strata generate verify
loop was merged by hand (main's speculative-q lines kept) and the DETAILS.md
note became a row of the opt-in switch table.

l620 (RTX PRO 5000, IQ3_S, 3,896-slot cache, --pcie-frac 0.25): decode =2 +10.2%,
=1 +5.0% (4 rounds); token forcing over 14,167 tokens: mismatch 2.73% vs 2.53% /
2.53% for two unset arms (+0.19 pt, 90% CI -0.02..+0.42), PASS.

(cherry picked from commit b2bfaef906acee4f86bdf9f052aee6a4d295fb4e)
2026-11-06 15:47:43 +01:00
Niko1221 d486fbe7d6 serve: STRATA_FOLLOW / STRATA_FOLLOW_LOGPOS token forcing through the real decode/verify windows (test and measurement only, off by default); force_check.py score --path decode
(cherry picked from commit af68878f0cc4c5aa4618da8f96b10f9262230721)
2026-11-06 15:47:43 +01:00
Niko1221 2a8217c0ce generate: the CPU expert kernel line reads 'CPU expert kernels: <X>' (owner's short wording) 2026-11-06 09:44:37 +01:00
Niko1221 78c5a834e3 Merge f-0216-dfship into f-0216-all 2026-11-06 09:36:34 +01:00
Niko1221 51548e5539 Merge f-0216-strix2 into f-0216-all 2026-11-06 09:36:34 +01:00
Niko1221 7597e383cf Merge f-0216-rtx into f-0216-all 2026-11-06 09:36:30 +01:00
Niko1221 f2eedfe9f2 Merge f-0216-cpu into f-0216-all 2026-11-06 09:36:30 +01:00