Commit Graph
1695 Commits
Author SHA1 Message Date
Niko1221 5be47cbd69 Release manifest 0.2.25: the capability table follows (no Windows SYCL rows in the asset list yet)
tools/capability_table.py reads the package names of release.json and has no Windows Intel column, so the two Windows SYCL rows (Qwen engine and Inkling) that the previous
commit listed made the docs step fail ("a package lands in column None"). They come back with the capability data when the Windows SYCL packages ship. docs/CAPABILITIES.md
is rebuilt by --write for release v0.2.25 (0.2.25 / 0.1.73); capability_table.py --check and release_manifest.py --check pass. Docs and release.json only.
2026-12-03 10:18:11 +01:00
Niko1221 d4ec197cd3 Release manifest 0.2.25: docs/data/release.json, the pages and the installer names say 0.2.25 (engine and Control 0.1.73)
docs/data/release.json now names tag v0.2.25 (published 2026-12-03), app and Terminal 0.2.25, Control and engines 0.1.73, the 0.2.25 installer names and the 0.1.73
Control, Qwen engine and Inkling package names (plus the new Windows SYCL rows of both engines). tools/release_manifest.py --write put the versions into the
current pages (README, docs/, AGENTS.md and the three markdown pages of tools/packaging that the check covers: README.md, ENGINE-COMPONENT.md, UPDATES.md);
--check passes. Nothing in engine/, terminal/, app/ or any packaging script changes, so the engine/ subtree is identical to the previous commit.
2026-12-03 10:15:52 +01:00
Niko1221 20f1700ac7 Ling-3.2-Air expert skip "Medium": an optional Terminal setting, off by default (--expert-skip off|medium -> the engine's --skip-tau 0.05)
Owner decision 2026-12-03 09:05; the engine side is in f-ling32-int c966eccc17 (STRATA_L32_SKIP_TAU / --skip-tau: at decode and speculative-verify rows, a token's routed experts whose
routing-weight share is below T are dropped, the top expert kept, the weights rescaled; NOT exact).  One level only, medium = 0.05 (L32-CUDA, RTX 3090 24 GB, PCIe 4.0, tier B, 131072
context, plain decode: 53.0 / 58.0 tok/s at 0 / 0.05, top-1 agreement 97.5-98 %, mean KL 1.6e-2 at 0.08, about 1 word in 60 differs on code).

ling32_fit.expert_skip_applies(backend, card_gib, tier, platform): the NVIDIA CUDA engine on Linux (EXPERT_SKIP_PLATFORMS; measured on Linux only), a card of the 24 GB class
(CLASS_24_GIB up to CLASS_32_GIB: the 3090 and 4090), a plan that streams experts (tier B or C; tier A gains nothing).  skip_tau_args() gives ["--skip-tau", "0.05"] only for
"medium" where it is offered.  Terminal: LaunchSettings.expert_skip and `strata launch --expert-skip off|medium` (saved with presets, in the launch summary); derive_config writes
the pair into the saved run config's engine args only when asked and offered, "off" removes an earlier pair, unset leaves the install as it is; setup.py --expert-skip does the same
for an install; settings.expert_skip_applies() is the one helper the callers use (the app reads the same representation: the pair in the engine args, no other key).  The notice says
"Faster, slightly less exact (about 1 word in 60 differs)." or that the setting changes nothing here.  Nothing changes unless the person turns it on: the default rows and every
snapshot are unchanged.  Registered: two opt-in launch_settings entries (--expert-skip, setup flag) and STRATA_L32_SKIP_TAU's note; docs/SETTINGS.md regenerated.

Tests: tests/terminal/test_ling32_expert_skip.py (the rule for every class of card, tier, backend and platform; the Terminal's default, medium, off and not-offered rows; the CLI flag and the
summary; the notice; setup writing the same pair), the snapshot suite (no row moves), the register and status test.
2026-12-03 09:21:48 +01:00
Niko1221 fe5c6b02f0 ling32 sycl: KDA chunk scan default back to the validated scan (STRATA_L32_KDA_SEQ=0); the split scan (4 / 8) is opt-in until its long-prompt deviation is fixed
On the B70, a 4096-token prompt (first tokens of long_16k) teacher-forced against the long_16k_fp64 golden: the split scan gives top-1 99.878 %, mean KL 2.7e-4, 127 positions above KL 1e-3 starting at position 2717; the old scan with the same MLA gives top-1 100 %, mean KL 2.2e-7, none above 1e-3. The register note of STRATA_L32_KDA_SEQ is updated (opt-in).
2026-12-03 05:28:57 +01:00
Niko1221 ddae5fef68 Merge f-ling32-sycl-ren (e8b28c7588): SYCL MLA expanded prefill + KDA value-column scan, STRATA_L32_* switch names, register entries 2026-12-03 04:32:51 +01:00
Niko1221 c8da9d7b1e Merge f-ling32-int (3cfc7f147f) into int-0225
L32-HIP 523e9b4c11 (no adaptive-K calibration on HIP without a tier store; Strix gate passed) and L32-PREFILL's packed S8 trunk GEMM 2754fa02c8 (gfx12, default on, bit-identical, STRATA_L32_W2_PACK=0 turns it off). Conflicts: docs/SETTINGS.md and terminal/data/settings-register.json (generated): three-way merge of names and hand-kept fields, regenerated (check clean, no empty status), docs regenerated with --docs.
2026-12-03 04:04:48 +01:00
Niko1221 e8b28c7588 ling32 sycl: STRATA_L32_* names for the SYCL KDA scan and MLA switches, settings register entries and docs
Pure renames, no behaviour change: LING32_SY_KDA_SEQ -> STRATA_L32_KDA_SEQ (0 old scan, 4 / 8 split scan, default 8), LING32_SY_MLA_EXP -> STRATA_L32_MLA_EXP_MODE, LING32_SY_MLA_ORIG -> STRATA_L32_MLA_FD_ORIG, LING32_SY_MLA_FD_NS / _PVU / _RB -> STRATA_L32_MLA_FD_NS / _PVU / _RB, LING32_SY_MLA_EXP_ABS (test) -> STRATA_L32_MLA_EXP_ABS. Register entries (rollback for the switches, research for the tuning knobs; STRATA_SY_PROF_TOP of the profiling hook too), docs/SETTINGS.md regenerated, tools/settings_register.py --check clean and test_settings_register OK on this commit (based on the scratch merge 8c8ed5cd0b of int f9f533c65f + MLA efff44d494 + KDA c7f2967a16).
2026-12-03 04:03:04 +01:00
Niko1221 2754fa02c8 ling32 AMD gfx12: packed S8 trunk GEMM (bit-identical), default on for gfx12
The trunk GEMMs (every S8 matrix: KDA / MLA / dense / shared expert / lm_head) read their weights as one 8-byte dword group per lane from a different weight row (about six small loads per k16 step); in the exact-path ablation the weight loads were 37 % of the trunk kernel time
(no weight loads 812 ms vs 1,285 ms at 4K).  Each GEMM call now first rewrites its S8_K matrix (a 262-byte superblock per row: fp16 D, 4 group-scale bytes, 256 q) into a scratch laid out for the A fragments: one 16-byte load per lane (512 contiguous bytes per wave) delivers two k16 steps,
and the 32 group scales of a 32-row wave tile come precomputed as floats (Dh * u / 255, the same expression as the unpacked kernel).  Same bytes, same fragments, same MMA order, same group epilogue: the logits are bit-identical.

- gemm_sk_w2p_kernel + w2_pack_q_kernel + w2_pack_eff_kernel in ling32_wmma2.inc (HIP only), 128 MB repack scratch per stream (taken in w2_reserve with the other scratch, before the KV cache; a matrix larger than it goes through in row blocks; no room = the unpacked kernel).
- Used for S8, tc-mode 2, 64-token tiles, N >= 128 (prefill chunks).  Decode, experts, other codes and the MTP sidecar are untouched.
- Default on for gfx12 only (engine, HIP block); gfx11 / Strix and every non-WMMA AMD target keep the unpacked kernel (the packed kernel is written for the 8-half fragments).  STRATA_L32_W2_PACK=0 or the config part pack0 turns it off (pack1 on).  Registered (rollback), docs/SETTINGS.md regenerated.
- SYCL: g_w2_pack link definition next to g_w2_nt / g_w2_etn (shared ling32_main.cpp references it).  Metal has its own main.

Measured on the R9700 (gfx1201, p620, tier B, SQ-96, fast-jobs, 4K and 16K prompts, pack0 / pack1 interleaved in one process, last-logit md5 equal in all four runs):
  4K : 1,162.8 / 1,180.8 tok/s (pack0)  vs 1,318.3 / 1,315.9 (pack1): +12.4 %, md5 38659685acd2
  16K: 1,162.2 / 1,145.0 tok/s (pack0)  vs 1,373.4 / 1,356.7 (pack1): +18.3 %, md5 b5f1798919c9
Kernel time at 4K (rocprofv3): trunk GEMM 1,281 ms -> 677 ms (647 GEMM + 30 repack), total kernel time 3,211 -> 2,589 ms.
Teacher-forced dumps, pack1 vs pack0: all 17 short-set files and the 4K file have equal md5 (short 6cb0eca7932d..., 4K cdac903e4abd), so the fp64 goldens are exactly those of the unpacked path.
Timeline: with the packed GEMM the 4K prompt is bound by the expert uploads (21,021 copies, 3.09 s, about 25 GB/s on this PCIe 4.0 platform), not by the kernels.
2026-12-03 03:56:56 +01:00
Niko1221 3722e0b61e Merge f-qfn-b70 (1109ad7b3e) into int-0225
ESIMD dense GEMM on by default on Battlemage builds (STRATA_DENSE_GEMM_ESIMD=0 turns it off), gated by QFN-B70: 8 of 8 identical token ids on the B70 (ESIMD on vs off vs the first build). Not taken: d8f2977968 (the Windows packaging script, no engine file; coordinator to say). Only conflict: docs/SETTINGS.md (generated), regenerated with tools/settings_register.py --docs; register merged cleanly, check clean, no empty status.
2026-12-03 03:37:35 +01:00
Niko1221 3bdcefe4d2 Merge f-qfn-b70 (aa7379dac8) into int-0225
QFN on B70: Windows build of engine/sycl (icx, no oneMKL, own XMX dense GEMM), Windows free-RAM fix, Intel --spec 2 default for one Arc B-series card without a draft layer, opt-in --vram-reserve-floor-mib. Not taken: 1109ad7b3e (ESIMD GEMM on by default, not gated). Conflicts: docs/SETTINGS.md and terminal/data/settings-register.json (generated): three-way merge of names and hand-kept fields from both sides, regenerated (check clean, no empty status), docs/SETTINGS.md regenerated with --docs. Open gate for QFN-B70: B70 token-identity of the --spec 2 default against spec off on their 7-prompt set; if it fails they send a one-line commit reverting the default.
2026-12-03 02:14:43 +01:00
Niko1221 1109ad7b3e sycl: the ESIMD dense GEMM on by default on Battlemage builds (STRATA_DENSE_GEMM_ESIMD=0 turns it off); 16 x 32 tile
Standalone bench, Arc Pro B70, bf16 in / fp32 out, 4096 tokens: the ESIMD kernel (2D block loads straight from global memory, the weights
as transposed 32-bit words = the VNNI-packed B operand, no SLM, no barriers) reaches 64-72 TFLOP/s on the GDN / QSA projection and
square shapes (2.4 ms for N=8192 K=2560, 71 TFLOP/s) against 29-31 for the packed-B SLM kernel and 22-25 with large-GRF mode; max
relative error against a double reference below 1e-5 on every shape. The tile is 16 rows x 32 columns per hardware thread (a 32 x 32 tile
is slower: register pressure); the prefetch two K steps ahead is kept. Shapes it does not take (N < 16, T < 32, K % 16 != 0, bases not
64-byte aligned, ldy % 4 != 0) fall back to the packed-B kernel. The register entry for STRATA_DENSE_GEMM_ESIMD moves to rollback.
2026-12-03 02:12:12 +01:00
Niko1221 bea9a1d2cb Merge f-ling32-prod (4bbee7b415) into int-0225
f-ling32-int 7c04fb2161 (Metal 1024-thread kernels, mla_qabs_d, opt-in --skip-tau) and the register statuses of the 15 Ling SYCL env names. Only conflict: docs/SETTINGS.md (generated): regenerated with tools/settings_register.py --docs; the register merged automatically, regenerated, check clean, no empty status.
2026-12-03 01:58:10 +01:00
Niko1221 4bbee7b415 Merge branch 'f-ling32-int' into f-ling32-prod (7c04fb2161: Metal 1024-thread kernels and mla_qabs_d, opt-in --skip-tau); register statuses for the SYCL names 2026-12-03 01:54:42 +01:00
Niko1221 aa7379dac8 settings register: STRATA_DENSE_XMX, STRATA_DENSE_GEMM_PK, STRATA_DENSE_GEMM_PLAIN, STRATA_DENSE_GEMM_ESIMD, and the regenerated docs/SETTINGS.md
The dense prompt GEMM switches of the Windows / B70 work (xmx_dense_gemm.dp.cpp, gemm.dp.cpp) get their register entries (status, owner, note);
the rest of the register diff is the scan's moved line numbers in generate.cpp. tools/settings_register.py --check passes and
tools/test_settings_register.py passes (8).
2026-12-03 01:53:06 +01:00
Niko1221 f905383286 Settings register: the HIP elastic pool settings (STRATA_INK_ELASTIC_HOST_GIB / _MULTI / _STAGE / _TEST_EVICT_MIB, STRATA_INK_GUARD_DEBUG, STRATA_INK_KV_FLOOR_MIB) and the COMPACT ones that were missing (STRATA_INK_ELASTIC_COMPACT, _COMPACT_MAX_CTX, _DRAFT_HOST_PCT, _MACRO_HOST); register regenerated, docs/SETTINGS.md regenerated
tools/settings_register.py --check passes, tools/test_settings_register.py 14 passed. The regeneration also refreshes the read line numbers of the existing entries.
2026-12-03 01:52:55 +01:00
Niko1221 e3b494577a Merge int-0225 (577f851f00) into f-ink-b70
Only the settings register and docs/SETTINGS.md conflicted: took int-0225's, regenerated both, and set the status and note of the 33 B70 settings again.
2026-12-03 01:34:25 +01:00
Niko1221 577f851f00 Merge f-ling32-prod (7c95c85fce) into int-0225
Ling on Intel ships (SYCL_ENGINE_SHIPPED = True), with L32-SYCL's f-ling32-sycl efddd28358 and L32-CUDA's f-ling32-int ed115c6300 / 78a15b86bd (via f-ling32-prod); GUI-LING's map-experts fix b9e7b3e2b1 arrives as the same change (2f6b1cc5b8), merged cleanly. Conflicts: terminal/data/settings-register.json and docs/SETTINGS.md: three-way merge of names and hand-kept fields from both sides, regenerated with tools/settings_register.py (check clean, no empty status), docs/SETTINGS.md regenerated with --docs.
2026-12-03 01:33:39 +01:00
Niko1221 7c95c85fce settings register: STRATA_L32_PROBE_ALLOC (rollback) and STRATA_L32_GPU_CAP_GIB (opt-in) from the Windows iGPU fix 2026-12-03 01:29:23 +01:00
Niko1221 9dbca34d13 Merge f-ling32-prod (06c7732447) into int-0225 2026-12-03 00:35:12 +01:00
Niko1221 9b4def1cf7 ling32: the Mac encodes pictures on the GPU (f-ling32-int 79a36f3f18): metal leaves CPU_ENCODER_BACKENDS, no pixel cap on the Mac; words, register entry and tests follow 2026-12-03 00:24:48 +01:00
Niko1221 37071f3596 Merge f-ling32-prod (b2cd949401) into int-0225
f-ling32-prod b2cd949401 carries eight Python files saved with CRLF on every line (terminal/setup.py, strata_control/ling32_fit.py, serve/test_ling32_mtp.py, tests/terminal/test_ling32_fit.py, test_ling32_launch.py, tools/test_setup_ling32.py, tools/packaging/collect_libs.py, tools/packaging/ling32/build_windows.py; base and int-0225 are LF), which makes terminal/setup.py one whole-file conflict. Resolved by converting their side to LF before the three-way merge (terminal/setup.py merged without conflict: +57 lines) and converting the other seven files to LF; the Intel oneAPI licence texts and the Metal files keep their upstream CRLF. Second conflict: terminal/data/settings-register.json, three-way merge of names and hand-kept fields, regenerated (check clean, no empty status), docs/SETTINGS.md regenerated.
2026-12-02 23:41:55 +01:00
Niko1221 d55ab8c850 ling32 packaging: the Intel oneAPI licence texts are checked in and required; the CPU picture encoder is capped at 1 MP
- tools/packaging/notices/intel-oneapi/{windows-2026.2,linux-2026.1}: the toolkit, compiler runtime, OpenMP, Unified Memory Framework and TCM/hwloc licence and third-party texts, unmodified, with SOURCES.txt (where from, versions, SHA-256)
- lib_notices.ensure copies the platform's set whenever a oneAPI runtime library is bundled, missing() and verify_pkg.py fail a SYCL package that lacks one (no more "when the build machine had them"); collect_libs.py uses the same set
- build_windows.py sycl: release UR adapter DLLs only (no debug builds), the TCM folder is searched for libhwloc-15.dll
- the CPU picture encoder (Metal, SYCL, --vision-device cpu, a card under 24 GiB): --vision-max-pixels 1000000 written by setup and added by serve; CUDA/HIP GPU encoders stay uncapped; register entry, docs, tests
2026-12-02 23:11:39 +01:00
Niko1221 86e1ad5d51 Merge f-ink-evmm (4b6c028fb9) into int-0225
Only conflict: terminal/data/settings-register.json. Three-way merge of names and hand-kept fields from both sides (the 8 new STRATA_INK_* names keep their hand fields from INK-EVMM's commit), regenerated with tools/settings_register.py (check clean, no empty status), docs/SETTINGS.md regenerated with --docs.
2026-12-02 22:59:44 +01:00
Niko1221 4b6c028fb9 Inkling elastic experts: settings register entries and the docs paragraph
The eight new STRATA_INK_* names (ELASTIC_EXPERTS, ELASTIC_MIN_EXP_MIB, ELASTIC_HEAT, VRAM_GUARD, VRAM_LOW_MIB, VRAM_HIGH_MIB, TC_ATTN_KV8, TC_ATTN_MIN_CTX) are in
terminal/data/settings-register.json with their status, and docs/SETTINGS.md is regenerated. docs/INKLING_KV.md describes the elastic expert pool, the guard and
the measured numbers (KL included).
2026-12-02 22:59:00 +01:00
Niko1221 4306a5478a Merge f-ling32-prod (1dda52efb9) into int-0225
Only conflict: terminal/data/settings-register.json. Three-way merge of names and hand-kept fields from both sides, regenerated with tools/settings_register.py (check clean, no empty status), docs/SETTINGS.md regenerated with --docs.
2026-12-02 22:19:05 +01:00
Niko1221 936f21c433 Merge commit '3b2a88a5bb' into f-ling32-prod 2026-12-02 22:08:12 +01:00
Niko1221 7fc405bcc4 Merge f-ling32-prod (b2360bb3d3) into int-0225 2026-12-02 21:40:08 +01:00
Niko1221 b2360bb3d3 ling32 launcher: --mtp auto (the default; the engine decides at start, --mtp-auto FILE), the status line from measured keys, and the prompt chunk by card size
MTP auto (L32-CUDA fe96b81b73: --mtp-auto FILE --spec mtp --spec-adaptive; `mtp_auto=1` in --info --kv; serve INFO has h2d_gbps and spec=off|mtp):
- ling32_family: MTP_MODES auto/on/off, DEFAULT_MTP_MODE, MTP_AUTO_MIN_LINK_GBPS (32), the run-config keys ling32_mtp_mode ("auto" also when absent, or "on") and ling32_plan_tier.
- serve/ling32_kind: mode on = --mtp FILE; auto = --mtp-auto FILE when the engine says mtp_auto=1; an engine that cannot decide gets the sidecar only in tier A, on a Mac, or when the config
  was written before the word (forced then); stats_view adds h2d_gbps, mtp.mode and mtp.line ("MTP: on (auto: link 46 GB/s)", "MTP: off (auto: 24 GB/s link: no gain)", built from spec and the
  measured link only).
- ling32_fit: mtp_mode(), mtp_status_line(), MTP_AUTO_NOTE; plan(mtp="auto") counts the sidecar in tier A and in one memory pool and not in tier B or C (a tier B plan carries one note).
- setup.py / launcher: --mtp auto|on|off (nothing = auto; a card of 12 GB or less still off by default), the config gets the mode and the plan's tier; settings register and docs; the mock engine
  says mtp_auto=1 / h2d_gbps when asked.
- Tests for the flags (auto, on, an old engine, a hand-written --mtp-auto), the planner, the status line, the launcher and setup.

Prompt chunk (L32-CUDA, RTX 5090 tier B: --chunk 256 made a 4062-token prefill 33 % and a 32K one 115 % slower than the engine's default): chunk_for is 256 under 16 GB, 1024 from 16 to
30 GB (to be measured on a 24 GB card), the engine's own 2048 from 30 to 48 GB, 1024 above (the static layout).
2026-12-02 21:39:47 +01:00
Niko1221 bddbcd00fb ling32 tier store: STRATA_L32_PF_VERIFY defaults to 4 on CUDA (prefetch for MTP verify batches of 2..16 tokens)
The tier store prefetched the next layers' experts for single-token decode steps and for large batches, but not for the 2..16 row verify batches of speculative decoding,
so every expert of a verify step was a demand miss.  Prefetching 4 experts per layer from the union of the rows' predictions (the existing STRATA_L32_PF_VERIFY path, off by
default until now): RTX 5090 (PCIe 5.0 x16, capped 400 W), real Ling, 5 prompts x 256 tokens, MTP: K = 1 116.8 -> 121.4 tok/s, adaptive 116.3 -> 120.9, K = 2 112.3 -> 115.3
(8 and 12 experts give the same as 4); chat 120.9 -> 125.9, code 119.5 -> 123.5, prose 117.5 -> 122.2, json 97.5 -> 101.6, prose_2 135.2 -> 140.2.  Exact: prefetching never changes a
result; greedy ids identical to PF_VERIFY=0 in all four comparisons (5 jobs each).  HIP keeps 0 (not measured).  =0 switches it off.
CTest 19/19 on the 5090 (sm_120).
2026-12-02 21:28:32 +01:00
Niko1221 63e2d26617 Merge f-ling32-prod (ba1e850fd3) into int-0225
Only conflict: terminal/data/settings-register.json. Three-way merge of the names and the hand-kept fields from both sides (the STRATA_L32_SPEC_SPAN note changed on both: took f-ling32-prod's newer text), launch_settings from f-ling32-prod, then regenerated with tools/settings_register.py (check clean, no empty status) and docs/SETTINGS.md regenerated with --docs.
2026-12-02 20:39:18 +01:00
Niko1221 2820f52cba Merge branch 'f-ling32-int' into f-ling32-prod 2026-12-02 19:09:03 +01:00
Niko1221 d472fe7f30 ling32: one release switch (released in data/ling32-sources.json), the Intel switch (SYCL_ENGINE_SHIPPED), the HF repo as the prepared shipped source
Owner decisions 2026-12-02: Ling ships on every platform including Intel, SQ-96 is the only file, 128K is the default context, the release flip is one switch.

- data/ling32-sources.json: the key `released` (false): the shipped sources (the private Hugging Face repo, as http-parts) are prepared but ignored until it is true; ling32_family.released() and
  sources() read it; the model list (strata_mcp.ling32_visible, setup.ling32_offered) also shows Ling when released.  A source set by hand (STRATA_LING32_SOURCE, the config key) works before the release.
- ling32_family.SYCL_ENGINE_SHIPPED (False until L32-SYCL's package is in the feed) and sycl_available(): when True the "no Intel engine yet" warnings of setup and the launcher go; ENGINE_FLAGS /
  MTP_ENGINE_FLAGS have a "sycl" entry (to be confirmed by L32-SYCL).
- settings register and docs: the STRATA_LING32_SHOW and STRATA_LING32_SOURCE texts name the release word and the parts+ form.
- Tests: the release word in every state (false, true, missing, a string, bad JSON), the hand-set source first, the file in the repository is not released; the Intel switch; 128K is the default everywhere.
2026-12-02 19:09:02 +01:00
Niko1221 4bfb0f7754 settings register: STRATA_L32_LAZY_KV, STRATA_L32_KV_FORCE_RELEASE, STRATA_L32_SPEC_SPAN (regenerated, statuses and notes set) 2026-12-02 19:08:26 +01:00
Niko1221 f2935dcf79 Merge int-0225 (951a4af886) into f-ink-b70
Only the settings register and docs/SETTINGS.md conflicted: took int-0225's, regenerated both, and set the status and note of the 33 B70 settings again.
2026-12-02 19:04:20 +01:00
Niko1221 951a4af886 Merge f-0225-ink (580852d82f) into int-0225
Conflicts: terminal/tools/strata_mcp.py (default context in the install plan: kept INK-KV's inkling_fit.default_context for Inkling and the ling32 branch from f-ling32-prod), docs/SETTINGS.md (regenerated from the register with tools/settings_register.py --docs; the register merged without a conflict and its check is clean).
2026-12-02 18:35:46 +01:00
Niko1221 580852d82f Inkling CUDA hybrid: the cold-expert lane probe runs three times and keeps the exact lane unless the CPU lane is clearly faster; STRATA_INK_LANE_PROBE_OLD=1 brings the old rule back
The launch probe times the CPU lane and the card's copy-in (exact) lane and keeps the faster one. The old rule kept the CPU lane unless the copy-in lane was 10 % faster (t_card < 0.9 * t_cpu), from one
probe per lane. On the owner's RTX 5070 12 GB (Windows, SQ-10, drafter off, the published 0.2.24 packages) a quiet PC measured CPU 9.0 to 9.5 ms and copy-in 8.6 to 8.8 ms (ratio 0.95): the old rule kept the CPU
lane and every start decoded 65-68 tok/s and 34.5 on a 4K document where the copy-in lane gives 73 and 56.4 (+11 to +64 %); with a busier PC the same card measured 12.0 against 8.6 and chose the copy-in lane,
so two starts can land on different sides of the threshold (that is the only reading of the 9 to 12 % cuda12 / cuda13 gap of NUMBERS-0224 that the data allows: the packages themselves are equal in every forced lane).

- strata/core/ink_cold_lane.hpp: ink_probe_median and ink_cold_lane_exact (the exact lane unless the CPU lane is clearly (10 %) faster: t_cpu < 0.9 * t_card; ties go to the exact lane); unit test
  ink_cold_lane_test (in CMake, no GPU).
- ink_runner.cuh pick_cold_lane: three probes per lane, alternating, the median of each (about 1 s more at start); "(median of 3)" in the line. STRATA_INK_LANE_PROBE_OLD=1: the old rule (one probe per lane).
  Register entry (rollback) and the SETTINGS.md row; docs/INKLING_KV.md (the earlier commit) says what it does.

Gates (decode tok/s prose / chat / code / doc4k, ABAB, 3 rounds, SQ-10 for the 5070, ctx 8192, drafter off):
- owner RTX 5070 (MSVC + CUDA 13.0, sandboxed jobq): new rule picked the copy-in lane in all 3 starts (CPU 9.0-9.2 against copy 8.7): 65.4 -> 73.x / 67.2 -> 73.5 / 68.5 -> 72.9 / 34.4 -> 56.0 against the old rule
  (old exe, same host): chat +9 %, code +6 %, doc4k +63 %; STRATA_INK_LANE_PROBE_OLD=1 on the new exe reproduces the old numbers (65.4 / 67.0 / 68.5 / 34.4).
- z440 RTX A4000, SQ-15 made hybrid with a VRAM ballast (1,977 experts on the card, 1,095 in RAM): CPU lane 31.9 ms against copy-in 42.7: the CPU lane under both rules, identical decode (34.2 / 36.2 / 34.9 / 31.4
  against 34.2 / 36.3 / 34.8 / 31.2): the rule changes nothing where the CPU lane is clearly faster. (Without the ballast SQ-15 fits the A4000 whole: no cold expert, no probe.)
- HIP and SYCL have no such probe (cuda/ink_runner.cuh only): no R9700 / A750 gate applies.
Tests: ink_cold_lane_test and ink_sm120_table_test pass, settings register check passes, MSVC + CUDA 13.0 sm_120 build OK.
2026-12-02 18:35:17 +01:00
Niko1221 c18992382f Inkling's default context is 128K on every card; it steps down only when the load would truly fail, and a named or saved context is never changed or refused when it loads
Owner decision 2026-12-02: "Put 128K always as a default they can change within the app or tui." A start that names no context gets 131072 on every machine, 8 GB cards included (the K/V goes to host RAM where it
does not fit the card, as on a 12 GB card). No smaller default for any kind of machine.

- inkling_fit.py: DEFAULT_CONTEXT 32768 -> 131072; default_context() (128K; it steps down to the largest bucket of CONTEXTS that loads only when the K/V of one slot has nowhere to go, e.g. an 8 GB card with 6 GB
  of RAM, with one line; when 128K loads but part of the model streams from the SSD, as on a 16 GB Mac, it stays 128K and the line says what is slow and which size fits); context_check() for a context the person
  names or a preset saved: accepted when it fits, accepted with the honest line when it loads slowly, refused with the number that fits only when the engine could not start it at all. HIP and SYCL are never
  refused or stepped down on the plan's number (their K/V lives in VRAM and the plan is an estimate there: an Arc A750 8 GB started SQ-10 at 128K where the plan says "does not fit").
- setup.py (the Inkling flow), launch (catalog.inkling_context, cmd.apply_defaults notices), strata_mcp.py: use it; the setup menu marks the default; the text says 128K.
- engine: BackendOpts::max_ctx 131072 (strata-inkling with no --max-context).
- tests: test_inkling_default_context.py (16 GB Mac SQ-10 keeps 128K with the slow line, 8 GB card with 16 / 32 GB of RAM keeps 128K with the K/V in host RAM, 8 GB card with 6 GB of RAM steps down, a 24 GB card keeps
  128K with no line, a saved SQ-15 preset with 128K on a 12 GB card still loads, named contexts, the launch notices, HIP / SYCL never refused); test_inkling_fit.py: the 32K-era plans (16 / 24 GB, Mac) name ctx=32768.
- docs/INKLING_KV.md: the default context and what 128K costs; the cold-expert lane section (the next commit).

What 128K costs against 32K (same runs, ABAB): Arc A750 8 GB, SQ-10 (SYCL): K/V 4,256 MiB on the card (1,184), 70 of 3,072 experts on the card (1,180), decode 2.13 / 2.12 / 2.12 / 2.15 against 2.24 / 2.23 / 2.24
/ 2.26 tok/s (-5 %), prompt reading 9.9 / 9.6 / 8.3 / 19.2 against 14.4 / 14.5 / 12.4 / 28.4 tok/s (-32 %); it starts (ready 9.1 s against 9.8 s). RTX 5070 12 GB (Windows, SQ-10): K/V 0 on the card and
2,112 MiB of mapped host RAM (528 at 32K), the same experts on the card. The number of slots "fit to your card" is lower at 128K (a 24 GB card: 1 where 32K gave 2). Planner at 128K: nothing refuses on 8 / 12 / 16 /
24 / 32 / 48 GB cards.
Tests: terminal py-tests selection (inkling, launch, setup, mcp, fit, kv, catalog, preset; the hy4 launch tests are the host-dependent ones fixed on f-0225-testfix) 1279 passed on p1006; MSVC build of the engine header OK.
2026-12-02 18:35:17 +01:00
Niko1221 9dfaaccda3 Merge f-ling32-prod (5df7db6133) into f-gui-ling 2026-12-02 18:24:18 +01:00
Niko1221 5fa5661793 Inkling SYCL B70 release review: V2 only with a Battlemage GPU, turbo Battlemage-only, settings register
- Level Zero V2 is chosen by a pre-start check for an Intel Battlemage GPU (PCI device 0xE2xx: sysfs on Linux, DXGI on Windows); other Intel
  GPUs keep V1 as before.
- --turbo / STRATA_INK_B70_TURBO turn the Arc fast set, the Q8_ROW trunk compaction and the tail skip on for Battlemage only; other Arc cards
  keep the 0.2.25 behaviour (no effect, answers exact).
- 33 new STRATA_INK_* settings in terminal/data/settings-register.json (status and note each), docs/SETTINGS.md regenerated.
- --turbo help line and docs/INKLING_TURBO.md say that Battlemage has it.
2026-12-02 18:21:33 +01:00
Niko1221 d491db5d42 Merge f-intel-b70 (37098d39db) into the 0.2.25 Inkling tip: B70 SYCL optimization
Conflicts in engine/src/inkling2/sycl/ink_sycl_backend.cpp: kept the int-0225 --kv auto rule and the
conversation checkpoint code, and carried over the B70 conditions (FP8 K/V auto only from 16K context on
Battlemage) and hint_prompt_len (dflash2 hint + decode graph warm-up).
2026-12-02 18:17:31 +01:00
Niko1221 37098d39db sycl(inkling2): optimize B70 GGUF MoE prefill and decode for IQ3_S and UD-Q4_K_XL 2026-12-02 18:05:04 +01:00
Niko1221 30c4c9de96 Merge f-ink-025 (ef5ceb9e91) into int-0225
Conflict in docs/DETAILS.md (the conversation-cache paragraph, same place as before): kept the new f-ink-025 text (a file only when the conversation leaves memory, the newest file per chat) and the sentence f-ink-025-term adds at its end (Strata starts the CUDA engine with it by default, conversation_cache_gb).
2026-12-02 17:58:12 +01:00
Niko1221 ef5ceb9e91 Inkling: the conversation cache writes a file only when the conversation leaves memory, and keeps one file per chat (0.2.25 item 1, part 4; REPROC's e2e findings)
Design (3 lines): with a RAM park cache (--slot-cache-mib) a park writes no file; a conversation goes to a file when the RAM cache drops it, when it does not fit there, and when the engine stops
(the slots' conversations are parked, then everything in RAM is written, most recently used first, at most one cap's worth); with no RAM park cache it is still written when its slot is overwritten
(the only place it can go). ConvDisk::save removes the earlier turns of the same chat (tokens a strict prefix of the new file's, same pictures) right after the write, and covered() lets the serve loop skip a
conversation that a file (its own or a longer turn of the chat) already serves. Restore, identity checks, the cap and the near-cap handling are unchanged.

Why: REPROC's real app e2e (restart 25 s -> 3.8 s at 43K) found that every park also wrote about 770 MiB in 0.5 s per title or summary request (doubling its cost, many GB per hour of agent chat, SSD wear) and that one
chat left 3 files (2.3 GB). ink_serve.h: disk_write() (serialize + save + log) used by park_make_room (drop), park_current (does not fit; no RAM cache) and the stop pass; ink_conv_disk.h: covered(),
superseded(), the removal; docs/DETAILS.md.
Tests: unit (ink_conv_disk_test): a longer turn removes the shorter file at once and a restart sees one file per chat, covered() (own file, a prefix of a longer turn, not a longer turn, not with another picture);
mock (test_shared_prefix.py, real serve loop, 4 new): with a RAM cache a park writes no file and the stop writes the chat and the helper, a conversation dropped from the RAM cache is written and read back
(reuse 39 of 40), only the newest file of a chat stays (2 files, not 3, and the newest serves the next turn), another chat's file is kept. 4 host tests pass on p1006 (mock suite 51 tests). Not run: the app e2e (REPROC reruns e2e_chain3.sh).
2026-12-02 17:57:54 +01:00
Niko1221 d2c6574897 Merge f-ink-025 (db3106ecb4) into int-0225
Conflict in docs/DETAILS.md (the conversation-cache paragraph): kept the new f-ink-025 text (room made before a write, earlier turns first, shutdown writes at most one cap) and the sentence added by f-ink-025-term at its end (Strata starts the CUDA engine with it by default, conversation_cache_gb).
2026-12-02 17:19:44 +01:00
Niko1221 5c9cbf644a Inkling CUDA: the K/V planner can reserve the drafter's context rings of every slot, STRATA_INK_DF2_RING_PLAN (0.2.25 item 25, host part; default off until the 5090 A/B)
Design (3 lines): the planner (df2_total_mib) reserves the DFlash 2 context rings of the first 8 slots only; the rings of slots 8 and up are taken lazily and only while 1 GiB stays free, so on an
RTX 5090 at 64 slots (1,910 MiB free after start-up, 11-27 bench logs rel0223/bench71: "no GPU memory for slot 25's context ring") slots 25 to 31 of the drafter's 32 had no drafter. With
STRATA_INK_DF2_RING_PLAN=1 the planner counts the rings of every slot the drafter serves (32 on 24 GB and more, 16 below), so the K/V split leaves their room and the 1 GiB rule stays for the rest.
Default OFF: byte-identical reserve and the same refusals as before (up to 8 slots nothing changes either way); the switch flips on the 5090 C64 e2e A/B (1,193 / 1,576 tok/s reference).

ink_df2_budget.h (new, host-only): the ensure_slot room rule (df2_ring_room, now used by InkDFlash2::ensure_slot itself), the drafter's slot count, the planned ring count, a replay of the lazy sequence.
ink_dflash2_path.cuh: df2_total_mib(v, slots, ring_slots = -1) and df2_planned_rings_here; ink_runner.cuh: the two reserve sites pass it. Register entry (opt-in) + docs/SETTINGS.md.
Test ink_df2_budget_test: the rule's edges (slot 1: 170 MiB, slot 8: 1,066 MiB), the 5090 logs reproduced (1,910 MiB free, other lazy buffers 160 MiB: slots 8..24 fit, 25..31 do not; 80 MiB: 27 and up
do not), with the rings in the plan all 24 of slots 8..31 get one also with 800 MiB of other buffers, the ring counts, the switch. Not measured: speed (no 5090 yet); drafting is exact, the tokens do not depend on it.
2026-12-02 17:10:56 +01:00
Niko1221 99a51c046e Inkling: the conversation cache on disk handles files near its cap (0.2.25 item 1, part 3)
Design (3 lines): ConvDisk::save made room AFTER writing the new file, so a folder at its cap held the old files and the new one at once, and the chat's own earlier turns stayed next to the
turn that extends them. Now room is made before the write: the file of the same key is replaced, then files this conversation supersedes (their tokens are a strict prefix of it, same pictures),
then the least recently used. The pass at engine stop writes at most one cap's worth (with many slots the later files would only evict the earlier ones).

Why now: Inkling's default context is moving to 128K and a 128K conversation file is about 2.4 GB against the 8 GB default cap (the owner made the cache default ON in the launcher).
ink_conv_disk.h: make_room(), written_bytes(); ink_serve.h: the shutdown loop stops after one cap; docs/DETAILS.md. Test (host-only, ink_conv_disk_test): two 60 KB files under a 100 KB cap leave
one file and never more than the cap on disk, a file replacing itself near the cap, a file larger than the cap refused with the stored one kept and no .tmp left, turn 1 (used last) goes before turn 2
when turn 3 needs room, a different chat is only evicted by use.
2026-12-02 17:10:55 +01:00
Niko1221 5f8097fb00 settings register: the settings of L32-PREFILL's prefill4 (STRATA_L32_TIER_GROUPED_OFF, STRATA_L32_W2_NT, STRATA_L32_W2_ETN) get their entries and STRATA_L32_TIER_GROUPED is retired; register and SETTINGS.md regenerated
TIER_GROUPED_OFF (rollback): the tiers use the per-pair experts again; W2_NT / W2_ETN (research): AMD WMMA tile widths; TIER_GROUPED is no longer read (the grouped tier path is the default since 0.2.25): status retired, retired_in 0.2.25.
2026-12-02 16:24:59 +01:00
Niko1221 2f05668455 launcher: the Inkling CUDA engine starts with the conversation cache on disk, 8 GB, "conversation_cache_gb" in the run config (owner decision, 0.2.25 item 1)
Design (3 lines): serve/inkling_kind.py conversation_cache_args adds --conversation-cache-dir <state folder>/conversations/<model file name> --conversation-cache-gb N to the Inkling engine's arguments,
only for the CUDA engine (the others cannot export a conversation yet) and only when the program has the option (an older engine refuses an option it does not know, as for --slot-cache-mib); the
folder is Strata's state folder (strata_control/paths.py: %LOCALAPPDATA%\Strata, $XDG_STATE_HOME/strata), one folder per model so two packs do not remove each other's files. On by default
(inkling_family.CONVERSATION_CACHE_DEFAULT_ON, the one constant, cap CONVERSATION_CACHE_GB = 8); the run config key "conversation_cache_gb" (Settings view, also carried by `strata launch`) changes the
cap, 0 turns it off; an option in the person's own arguments wins.

Tests: serve/test_inkling_conversation_cache_args.py (11: folder per model under the state folder, cap, 0 and bad values off, engine without the option, CUDA only, own option wins, no model, missing
program, the default switch, the key is a run config key); the launcher suites on boston (267 passed: this file, test_inkling_slot_cache_args, test_launch, test_launch_hy4_flash, test_launch_hy4_stop;
the four hy4 tests fail on a box without an NVIDIA card, p1006, with or without this commit). settings_register --check green (no new STRATA_* setting). docs/DETAILS.md says where the files are.
2026-12-02 16:06:46 +01:00
Niko1221 29ca7ba5bf settings register: STRATA_L32_MLA_EXPANDED (the expanded-form MLA default of NVIDIA sm_80+ prefill chunks of 1024+ tokens, owner decision 2026-12-02) gets its entry; register and SETTINGS.md regenerated
Status rollback, owner L32: =0 returns to the absorbed form (the 0.2.24 default); --mla-prefill still chooses explicitly.
2026-12-02 15:45:43 +01:00
Niko1221 757cdb6cd4 settings register: STRATA_L32_MTP_GROUPED (L32-SPARK's MTP-layer grouped-expert switch) gets its entry; register and SETTINGS.md regenerated
Status rollback, owner L32: =0 restores the per-pair kernels for the MTP layer's 2 / 3-bit experts in prefill chunks (default on CUDA, never on HIP).
2026-12-02 15:33:39 +01:00