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
7b04360f93
hip prefill: the package tuning folder lookup split the exe path on '/' only (a backslash escape lost in the string): split on both
2026-10-22 18:05:47 +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
c62d980112
hip prefill: with no STRATA_HIPBLASLT_TUNING in the environment the engine takes the table beside it (tuning/<arch>-hipblaslt-<version>.txt) itself, so a start that did not come through the launcher (hand-made config, CLI) does not read prompts at half speed on a Strix Halo; STRATA_HIPBLASLT_TABLE=off keeps plain hipBLAS
2026-10-22 17:04:58 +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
a4c503d7ce
nv_defaults: the sm_86 speculative start-up adaptation is opt-in (STRATA_SPEC_ADAPT_SM86=1); owner round 9 measured 0.995 on the A4000s and a length-confounded 3060, so the earlier gain did not reproduce
2026-10-22 12:43:35 +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
6d4874a491
hip: 8-bit hyper-connection weights (STRATA_HC_Q8) on by default on gfx1151, STRATA_HC_Q8=0 keeps the bf16 read; one start-up line; docs and 0.2.2 release note with the KL table and the CPU-vs-GPU rounding baseline
2026-10-22 08:16:47 +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
aec327ee51
gr: fold the hyper-connection inject and gate/mean into their neighbours
...
gr_read launched six kernels per hyper-connection read: norm, down,
gate, mean, inject, write. The inject projection is now the down grid's
last block (one warp per stream, the same lane stride and warp_sumf as
gr_inject_kernel), and gate + mean are one kernel (one block owns WARPS
columns for every stream, the per-stream gated values meet in shared and
are added in the old c order). Both keep the old per-row arithmetic and
reduction order, so lo/lq, mixed and inject are bitwise unchanged; gated
is no longer written to global because nothing outside gr_read reads it.
Six launches per read become four.
This is a no-op for the default IQ3_S path on the Strix Halo: that engine
already takes the fused (staged) hyper-connection read, not gr_read. The
change is kept for the unfused gr_read path (CUDA, other HIP
architectures and --no-fused-gr).
Verified on gfx1151: json_extract at fixed windows (--spec 4
--spec-min-p 0 --suffix-draft 0) gives an identical output line before
and after.
2026-10-21 23:42:55 +02:00
Niko1221
9fe2ad3f55
wip: gfx1151 takes mode 8 gate/up (LDS, fused SwiGLU + q8_1) and the CUDA-layout down for IQ4_NL
2026-10-21 19:55:22 +02:00
Niko1221
ba6966d83f
verify: the DFlash2 tap kernel only where the DFlash2 sources are built (Metal and SYCL keep the per-row dump path)
2026-10-21 19:52:11 +02:00
Niko1221
4c953b424d
wip (experiment): expert layouts compiled for every HIP arch
2026-10-21 19:46:43 +02:00
Niko1221
6f83fe2c42
dflash2: drop the cache-touch kernel (no gain), wait-commit measurement switch
2026-10-21 19:46:26 +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
48ec4a59ac
spec: cost-aware window: the first round of a width is replaced by the guess from the other widths, a running mean for the first samples
2026-10-21 16:10:56 +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
b7d5ea2f82
native_expert_bench: BENCH_CAP sizes the launch for more possible groups than real ones (what the empty block rows of a verify window cost); bench only
2026-10-21 15:08:13 +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
dcba249d01
verify: STRATA_TAP_FILE, an env-gated dump of the hidden states at chosen layers per verified row (DFlash2 acceptance experiment; off by default, no new graph nodes without it)
2026-10-21 13:25:19 +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
d1dec64362
verify: STRATA_TAP_FILE, an env-gated dump of the hidden states at chosen layers per verified row (DFlash2 acceptance experiment; off by default, no new graph nodes without it)
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
2c8eb88196
Merge f-022-gyrocuda: Gyro trellis kernels faster on NVIDIA (8-lane rows on every card above Pascal): Gyro-S +17%, Gyro-M +11% on an RTX 3060, identical answers
2026-10-21 02:20:43 +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
86d10ed8f9
verify (HIP): the first launch of each window graph reads the PLE rows and raises the PLE flag before cudaGraphLaunch, so the launch cannot wait for a GPU that waits for the flag (first-window hang on gfx1151; STRATA_VERIFY_EARLY_PLE_FLAG=0/1/2)
2026-10-21 01:38:57 +02:00
Niko1221
01f8c32559
Merge f-022-int into f-022-gyrocuda: Pascal path kept for cc 6.0, 8-lane trellis rows for every other CUDA card
...
iq_kernels.cu is f-022-int's (staged codebook, row chunks and staged activations on cc 6.0; STRATA_TQ_STAGE). On top of it, tq_sub8_on()
(CUDA, not cc 6.0, STRATA_TQ_STAGE / STRATA_TQ_SUB8 not 0) turns on the staged codebook and the staged 8-lane down rows for the other cards
and adds the 8-lane 160-dot gate/up rows (row_dot_160_sub8). RTX 3060, Gyro-M, 24 groups, 1 token: gate/up 142 us (the cc 6.0 path forced:
158, off: 225), down 77 (off: 184); the hashes of the outputs are equal in all three modes.
2026-10-21 01:16:12 +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
8a4106a47e
suffix drafter: randomized soundness test (small vocabularies, tiny tables, propose_after), clean under ASan/UBSan
2026-10-21 00:41:25 +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
0da82e740c
prefill gemm: skip the padded dequant on a device that has no padded product (a gfx12 stage of a gfx1151 + gfx1201 split)
...
After #3484 the process-wide STRATA_PF_PAD can be on for a gfx12 stage, which then dequantized every weight padded, found no product and dequantized it
again unpadded before the copy path. Ask strata_pf_padded_gemm_available() for the current device first; same products, same bits.
2026-10-21 00:00:22 +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