Commit Graph
767 Commits
Author SHA1 Message Date
Niko1221 52ac4e7337 NVIDIA: STRATA_MMQ_KQ=1 is on by default for compute capability 8.0 and up (owner yes 11-03): K-quant experts (UD-Q4/Q5/Q6_K_XL) read the prompt on the MMQ kernels
kNvKqDefaultOn is true; STRATA_MMQ_KQ=0, STRATA_NV_KQ_DEFAULT=0 and STRATA_DEFAULTS=026 turn it off, a STRATA_MMQ_KQ the user sets is kept, Volta / Turing / Pascal keep the FP16 prompt path. A pack without K-quant experts never reads the variable.
Start check (RTX PRO 6000, UD-Q4_K_XL, no STRATA variable set): the start prints the K-quant MMQ line and loads libstrata_kq; 4K prompt GPU timeline 1,047 ms (dequant 7.3%) against 1,500 ms (dequant 25.1%) with STRATA_MMQ_KQ=0, prompt 2,854 vs 2,233 tok/s (one request each).
2026-11-03 12:20:34 +01:00
Niko1221 e2f7c47447 NVIDIA: STRATA_MMQ_KQ=1 as a candidate default for K-quant experts (UD-Q4/Q5/Q6_K_XL prompt on the MMQ kernels), behind STRATA_NV_KQ_DEFAULT=1 until the owner says yes
UD-Q4_K_XL's Q4_K gate/up and Q5_1 down experts read the prompt through the FP16 dequant path plus cuBLAS on CUDA (STRATA_PREFILL_TIMING, 8K prompt on an A6000: dequant 21%, gemm gate/up 24%, gemm down 13% of the GPU timeline).
With STRATA_MMQ_KQ=1 (libstrata_kq): RTX PRO 6000 (sm_120) prompt 4K +37.7%, 8K +25.8%, 20K +34.3%, 32K +32.6% (n 4 per cell, 2 rounds, all won); A6000 (sm_86) 4K +1.7%, 8K +9.0%, 20K +8.1%, 32K +11.2%. First-token KL against the FP16 path over 24 prompts of 2K: 0.0243 (PRO 6000) and 0.0351 (A6000), top-1 23/24 and 22/24.
nv_kq_default_env / apply_nv_kq_default: compute capability 8.0 and up (lowest card decides), off switches STRATA_MMQ_KQ=0, STRATA_NV_KQ_DEFAULT=0, STRATA_DEFAULTS=026; kNvKqDefaultOn stays false, so nothing changes by default.
2026-11-03 10:18:17 +01:00
Niko1221 07e1508893 Merge f-0211-hybrid into f-0211-int 2026-11-03 08:46:30 +01:00
Niko1221 c2d44e93ac gfx12: K-quant experts read the prompt on MMQ by default; bare --prefill auto takes 32768-token chunks
Owner 11-03 ("do all 5"), two prompt defaults for Linux gfx12 (R9700), both changing rounding slightly and both with their off switch.

STRATA_MMQ_KQ=1 joins the gfx12 value-changing defaults (gfx12_extra.hpp, applied by apply_arch_defaults, so a raw engine gets it too; Linux only like the
other approved gfx12 prompt defaults; STRATA_MMQ_KQ=0, STRATA_GFX12_DEFAULTS=0 or STRATA_DEFAULTS=026 turn it off, a value the user sets wins). The experts of
Unsloth's UD-Q4/Q5/Q6_K_XL files (Q4_K, Q5_K, Q5_1, Q6_K) then run their prompt products on llama.cpp's MMQ kernels instead of being dequantized to FP16 and
multiplied by hipBLASLt (UD-Q4_K_XL ran 25K dequant launches and ~50K small Tensile GEMMs per 8K prompt). R9700, same job, interleaved: prompt 4K +10.3%,
8K +14.3%, 32K +16.8%; first-token KL against the FP16 path 0.031 over 24 prompts of ~2K (agent turns 0.065), top-1 23/24. A pack without K-quant experts never
reads the variable. The fused variant (STRATA_PF_FUSED_KQ) stays a flag.

The gfx12 ceiling of a bare --prefill auto goes from 16384 to 32768 (gfx12_chunk.hpp, pure functions with tests). A 20K prompt is one chunk instead of
16384 + a 3.6K tail, and every chunk of 1,024 tokens or more streams all the experts the card does not hold. R9700, IQ3_S, 3 rounds interleaved: 20K +12.1%,
64K +2.6%, 32K +1.3%, 8K +0.9%; UD-Q4_K_XL 20K +26%; first-token KL against 16384 at most 5e-5. The lent slots are taken only for what a prompt needs and are
refilled after it; the RAM guard (#2090) now steps 32768 -> 16384 -> 8192 until the extra loan fits. STRATA_GFX12_CHUNK=16 keeps 16384, =0 keeps 8192.

gfx12_extra_test covers both (gfx only, Linux, off switches, user value wins, the ceiling and its step-down); docs/DETAILS.md lists them.
2026-11-03 08:32:12 +01:00
Niko1221 213f1a3905 Engine: the auto CPU/PCIe miss share follows the CPU pool by default on a discrete card: ceiling 0.95, factor k falling from 1.85 at 30 GB/s of expert bytes to 0.8 at 12, and a CUDA layer split refines its stage shares (STRATA_PCIE_AUTO_SPLIT=0, STRATA_PCIE_K_RULE=0 and STRATA_PCIE_SHARE_MAX=0.60 restore 0.2.10; integrated GPUs, HIP layer splits and STRATA_DEFAULTS=026 keep it). Pure rule in pcie_share_rule.hpp with a test. 2026-11-03 08:27:33 +01:00
Niko1221 e364620c56 Engine: two tester switches for the auto CPU/PCIe miss share: STRATA_PCIE_SHARE_MAX (ceiling, default 0.60) and STRATA_PCIE_K_RULE=1 (pool factor k falls from 1.85 at 30 GB/s of expert bytes to 0.8 at 12). Defaults unchanged. 2026-11-03 04:46:13 +01:00
Niko1221 7bf446b528 rc1 merge spill (2e7db84bc) 2026-11-02 15:19:15 +01:00
Niko1221 2e7db84bc0 Spill gated to discrete GPUs; KV window floor 4096 walked by fit_start; output head to pinned host memory as the last step
The draft-layer drop, the 16-slot prompt-path loan, the own-buffer fallback and the head-to-host move run only on a discrete GPU (strata::spill_allowed:
not Metal, not an integrated GPU such as Strix Halo), with a CHECK for the gate in arch_defaults_test. qsa_kv_resident_min is 4096 (20480 on a Metal build;
STRATA_KV_RESIDENT_MIN overrides): windows of 4096 and 8192 gave the same tokens as 20480 with the cache fixed. fit_start walks the window 20480 / 8192 / 4096 only as
far as the card needs. When every step leaves the cache no slot, the output head (Q6_K, 0.41 GiB) moves to mapped pinned host memory (about 3x slower decode).
Measured on the 8 GB mimic at 128K: DFlash2 alone 391 MiB free, 63-70 tok/s, 32K prompt 19.8 s; MTP asked: layer dropped, 555 MiB free, 61-71 tok/s, 32K prompt 13.4 s;
2 requests 277 MiB free, 46 tok/s per user; 4 requests 171 MiB free, 15 tok/s per user. 12 GB cells unchanged.
2026-11-02 15:17:02 +01:00
Niko1221 f31abf7bd2 Version 0.2.10 / engine 0.1.56 follow-through: test_tui2_023_versions and AGENTS.md follow the bump; the '0.2.9.1' tags that meant this release now read 0.2.10; the test comment names 0.2.9.1 as the unpublished DeepSeek hotfix label 2026-11-02 14:54:37 +01:00
Niko1221 ecf7424b53 8 GB NVIDIA starts at 128K: the prompt-path loan may leave 16 cache slots, the draft layer is dropped when it cannot fit
A card whose expert cache stays below the 128 slots a prompt-path loan keeps behind used to be squeezed (reserve lowered to 100 MiB free, then the first long
prompt aborted in an mmq allocation) or gave the prompt path 600 MiB of its own buffers and stopped. The loan now leaves 16 slots, the auto lend cap is lifted
for such a card, and every 128-slot floor in the lend, request-time lend and VRAM-shrink paths follows it (g_lend_keep). When the draft layer, the head and a
working cache with room left do not fit in the free VRAM before the layer loads, the start runs without the layer and says so (STRATA_MTP_KEEP=1 keeps it).
An out-of-memory in the layer or head load with --batch names --batch and --max-context. Measured on an 8 GB mimic at 128K with --kv-resident 20480: DFlash2
alone 391 MiB free, 69-73 tok/s, a 32K-token prompt in 19.8 s; MTP asked: layer dropped, 557 MiB free, 62-70 tok/s, 32K prompt in 13.4 s. 12 GB unchanged.
2026-11-02 14:13:19 +01:00
Niko1221 892cdbad7f rc1 merge df2-strix-pf (b1d9ebb4c) 2026-11-02 13:27:17 +01:00
Niko1221 fd818c7bd2 fit_start: CUDA Flash-Next request-slot figures (8 GB mimic), fewer requests before one at a time, plain hint on a slot-session OOM
BASE_SLOTTED_MIB gains (cuda, flash-next) 4990 from the 12 GB and 8 GB CUDA cells; a CUDA start with request slots needs a working cache (263 slots) not the one-slot refusal limit; the one-request fallback keeps the largest context a single request runs (16K on 8 GB); plan() tries fewer requests (down to 2) before one at a time; the draft-layer and head loads name --batch/--max-context when they run out of memory.
2026-11-02 12:45:08 +01:00
Niko1221 f4561cbe02 Merge f-0291-df2-comm (Q4_0 selector codebooks in the select kernel and the packer, STRATA_DF2_HEAD=native) into rc1; the engine says 'selector codebooks: Q4_0 rows' when it loads such a pack 2026-11-02 11:38:53 +01:00
Niko1221 b1d9ebb4c2 gfx1151 Windows: keep the 16,384-token prompt chunk; do not step it down by the unified pool's "free" figure (STRATA_PF_OWN_CHECK=1 restores the check)
On a Strix Halo the prompt path keeps its own buffers at the 16,384-token chunk (prefill_own_keep_chunk) and the cache sizing already reserved them. The
step-down before the prompt path init read cudaMemGetInfo after the pinned RAM complement (which the unified pool counts twice): 860 MiB "free" in the MTP
engine (no chunk fits, the chunk stays, prompts read at 955 tok/s) but 1.7 GiB in the DFlash2-alone engine (no MTP layer, a slightly larger cache), where
1,536 fit: chunk cut to 1,536, prompts at 303 tok/s (UD-Q4_K_XL, 30K prompt 98.9 s against 31.4 s; 8K 28.3 s against 10.8 s). A real allocation failure still
steps the chunk down (the init loop). Only reached when prefill_own_keep_chunk is set: Windows HIP gfx1151 with a bare --prefill auto.
2026-11-02 11:16:47 +01:00
Niko1221 d0bc95ec5e DFlash2 alone on Metal starts again without <mtp>/draft_vocab.bin: the packaged default subset (data/draft_vocab.bin) is used, as before the merge; CUDA, HIP and SYCL keep the error; a file named with --mtp-draft-vocab that is missing is still an error (draft_vocab_test) 2026-11-02 11:06:29 +01:00
Niko1221 168325418a Metal builds again on the merged DFlash2 line: dflash2.inc follows the drafter header of the ring/mgpu branches (cur_.hist for hist_, bind with head_device, reset/init_ring_log/copy_log_state_from/ring byte counts, plain answers for the batch-slot clone/split calls), and Metal never asks for DFlash2 batch slots 2026-11-02 10:19:23 +01:00
Niko1221 df642fbf77 rc1 merge pf-small-df2-split (dcad09339): generate.cpp conflicted at the DFlash2 serve on_taps line; kept the layer-split install and added the branch's df2_tap_dump (env-gated diagnostic) to the single-card lambda 2026-11-02 09:58:43 +01:00
Niko1221 ee21447ead rc1 merge df2-mgpu 3e7b8343b + HIP GEMM table (b353ce7d4): generate.cpp conflicted in 2 hunks, both sides kept 2026-11-02 09:58:02 +01:00
Niko1221 3dfb046bf1 rc1 merge df2-metal (a9df88afc): window_rule.hpp and its test (add/add) and generate.cpp (8 hunks) conflicted; mainline draft_fallback/draft_on/lookup_default kept, Metal's defer_df2 call taken 2026-11-02 09:57:22 +01:00
Niko1221 f7e24459b7 rc1 merge df2-ring (09ec63b88) 2026-11-02 09:54:45 +01:00
Niko1221 a2f602398f rc1 merge gui-fb2 (35d4781f1): two files conflicted (apps/host/server/native-control.mjs, apps/host/src/components/NativeModels.tsx), resolved at token level; images/visionPrepared take both the DeepSeek tower check and picturesMissing 2026-11-02 09:52:17 +01:00
Niko1221 4fb068a8c1 rc1 merge ds-coder (d6a5a7837) 2026-11-02 09:51:07 +01:00
Niko1221 0116b0049a rc1 merge slot-penalty (62e861c99) 2026-11-02 09:51:03 +01:00
Niko1221 3e7b8343b2 DFlash2 batch slot drafts: on by default only on a layer split (the measured case), one card stays opt-in 2026-11-02 09:50:35 +01:00
Niko1221 8ec2c8a918 DFlash2: Q4_0 selector codebooks (--q4_0-selector, dtype q4_0 rows in block order, dequantized in the select kernel) and STRATA_DF2_HEAD=native (the draft head runs on the target's own head, no pruned copy) 2026-11-02 08:59:20 +01:00
Niko1221 62e861c995 A request that continues an earlier leg (prompt + what it generated: solo -> batch slot, slot -> solo) names where its reply began (pen_from), so the penalty window keeps the earlier reply tokens 2026-11-02 08:10:06 +01:00
Niko1221 4adc047dc8 Arena under a hard memory limit also needs its headroom: a limit just above the arena no longer kills the engine
On l620 a 49 GiB cgroup limit and the 46.84 GiB arena: the engine's check (arena + blob <= limit) passed, the arena is pinned and never given back, the
engine's own memory (about 3 GiB) came on top, and the cgroup OOM killer ended the engine at the start (journal: "A process of this unit has been
killed by the OOM killer", twice). With the fallback allowed the arena now needs arena + blob + max(RAM to keep, the fallback headroom) under the
hard limit (cgroup, container, job object, --memory-limit-mib), else the RAM copy runs. Without a fallback (hand-set --ple-io ram, shared arena file,
STRATA_ARENA_RAM_FALLBACK=0) the comparison is unchanged. arena_hard_limit_need in ple_residency.hpp, unit cases for a limit just above the arena.
2026-11-02 08:02:49 +01:00
Niko1221 2678c9732e --parallel slots honour the request's repeat / frequency / presence penalties and logit bias (CUDA, HIP): each penalised slot's reply tail is staged before its window (set_slot_history), the verifier builds the per-row history (slot_penalty_rows: the tail plus the slot's tokens in the window up to the row) and draws the row with sample_tokens; the slot's own logit bias array (set_slot_logit_bias); a logit_bias request is no longer refused with --batch; plain greedy slots keep the window's argmax. CPU test slot_history_test 2026-11-02 07:12:53 +01:00
Niko1221 d292672844 DFlash2 batch slot drafts on by default (STRATA_BATCH_DF2=0 opts out) where the slots run in one serial group 2026-11-02 06:55:08 +01:00
Niko1221 c683fbf0ef DFlash2: prompt taps in the layer-major prefill (single stage, one prompt); STRATA_DF2_TAP_DUMP research dump
lm_prepare no longer declines for the DFlash2 taps on one stage. lm_run takes a layer's completed output when the next layer starts (the hyper-connection write of its FFN half), puts each sub-chunk's rows at positions >= tap_first_ in the staging, and hands the super-chunk's rows to on_taps in position order when all its layers are done. A layer split and a multi-prompt read still decline. Untested on a GPU at this commit: the equivalence test and the A/B are running.
2026-11-02 06:54:11 +01:00
Niko1221 b537586e6b One RAM-to-keep-free setting: --ram-keep-gib W covers the arena and the RAM-copy fallback; the app passes it for "Leave 20% for my work"
Engine: --ram-keep-gib W (default 0; STRATA_RAM_KEEP_GIB the same). The expert arena is used only if W GiB stay available after it;
otherwise the RAM copy of the hottest experts leaves max(W, the safety headroom) free, and STRATA_RESIDENT_HEADROOM_GIB still wins when set.
The safety headroom is 8 GiB on Windows (the page trim of the copy needs the room) and 4 GiB elsewhere; with W = 0 nothing else changes.
The decision lives in ple_residency.hpp (ram_keep_plan and its parts) and is covered by ple_residency_test over free RAM x W x arena size.
The explicit modes (--resident-budget-gib, --resident-experts) leave max(W, their headroom).

Host: profile 'work' passes --ram-keep-gib W, W = clamp(ceil(0.2 x RAM GB), 5, 8), instead of the 80% budget and the 20% env headroom; the engine
decides from the RAM free at its start. A flag or env of the person wins; full performance passes nothing and takes the earlier version's settings out.
resource-ram.test.mjs covers 24, 32, 64 and 128 GB with the preference on and off. Docs in DETAILS.md.
2026-11-02 06:44:09 +01:00
Niko1221 fd59c9c39b Small-card prompt path: with one CUDA card, a native pack and a default prompt chunk below 8,192 tokens, prompts read with the unfused experts and, from two chunks, the layer-major walk
The default path on a small expert cache streams every expert again for every 512-5,888-token chunk. On an RTX PRO 5000 held to 1.3K / 1.6K / 1.9K engine slots the unfused experts plus layer-major read a 20K / 32K prompt -44% / -50%, -41% / -42%, -14% / -12% sooner (a real 12 GB 5070: -26% at 20K); from a default chunk of 8,192 (2.3K slots) the default path wins and the change costs +1..+25%, so the rule keys on that chunk (strata::small_card_prompt_path, unit-tested at its boundaries). Output changes at rounding level (first-token KL against the FP16 prompt path 0.012-0.018 for every path including the default, top-1 47 of 48), owner's yes 2026-11-02. STRATA_PF_FUSED / STRATA_PREFILL_LAYER_MAJOR set by hand win, STRATA_PF_SMALL=0 turns the rule off; a layer split, HIP, a non-native pack and STRATA_DEFAULTS=026 keep the default.
2026-11-02 06:40:26 +01:00
Niko1221 fc453c3d82 generate.cpp: batch DFlash2 confidence cut: real \0 in the env tests 2026-11-02 06:29:57 +01:00
Niko1221 73a470dafc DFlash2 batch slots: per-slot draft rows cut where the selector's probability product falls below STRATA_BATCH_DF2_CONF (default --draft-conf or 0.35), STRATA_BATCH_DF2_MAXX caps rows 2026-11-02 06:27:03 +01:00
Niko1221 90cb0c0f5a DFlash2 serve: the end-of-request context update reads the gathered taps (a layer split's drafter is on another card than stage 0's tap buffer) 2026-11-02 06:03:41 +01:00
Niko1221 09ec63b884 DFlash2: STRATA_DF2_END_UPDATE=0 turns the end-of-request context update off (diagnostics) 2026-11-02 06:03:00 +01:00
Niko1221 d0dcf65435 generate.cpp: fix two broken string literals in the batch DFlash2 path 2026-11-02 05:42:10 +01:00
Niko1221 29d55bd718 DFlash2 batch slots: deferred context when a round has no spare window row (taps parked on the host, replayed on catch-up), draft graphs of all slots launched then finished together, ring log merged 2026-11-02 05:40:37 +01:00
Niko1221 2f608aac30 Merge f-0291-df2-ring (DFlash2 ring log) into f-0291-df2-mgpu; copy_state_from carries the lineage log 2026-11-02 05:32:32 +01:00
Niko1221 72cf167e3b DFlash2 ring log: update the last window's rows when a request ends, quiet small gaps, copy_log_state_from, stats env
A request that ends on EOS or max_new skips the draft that would have made the last accepted window's context rows, so every turn left a hole of a + 1
positions (5 a turn, accumulating) that a later turn resuming after it found blank and the log could not rebuild. The serve loop now updates those rows
(one synchronous context update, ~0.4 ms) before it finishes the request: a four-turn agent loop plus a parked return now rebuilds with 0 rows missing.
The cold line prints only when 64 or more rows of the window are missing. copy_log_state_from(src) moves a lineage's log, tag shadow and epoch with a request
between two drafters (solo <-> a --parallel slot). STRATA_DF2_RING_STATS=1 prints the live log, the stash and each rebuild per request.
2026-11-02 04:18:30 +01:00
Niko1221 96f5227763 DFlash2 ring log: rebuild the draft ring's window from logged context rows after a restore, a rewind or a repeated prefix
The draft ring has 2,064 slots (position mod 2064). A request that resumes below the highest position written (a repeated or rewound prefix, a
parked conversation brought back) found the part of its first draft's window [n - 2047, resume) overwritten by later positions or never written,
and the drafter drafted poorly until it refilled: on an RTX PRO 6000 with the prompt cache on, DFlash2 alone was +14% over MTP on cold and live
turns but +3% on restored prompts and -2% on an exact repeat (acceptance 0.63 and 0.59 against 0.79 and 0.70 with the cache off). The repeat case
printed no warning at all, because the token history was equal.

The K/V of the five layers is a function of one row per position, the quantized hidden_norm output (2560 int8 codes and 80 block scales, 2.9 KB;
the K/V is 40 KB and the taps 51 KB). Every context update now copies that row into a chunked, copy-on-write host log of the lineage (a
pinned staging copy inside the captured graph, moved to the log after the stream sync). begin_request rebuilds, with the same kernels on the
same bytes, every slot of the window below `resume` whose tag does not match (a host shadow of the tags says which): the rebuilt K/V is bitwise
the original update's (dflash2_ring_test: rewind, parked, branch, evicted; 578 rows in 4.0 ms, a whole window of 2042 rows in 12.7 ms).
A lineage replaced by another is moved, not copied, into a stash (STRATA_DF2_LOG_MIB, default 256, oldest evicted); a request whose prefix matches a
stashed lineage swaps it back in; a rewind or branch keeps the old branch as a copy-on-write stash entry. STRATA_DF2_RING_LOG=0 restores the old
behaviour. Rows never logged are reported (cold) instead of silently blank.
2026-11-02 03:55:35 +01:00
Niko1221 6de7c8e315 DFlash2: the MTP chain's cost window and q lists apply only to candidates the MTP drew
With DFlash2 as the drafter the MTP stays loaded as the fallback (use_mtp stays true), and three decisions tested use_mtp where they meant
"the MTP chain drew this round's candidates":
- STRATA_SPEC_COST=1 (a GB10 default): T = clamp(chain_rows, 1, S_mtp), but chain_rows is only written by the MTP chain callback, so with DFlash2
  and no --draft-conf the window stayed at one row (CLI and serve; code_py 175 vs 258 tok/s on an RTX PRO 6000, serve 166-230 vs 283-397).
- STRATA_SPEC_PROB=1, sampled requests: ver.set_spec_q(mtp.spec_q()) judged DFlash2's deterministic candidates against the MTP's stale q lists
  (CLI: 107 of 137 windows), and serve's gated path was not declined for DFlash2.
- the lookup choice read mtp.prob() for the same reason.
spec/window_rule.hpp holds the window rule and the q rule, both loops call it. The default path is unchanged: window_rule_test compares the new
rule with a copy of the old code over 9216 inputs (only the DFlash2 + cost rule + no --draft-conf cases differ). The CLI stats also print the
window histogram for any rule that sets the width and, when STRATA_SPEC_PROB judged windows, their count and source.
2026-11-02 03:36:50 +01:00
Niko1221 07fb0e7113 Arena RAM fallback: budget form with an 8 GiB headroom, and the Windows copy trims the mapped pages
The fallback's RAM copy (previous commit) now uses the --resident-budget-gib form: the budget is what is available minus the headroom
(default 8 GiB, STRATA_RESIDENT_HEADROOM_GIB changes it), so the experts outside the copy are read unbuffered instead of through the mapped
view whose pages grow the working set until available RAM is near zero.  On Windows the complement copy releases the mapped pages to the
standby list every 4 layers (the VirtualUnlock call that already ran once after the copy): available RAM fell to 0.9 GiB for ~10 s during the copy
on a 64 GB PC with 44.6 GiB available.  No data changes.
Measured on the RTX 5070 PC (128K, 44.6 GiB available): lowest available RAM 4.05 GiB, 2,000-token answer 25.2 tok/s (9.4-10.1 without the fix).
2026-11-02 02:15:46 +01:00
Niko1221 13edeb7f89 One drafter per run: DFlash2 is the primary drafter where the engine has it (CUDA, HIP, Metal), alone and with --draft-fallback none; the MTP is chosen alone with no DFlash2 option
Auto and the default pick DFlash2 with the Q4_0 pack for Qwen3.8-Flash-Next and Gyro; Intel SYCL stays MTP (one line, DFLASH2_BACKENDS). The GUI dropdown, TUI, strata launch, setup (--drafter), serve/server.py, the host's Load and the drafting command agree. A new install fetches only the selected drafter, a switch fetches the other once (never at start), the draft vocabulary comes with the DFlash2 pack. A layer split or several requests load only the MTP and say so in one line; no drafter on disk says so too. Fit, plan and slot estimates use the chosen drafter (0.89 GB DFlash2, 1.08 GB MTP).
2026-11-02 01:31:26 +01:00
Niko1221 43543e9b07 Arena RAM fallback keeps a RAM copy of the hottest experts (--resident-experts form)
When the expert arena does not fit the available RAM (#4846), the run read every expert through the plain file source with no RAM copy:
9-10 tok/s on the owner's 5070 PC (44.6 GiB available for a 46.84 GiB arena). The same engine with a RAM copy of the hottest experts
(--resident-budget-gib 40 / --resident-experts) gave 24-31 tok/s at the same RAM. The fallback now sets the --resident-experts flags
(resident_cpu_experts, resident_pin, resident_soft, 4 GiB headroom) when a static expert profile is set; if the file cannot be opened the
flags are cleared with the rest of the fallback. STRATA_ARENA_FALLBACK_RESIDENT=0 keeps the plain file source.
Not built, not run: the patch is untested.
2026-11-02 01:28:07 +01:00
Niko1221 c2b9218c76 DFlash2: the lookup first when the suffix match is long (spec/window_rule.hpp skip_draft_for_lookup, STRATA_DF2_LOOKUP_SKIP=N, default 8 on Metal, 0 elsewhere): the round's DFlash2 draft is deferred to the start of the next round; the policy takes the lookup (the committed rows only update the drafter's ring, no draft round) or the draft is made then from the same taps. CLI and serve loops. Based on 34c0ab47b 2026-11-02 01:13:55 +01:00
Niko1221 2f13eb5224 Merge branch 'f-0291-df2-mem' into f-0291-df2-primary 2026-11-02 01:09:39 +01:00
Niko1221 cd9c7e7b57 Merge branch 'f-0291-df2-mem' into f-0291-df2-mgpu 2026-11-02 01:09:03 +01:00
Niko1221 96f0307aa0 --draft dflash2 without the MTP layer: refuse a missing draft vocabulary file instead of running the drafter's head over the whole vocabulary 2026-11-02 01:06:15 +01:00
Niko1221 f70368b996 DFlash2 on a layer split and in batch slots: stage-wise taps gathered onto the drafter's card (cross-device events), per-stage prompt taps, per-slot drafters sharing the pack and head, spare-row slot windows, solo<->slot ring handoff 2026-11-02 00:59:54 +01:00