Commit Graph
1345 Commits
Author SHA1 Message Date
Niko1221 dc1c66d213 docs/MAC.md: the first request after a load waits once for the prompt kernels (#5369, part 3)
A user's M2 Ultra waited about 20 seconds for the first word of the first
request after a load (9.2 s of it building the Metal prompt kernels);
later requests started in under a second. One short paragraph, wording
approved by the coordinator, at the top of "Limits (this version)" and
not in the "Measured (M5 Max, 128 GB)" section, because the numbers are a
user's report, not ours.

Check: tools/check_links.py passes.
2026-11-16 17:43:43 +01:00
Niko1221 978b7a8d37 Merge f-0216-ggml2 (88b5ca6d0): own-stack steps 4, 5, 9 and 10: the Intel Arc CPU pool on Strata's quant layer, Strata's own quant format header, the web host's autostart.mjs gone, llama.cpp's MMQ build path and the vendored ggml-cuda removed 2026-11-16 15:15:10 +01:00
Niko1221 88b5ca6d0d [Docs] the MMQ build path is gone: four pages say where the old numbers and builds come from (own-stack step 10)
- docs/AMD_HIP_PERFORMANCE.md: the numbers were measured with llama.cpp's MMQ kernels (Strata 0.2.15 and earlier); to repeat them, build the
  v0.2.15 tag with the old flags.
- docs/ORCA_Q4_K_S.md: Strata 0.2.16 builds no MMQ kernels, so this file's Q5_0 down layers have no GPU prompt kernel yet; build the v0.2.15
  tag to run it.
- docs/QUANTS.md: Q4_K / Q5_K / Q5_1 / Q6_K experts take Strata's fused prompt kernels where they cover a layer and the FP16 path elsewhere;
  the separate K-quant library left in 0.2.16.
- docs/UNSLOTH_Q4.md: the STRATA_MMQ_KQ=1 row is deleted (nothing reads it now).
tools/check_links.py, tools/settings_register.py --check and tools/test_settings_register.py: ok.
2026-11-16 15:05:55 +01:00
Niko1221 3e26b4e157 [Engine] remove llama.cpp's MMQ build path and the vendored ggml-cuda (own-stack step 10)
No release build compiled MMQ any more (x86 since 0.2.14, the DGX Spark since f-spark-nommq), so the path goes:
- CMake: the options STRATA_MMQ, STRATA_PREFILL_MMQ, STRATA_MMQ_TAB, STRATA_MMQ_TQ_OVERLAY, STRATA_ORCA_Q4KS_MMQ and STRATA_MMQ_KQUANTS, the
  macros strata_cuda_mmq / strata_hip_mmq / strata_pf_own_mirror / strata_ggml_mmq_types and the MMQ tests. Every CUDA and HIP build takes
  strata_cuda_pf_own / strata_hip_pf_own (Strata's own prompt kernels, mmq_absent.cpp for the MMQ half of moe_mmq.hpp), as the release builds did.
- Sources: moe_mmq.cu, moe_mmq_tab.*, mmq_tab_instance.cu.in, mmq_kq_lib.cu / mmq_kq_loader.cpp (libstrata_kq), mmq_nvfp4_w4a4/w4a8.cu,
  moe_iq4_w4a8.cu (called only from moe_mmq.cu), moe_ws*.cu, ggml_cuda_host.cu, mmq_expert_bench.cpp, mmq_nvfp4_parity.cpp, two headers,
  nine MMQ tests, the split engine's qdot_test.cu (its ggml-cuda oracle; qdot_golden stays), cmake/strata_ggml_tq_overlay.cmake and its test.
- third_party/strata-ggml/ggml/src/ggml-cuda and ggml-cuda-tq (64 manifest rows; check_vendored: 62 files, ok).
- The flags out of packaging/build_cuda_linux.sh, build_cuda_windows.py, build_hip_linux.sh, build_hip_gfx1103.sh, build_split_hip.sh,
  tools/hip/build_windows.bat, spark/build_engine.sh, setup.py, CMakePresets.json (cuda-compile builds strata only) and the Dockerfile.
  The strata_kq probes of the package scripts and setup's clean-up of an old libstrata_kq stay (no-ops now).
- Settings read only in the deleted files are retired in data/settings-register.json (STRATA_IQ4_W4A8, STRATA_MMQ_DIRECT, STRATA_MMQ_WS,
  STRATA_QUANT_GATHER, STRATA_W4A8_CFG, STRATA_WS_FAST; retired_in 0.2.16); docs/SETTINGS.md regenerated. Docs: lines naming the removed
  build options or settings deleted or shortened (AMD_HIP, BATCHING, DETAILS, DGX_SPARK_LINUX, GYRO, OLDER_GPUS, RADEON_780M, STRIX_HALO,
  UNSLOTH_Q4, packaging/ENGINE-COMPONENT.md). Tests that read the options follow (test_linux_aarch64, test_setup_stale_stamp,
  test_build_cuda_windows, test_gfx906_build_files).
MMQ comparison builds come from the v0.2.15 tag from now on.

Gates (A = f-0216-int f6de3a6c6 with its package flags, B = this tree, same folder):
- CUDA 13 (z440, sm_86 + sm_120 + PTX; and strata-split-2): host code identical; strata 155 of 156 device files identical, the one differing
  file only in native_mmvq_il_pf_kernel, which differs between two builds of A too (A/A2); the split's differing files (the same family and two
  PTX files) differ in A/A2 as well. CUDA 12.9 with SM60 (sm_60 + sm_86): host identical; the 4 differing device files are the same in A/A2,
  functions native_mmvq_il_pf_kernel and fused_gr.cu gr_down_v3_kernel (nvcc build-to-build: three compiles of fused_gr.cu.o give three PTX).
- HIP (p620, gfx1200;gfx1201, the rx9070 flags): f-0216-int with and without -DSTRATA_PREFILL_MMQ=ON -DSTRATA_MMQ=OFF gives the same
  build.ninja and byte-identical strata and strata-split-2, so the flag compiled nothing; this tree's strata is byte-identical to A; the split
  has identical disassembly (2,808 functions) and host code, raw bytes differing only in __hip_cuid / gpubin hashes (step 5's include path).
- tools/check_no_mmq.py on the CUDA strata and split (bytes, nm, cuobjdump: 5,524 / 3,225 / 5,632 device functions) and the HIP strata and
  split (bytes, nm): clean.
- SYCL (p1004, icpx 2026.1.1): builds, 117 steps, no ggml. Metal (m1002, packaging/mac/build_engine.sh --stages engine): builds, 2 ggml names
  (ours). The aarch64 (Spark) compile is not run here: it runs with the Spark engine release check when the Spark is restarted.
- pytest tools/test_*.py + test_linux_aarch64 / test_loader_diag / test_tuning_availability_0213 (boston): 1,694 passed, 15 skipped, 2
  failed in test_gfx906_build_files (asserted the deleted macro's gfx906 lines; rewritten, 3/3). settings_register --check and
  test_settings_register, check_vendored, check_links: ok.
2026-11-16 15:04:34 +01:00
Niko1221 e2f859f0bd Merge f-0216-vision: strata-vision is Strata's own picture reader on every backend, without llama.cpp's mtmd, llama or ggml (own-stack step 6); the setting and the start-up fallback to llama.cpp's reader go; the Metal reader takes F16 inputs; no -DLLAMA_DIR in the reader builds 2026-11-16 13:47:12 +01:00
Niko1221 1fc1777ec0 Docs: strata-vision is Strata's own picture reader
The picture reader no longer comes from llama.cpp's mtmd library (own-stack step 6):
DETAILS.md (the Images paragraph and the llama.cpp credit), INTEL.md (the CPU reader) and
QWEN36.md (the vision encoder paragraph) say so. Wording approved by the coordinator 11-16.
2026-11-16 11:30:02 +01:00
Niko1221 59764975cd Merge f-ggml-out-0215: x86 CUDA / HIP release builds without ggml-base / ggml-cpu, the Metal engine's CPU pool on Strata's quant layer, SYCL dead prompt-kernel files deleted, the web host's llama.cpp download route removed (own-stack steps 1 and 3) 2026-11-16 10:44:55 +01:00
Niko1221 e39a52e33f Version 0.2.15 / Control 0.1.61: app and Terminal 0.2.15, Control 0.1.61; every engine package stays 0.1.60 (the v0.2.14 files, carried by absolute url)
The 0.2.14 bump list (38f63bc59): CMakeLists.txt project VERSION 0.1.61 (Control); strata_cli PRODUCT_VERSION 0.2.15; apps/desktop package.json,
Cargo.toml and the strata-desktop entry of Cargo.lock; apps/host package.json and package-lock.json; the bug-report placeholder; the About
comment; qa1-storage and test_tui2_023_versions; docs/data/release.json (tag v0.2.15, 0.2.15 / 0.2.15 / 0.1.61 / 0.1.60, the 0.2.15
installer and Control 0.1.61 names) and the pages tools/release_manifest.py --write and tools/capability_table.py --write keep.
metal/CMakeLists.txt (0.1.60-metal) and packaging/build_hip_linux.sh (PKGVER 0.1.60) stay: they name engine builds, and no engine is built.

- release.json "engines_from": "v0.2.14": the release whose engine packages this one carries. With it, release_manifest --check lets Control be
  ahead of the engines (before, only an engine version plus one hotfix part passed), as long as the engine packages at engine_version are in
  the asset list. tools/test_release_manifest.py covers it.
- The version line of docs/CAPABILITIES.md says "Control 0.1.61, engines 0.1.60" when the two differ, not "Control and engines 0.1.60"
  (tools/test_capability_table.py); docs/AI_REFERENCE.md and packaging/README.md state Control and engines separately (release_manifest LINES).
2026-11-16 02:23:03 +01:00
Niko1221 5c3541b6ab [Engine] SYCL: delete four prompt-kernel files and the migrated header copy that no build compiles
Pure deletions (own-stack 0.2.15, deletable now); the SYCL build does not change.

- sycl/src/prefill/moe_mmq.dp.cpp, ggml_cuda_host.dp.cpp: llama.cpp's MMQ port; not in sycl/CMakeLists.txt,
  and they include mmq.cuh / common.cuh, which no SYCL include path has.
- sycl/src/prefill/moe_fused.dp.cpp, moe_fused_iq.dp.cpp: not compiled; moe_fused_stub.cpp takes their place
  (sycl/CMakeLists.txt, "upstream's fused int8 kernels: not built here").
- sycl/third_party/ggml: the copy of the quant header that dpct writes (sycl/tools/migrate.sh reads the repo's
  third_party/ggml and writes a migrated copy under <out>/third_party/ggml). The SYCL build includes
  ${STRATA_ROOT}/third_party/ggml; nothing read the copy. migrate.sh says so in a comment.
- data/settings-register.json: the seven reads in the two deleted fused files removed, and "sycl" from the
  backends of the five settings only those files read (STRATA_PF_FUSED, _KQ, _NATIVE, _TILE, STRATA_PF_OCC).
  The rest of the register is left as it was (a full regenerate also moves hundreds of stale line numbers).
  docs/SETTINGS.md: "Intel Arc" off the two rows of those settings that named it.
- tools/test_quant_header_names.py, third_party/strata-ggml/UPSTREAM.md: follow the deleted copy.
2026-11-15 22:54:35 +01:00
Niko1221 baf16363b4 release manifest: the Control 0.1.60.1 packages of the 0.2.14.1 update
docs/data/release.json lists the three Control packages the update
ships (strata-control-0.1.60.1-windows-x86_64.zip, -linux-x86_64.tar.gz,
-macos-arm64.tar.gz) instead of the 0.1.60 ones. With them
tools/capability_table.py --write leaves docs/CAPABILITIES.md and the
summaries as they are (the control_version of d94ab5e27 with the old
asset names made the generator list Control as staying at 0.1.60), and
tools/test_capability_table.py passes. A docs commit after the build
commit 3af562d54, as 0.2.13.1 had one after 628f74955.
2026-11-15 20:46:59 +01:00
Niko1221 d94ab5e27b release manifest: the Control-only update (terminal_version 0.2.14.1, control_version 0.1.60.1, engines 0.1.60); UPDATES.md example lines follow
As 0.2.13.1 did (b5bff964a): docs/data/release.json keeps the tag
v0.2.14 and the app 0.2.14, the Terminal and Control versions are the
update's; packaging/UPDATES.md's Control example lines name 0.1.60.1.
tools/test_release_manifest.py and `tools/release_manifest.py --check`
pass with the bump of 2ad883b61.
2026-11-15 20:14:35 +01:00
Niko1221 745473a6aa capability table: the version line names the packages carried over at an earlier version
docs/CAPABILITIES.md said "Control and engines 0.1.60" while the release's asset list keeps the Intel Arc engine, the
linux-aarch64 engine and Control and the six DeepSeek packages at 0.1.59. tools/capability_table.py now reads the
version out of every strata-engine / strata-dsv41 / strata-control name in docs/data/release.json and lists the ones
that differ from the release's Control or engine version after the version sentence. A Control-only hotfix
(Control 0.1.59.1, engines 0.1.59) lists nothing, as before. Page regenerated; one test added.
2026-11-14 23:59:30 +01:00
Niko1221 fe8040c4df docs: the Strix Halo and AMD HIP performance pages say the engine is built without llama.cpp's MMQ kernels by default
docs/STRIX_HALO.md: the build line names the default (Strata's own prompt-expert kernels where they cover a layer, the
FP16 path elsewhere) and -DSTRATA_MMQ=ON for a build with the MMQ kernels.
docs/AMD_HIP_PERFORMANCE.md: the measured numbers come from a build with the MMQ kernels, so the reproduce line names
-DSTRATA_PREFILL_MMQ=ON -DSTRATA_MMQ=ON.
2026-11-14 23:38:32 +01:00
Niko1221 d6fd261862 Version 0.2.14 / engine 0.1.60: the v0.1.60 line in the setup.py version history; release.json names the carried 0.1.59 SYCL and linux-aarch64 packages
setup.py: the MIN_ENGINE comment gets the v0.1.60 entry (engine changes since v0.2.13.1, git log 628f74955..HEAD).
docs/data/release.json: the Intel Arc SYCL engine, the linux-aarch64 engine and the linux-aarch64 Control are carried
over from v0.2.13 at 0.1.59 with their existing names, as the DeepSeek packages already are. "published" stays the
placeholder day. docs/CAPABILITIES.md: tools/capability_table.py --write leaves it unchanged (the page names package
variants, not versions).
2026-11-14 23:38:23 +01:00
Niko1221 38f63bc591 Version 0.2.14 / engine 0.1.60: Terminal and app 0.2.14, Control and the engine packages 0.1.60
Version numbers only: the version sources (CMakeLists.txt, strata_cli, apps/host and apps/desktop package files,
Cargo.toml / Cargo.lock, metal/CMakeLists.txt, packaging/build_hip_linux.sh), docs/data/release.json (tag,
versions, published date, installer / Control / engine package names), the pages written by
tools/release_manifest.py --write, docs/CAPABILITIES.md by tools/capability_table.py --write, and the tests that
pin the numbers. The strata-dsv41 package names keep 0.1.59.
2026-11-14 20:51:18 +01:00
Niko1221 83cc5f35b1 prefill: P1A sizing order checked in debug builds; STRATA_PF_P1A_L2 read on HIP only
p1a_pack() keeps one answer for the whole run: a debug build asserts when a
later H sizing sees a different answer than the first (a plan made before
the expert layout was loaded). The expert layout is loaded in main ahead of
every bytes_needed call and every Prefill::init. A smaller H is never
written past: experts_native takes the P1A kernels only when the FP16 rows
fit in the H that Prefill::init carved, and runs today's kernels otherwise.

STRATA_PF_P1A_L2 is read only in HIP builds, like STRATA_PF_P1A; the
settings register and the settings page list it for AMD.
2026-11-14 15:00:03 +01:00
Niko1221 3d302a600d prefill: P1A prompt experts on by default on Windows gfx1151
src/core/arch_defaults.cpp: STRATA_PF_P1A=1 joins the Windows gfx1151 table.
Measured on that chip with UD-Q4_K_XL, 5 interleaved pairs: prompt x1.046
(4K), x1.043 (8K), x1.043 (32K), decode unchanged. KL to the FP16 truth,
24 prompts a size: on 0.0112 / 0.0116 against off 0.0179 / 0.0118 at
4K / 8K. A value the user sets wins, so STRATA_PF_P1A=0 turns it off.
Every other card and system keeps its table.

H grows to FP16 rows only when a layer of the loaded pack takes the P1A
kernels (p1a_takes_pair), so a pack with none allocates what it did before.
The start-up line keeps its wording and is not printed when no layer takes
the P1A kernels.

The settings register lists STRATA_PF_P1A and STRATA_PF_P1A_L2; the
settings page is regenerated.
2026-11-14 14:56:44 +01:00
Niko1221 2f01a4e37d docs: settings page regenerated
New rows: STRATA_NUMA_CARD, STRATA_PF_FUSED_SM75_IQ. STRATA_AUX_CPUS and
STRATA_PREFILL_EQUAL now show as text settings; STRATA_NUMA_POOL and
STRATA_NUMA_SPLIT are also listed for NVIDIA and AMD builds.
2026-11-14 12:40:11 +01:00
Niko1221 259ee74e16 Merge f-reader-ask: the server's VRAM ask for the picture reader follows its image limit
Without a vision.elastic_mib of the user's own, the server asked the expert
cache to keep a fixed 2,048 MiB free for the picture reader. At
vision.max_tokens 16384 the reader needs up to 3,674 MiB, and on an RTX A6000
one 3200x1910 picture failed with "the vision encoder failed (GPU memory: out
of memory)". The ask is now the config's elastic_mib when set, otherwise what
the reader needs at its token limit, and never less than 2,048 MiB: 2,048 at
the default limit of 1,024 tokens, 3,674 at 16,384 tokens or with no limit.
docs/DETAILS.md and docs/VRAM_ELASTIC.md say so.

No user text changes in the engine.
2026-11-14 11:49:33 +01:00
Niko1221 ad37f204ca docs: the elastic reader's VRAM ask at higher picture limits
DETAILS.md and VRAM_ELASTIC.md said elastic_mib defaults to 2048. Without
the key the ask is now 2,048 MiB at the default picture limit and, from a
limit of about 4,700 tokens up, the reader's estimated need at that limit
(3,674 MiB at 16,384 or with no limit).

Register regenerated: four read lines of serve/server.py moved by the
previous commit.
2026-11-14 11:14:02 +01:00
Niko1221 62d2b4dc18 STRATA_KV_HOST_DMA: register and docs say it is on by default on NVIDIA, off on AMD and Intel Arc
The register entry is now status rollback with a note per backend, and docs/TROUBLESHOOTING.md says which cards have it on by default.
The settings page was regenerated and picks up one row that was missing (STRATA_MEM_CREDIT_INACTIVE).
2026-11-14 10:22:27 +01:00
Niko1221 fb7dee4e57 prefill: the CPU share's limit no longer raises the long-prompt floor on the plain pack in a build without MMQ
With the CPU share armed (chunks up to 3,072 tokens by default on a CUDA card) stream_all_min() is the share's limit instead of the default floor. The share
takes experts of a native pack only (cpu_maybe needs lay.native), so on the plain Q2_0 pack (the pack setup builds on a CPU with AVX-512) it takes nothing, but its
limit still replaced that pack's own floor of 64 tokens in a build without MMQ. Chunks of 64 to 3,072 tokens then took the staged walk, which has neither the
staged fused entry nor the int8 kernels for that layout and runs each routed expert on the dequantize + FP16 path: the 1,567-token tail chunk of a 20,000-token
prompt, 7.7 percent slower than the build with MMQ on an RTX 5070. The tail buffers of the FP16 path were also sized for 3,071 tokens, which made the automatic
chunk smaller (9,216 against 10,496 with the share off).

The rule is a small pure header (plain_floor_rule.hpp) with a unit test. A build with MMQ and the native packs are unchanged. STRATA_PF_PLAIN_FLOOR=0 restores the
old rule. Settings register and SETTINGS.md regenerated.
2026-11-13 22:27:40 +01:00
Niko1221 567e75ad74 docs: UNSLOTH_Q4 fidelity note, drop "with the BF16 read" from the AMD gap sentence
The sentence "The 6 to 9% gap was measured on AMD with the BF16 read" states which
hyper-connection read the Strix Halo run used. The repository records only that the
pack rounds the Q8_0 projections to BF16 (docs/UNSLOTH_Q4.md since ed4b4db40) and that
the Q8 read was opt-in (fe6c5260e, 9708b549a); it does not hold the measurement or the
environment of that run. The sentence is cut back to what is recorded: "The 6 to 9% gap
was measured on AMD."
2026-11-13 18:41:31 +01:00
Niko1221 f272d77be2 Merge f-bw-hcq8 d0de6cb07 into the batch 17 candidate (docs/UNSLOTH_Q4.md: setup no longer writes STRATA_HC_Q8) 2026-11-13 18:41:31 +01:00
Niko1221 88bcc24b90 Merge f-i8-share 1ce91c84c into the batch 17 candidate (CPU-share fix: the share keeps the staged fused entry and the int8 kernels for the GPU's own experts in a build without MMQ) 2026-11-13 18:40:02 +01:00
Niko1221 d0de6cb079 docs: UNSLOTH_Q4 no longer says setup writes STRATA_HC_Q8
Setup writes nothing for it now; on NVIDIA the engine reads the file's own Q8_0 hyper-connection projections by itself for files
that carry them as Q8_0, and STRATA_HC_Q8=0 restores the BF16 read. The AMD perplexity note says it was measured with the BF16 read.
2026-11-13 18:05:40 +01:00
Niko1221 36292e233b register: notes for the 54 Intel-engine settings of f-sycl-prs, read from the code (separate branch off the batch 16 candidate)
The previous register commit gave the 54 settings that only the Intel engine reads
(30 STRATA_SYCL_*, 24 STRATA_PRIVATE_*) a placeholder note. Each note now says what
the code does at its first read (file:line), whether it is opt-in (=1 or a number,
off by default) or on by default. The six that the code turns on unless set to 0
(STRATA_SYCL_IQ4_LOOKUP, IQ4_PAIR_REUSE, IQ4_Q8_SPLIT, Q2_WORD_EXPAND,
QSA_CHUNK_DOWN, QSA_VALUE8_K8_VEC) get status rollback; the other 48 stay research.
STRATA_SYCL_Q2_WORD_EXPAND: default on, sycl/src/kernels/cuda/iq_kernels.dp.cpp:3706-3709.
docs/SETTINGS.md is regenerated: the "Switches that go back to earlier behaviour"
section grows from 70 to 76 rows (the six above). Described from the code only,
nothing measured. test_settings_register 8 passed, settings_register.py --check
exits 0, docs step passed.
2026-11-13 17:24:07 +01:00
Niko1221 1ce91c84c4 Merge batch 15 (d6f9f68f9) into f-i8-share
prefill.cpp: the two adjacent inserts (share_keeps_own_kernels and the switch-point globals) are both kept.
Settings register and docs/SETTINGS.md regenerated (the way-back count is 71).
2026-11-13 17:03:33 +01:00
Niko1221 6075352703 docs: the Q8_0 hyper-connection read is the default on NVIDIA for UD files
QUANTS.md still called STRATA_HC_Q8 opt-in, and UNSLOTH_Q4.md said setup writes it. The engine itself reads the file's own
Q8_0 hyper-connection rows by default on CUDA when the GGUF carries them as Q8_0; STRATA_HC_Q8=0 restores the BF16 read.
2026-11-13 17:02:11 +01:00
Niko1221 f9bc2d239f Merge f-draft-costs 1b11a76e8 into f-p4-int (the draft-cost table is on by default on Metal only)
CUDA and HIP keep live costs, so a start with no table runs as before; "draft_costs": true in a config turns the table on anywhere. The branch also brings the passive learner of the table and the lookup-window statistic. The only conflict is data/settings-register.json (both sides add entries); both are kept and docs/SETTINGS.md is regenerated from the register.
2026-11-13 12:36:13 +01:00
Niko1221 30c2b84f27 Merge f-switch-point3 216af487d into f-p4-int (the per-card prompt switch rule is on by default for NVIDIA sm_86 cards)
The branch contains f-tail-loan (dd404b382, the prompt loan sized for the tail) and f-switch-point2; the default itself is one commit. The conflicts are mechanical: a test block in CMakeLists.txt (both sides keep their tests) and the generated docs/SETTINGS.md, regenerated from data/settings-register.json.
2026-11-13 12:35:52 +01:00
Niko1221 9d53a1a8db prefill: a layer the CPU share took experts of keeps the staged fused entry and the int8 kernels in a build without MMQ
With the CPU share armed (chunks up to 3,072 tokens by default on a CUDA card) a layer where the CPU takes experts left both the staged fused
entry and the int8 kernels, because both asked for rows_cpu == 0. In a build with MMQ that layer runs MMQ's groups; in a build without MMQ the
GPU's experts of it ran on the FP16 path, which made a 2,049-token prompt 12 to 18 percent slower than the build with MMQ on an RTX A4000.

Neither path needs the condition. The share carves the CPU experts' rows out as the last block of the layer's rows, rows_local is already net
of them, `order` leaves them out, and the entry's and the kernels' row counts, bounds, scratch and destinations come from order / off / cnt;
T * K only bounds the tile count of the staged entry. The CPU's rows are written into Dm after the walk and never by the GPU.

The rule is a small pure header (share_own_rule.hpp) with a unit test: no CPU rows keeps the old answer, a build without MMQ keeps its kernels, a
build with MMQ is unchanged (compile-time). STRATA_PF_SHARE_OWN=0 is the old rule everywhere, =1 the new one in a build with MMQ too.
Settings register and SETTINGS.md regenerated.
2026-11-13 11:58:59 +01:00
Niko1221 216af487d7 Turn the per-card prompt switch rule on by default for NVIDIA sm_86 cards
The prompt path now picks, per card, the chunk size from which every expert
the card does not hold is streamed (the floor), and sets the CPU share's
limit to 1.6 times it. It is on with nothing set for one class of card: CUDA,
NVIDIA discrete on PCIe, a single GPU, the start-up link probe ran, compute
capability 8.6. Every other card keeps the fixed 1,024 floor and the fixed
share limit.

STRATA_SWITCH_POINT=0 turns it off; STRATA_SWITCH_POINT=1 asks for it on any
other CUDA card. An explicit STRATA_PREFILL_STREAM_MIN or
STRATA_PREFILL_CPU_SHARE_MAX still wins over the rule.

On an RTX A6000 (UD-Q4_K_XL) the floor is 3,584 and the limit 5,632 against
1,024 and 3,072. With the tail-sized loan in the same build the rule equals
the old default above its limit.

The start-up line no longer calls the rule an opt-in and is printed only when
the floor moved. The rule's unit test covers the class (and every compute
capability, multi-GPU, no probe, integrated and HIP outside it) and the
variable. The settings register entry becomes a rollback switch.
2026-11-13 10:35:14 +01:00
Niko1221 22246a338f docs: regenerate SETTINGS.md after the merges (the way-back count is 68) 2026-11-13 09:38:11 +01:00
Niko1221 6572fbaf13 Merge f-i8-mmqoff-int 70ef6d873 into f-p4-int (the build without llama.cpp's MMQ prompt kernels takes its own kernels by default)
The branch carries the int8 expert kernels and the rules for a build made with -DSTRATA_MMQ=OFF (HIP without STRATA_PREFILL_MMQ); the build with MMQ is meant to stay as it was. Order of what a build without MMQ runs for the prompt, nothing set: the fused kernels for a chunk of 1,024 tokens or more on every layer they cover; the staged fused entry for shorter chunks; the int8 expert kernels (gate/up Q4_K, Q5_K, Q6_K, IQ4_XS, IQ1_M, Q2_0 and the matching downs, tile-2 slices of 8, a few-rows route) for what nothing faster covers; the FP16 path for the rest. On a Tesla P100 the int8 kernels run only below the stream floor and the FP16 path from the floor up. FP16 expert buffers are sized for the tail in a fused layout, and the build prints one statement at start-up about what its prompt kernels are. A set STRATA_EXPERT_I8 still wins at every size.

Measured without MMQ against with MMQ, nothing set (prompt ms): R9700 at 1,000 tokens 936 -> 735, at 2,048 1,146 -> 1,151; RTX PRO 5000 within 1% at every size with the first logits byte-identical; Tesla P100 at 1,000 tokens 5,079 -> 4,267, equal from the floor up. The branch had merged an earlier integration head (3ffa59e2b) and now sits on the batch 14 head.
2026-11-13 09:38:03 +01:00
Niko1221 71f3c6db67 Size the lent prompt buffers' MMQ tail from the request's own last chunk
The loan of expert-cache slots laid out the fused MoE buffers for a tail of
stream floor - 1 tokens of MMQ rows, taken out of the expert cache, so every
chunk above the floor streamed more experts (+1.2 to +1.5% prompt time on an
RTX A6000 at a floor of 3,584; a smaller share under today's CPU-share
limit). The lend now sizes the tail from the segment: Prefill::relayout and
bytes_needed take a tail, the lend asks loan_rules for it (grow-only while the
layout's chunk stays), the reuse of a loan by a later segment also needs its
tail to fit, and a chunk below the floor that does not fit the tail ends with
a clear error instead of an overrun.

One GPU, no peer, no --batch above one slot, no head alias; a layer split
keeps the floor's tail. STRATA_PREFILL_TAIL_LOAN=0 restores today's sizing.
2026-11-13 07:07:03 +01:00
Niko1221 ce414cb9e9 prefill: a build without llama.cpp's MMQ takes the staged fused entry for short chunks on every card class; the start-up line says what runs
A build without MMQ takes the path the build with MMQ takes wherever that path does not need MMQ. A prompt chunk below the long-prompt floor now takes the staged group walk's fused entry for every layer the fused kernels cover, on every card class (before: only Windows gfx1151 with every layer fused-only). The layers the fused kernels do not cover take the int8 expert kernels, then the FP16 path. STRATA_PF_STAGED_FO=0 still turns the entry off, =1 asks for it in a build with MMQ. A build with MMQ keeps its rule.

Measured on an RTX PRO 5000 (IQ3_S): the build without MMQ was 15-29 % slower than the build with MMQ at 128-1,000 tokens; with the entry its prompt times, first logits and generated tokens equal the MMQ build's at every size. On an R9700 the entry is 1-6 % ahead of the int8 route at 128-1,000 tokens.

The start-up line of a build without MMQ is one sentence made from the layer counts the rule functions give on the machine it runs on (own_only_line.hpp, own_only_line_test); the list of switches that build turns on moves into the manifest.
2026-11-13 05:38:55 +01:00
Niko1221 638533e3fc Merge f-pr-split-n4534 cca88a011 into f-p4-int (each card keeps only its own layers' dense weights on a layer split; the last card's draft-head room)
#4522 (the trim of each card's dense weights to its own layers, now the default for explicit and auto layer splits) and #4549 (the last card's draft-head room), with fixes on top as separate commits: the PLE hash constants and their row-range check restored, STRATA_STAGE_TRIM=0 as the way back, the trim's freed bytes credited to the first card only, exact pricing of a later card's hyper-connection rows and PLE key, a quieter pricing check, one test-fixture fix. #4534 is not in.

One card: nothing changes (48 forced continuations byte-identical to the base). Two RTX A6000 that already hold every expert: decode 122.27 against 122.71 tok/s, prompts 5.6 to 10.0% faster at 2K, 8K and 20K tokens (the base streams experts for the prompt, this build none). Two cards held to 15.5 GB free each: decode 75.88 against 64.16 tok/s (+18.3%), 867 more expert slots on the first card. Way back: STRATA_STAGE_TRIM=0.
2026-11-13 05:26:46 +01:00
Niko1221 8c1fa57f6f Merge f-loan-walk 5bc07c47a into f-p4-int (the prompt loan is sized by the walk a piece takes)
Two commits on c5e4e5109. The prompt path borrows cache slots from the experts for its buffers; the size of that loan is now taken from the walk the piece really takes, not from the rounded chunk. Only a piece whose rounded chunk reaches the floor while its real size is under it changes; every prompt of 1,024 tokens or more with a first chunk at or above the floor is unchanged. Way back: STRATA_PREFILL_LOAN_WALK=0 (settings register entry and one generated row in docs/SETTINGS.md). The second commit is test-only.

Measured on an RTX A6000 (UD-Q4_K_XL, 13,580 of 24,576 slots resident, MTP, fixed draft-cost table): prompt time -14 to -15% at 770 to 1,024 tokens with the CPU share off, -10 to -12% at 2,818 to 3,072 tokens with it on; no change below or above those pieces. R9700: -2 to -4%. With the way-back switch the base numbers come back.
2026-11-13 05:26:29 +01:00
Niko1221 bc6f248ffa Merge f-draft-vocab 925d6fb05 into f-p4-int (the draft vocabulary is picked by the computer's languages; a renamed Flash-Next file starts the drafter)
Seven commits on 5d5498270, 11 files, no C++. Each drafter start picks the draft vocabulary file from the computer's language signals (display and interface languages, regional format, installed keyboard layouts; on Linux LANGUAGE, LC_ALL, LC_MESSAGES, LANG and the LC_* variables; on Windows kernel32 and user32 through ctypes; on a Mac the global preferences file). A Cyrillic-script language picks draft_vocab_cyrillic.bin, a Latin-script language other than English picks the new draft_vocab_latin.bin (62,102 ids), and English only, Chinese, Japanese, Korean, nothing readable, C / POSIX and other scripts keep draft_vocab.bin exactly as before. The pick is made at every start, nothing is written to the config and nothing is downloaded; a read that fails gives the default. One log line per start: "draft vocabulary: <file> (by this computer's language: xx)", "(set by you)" or "(the default)". setup.py --draft-vocab cjk (or --mtp-draft-vocab FILE) always wins and is the way back; setup.py gains the choice latin.

A renamed copy of a Flash-Next file is judged by its GGUF header: it starts the drafter (before it fell back to MTP without a word), and a renamed copy of a known set gets that set's tuned table entry.

Measured on an RTX PRO 5000 (IQ3_S, tuned drafter pack, 300 tokens a request): prompts in Russian 180.0 -> 227.6 tok/s with the Cyrillic file, German 211.7 -> 233.6, Spanish 220.1 -> 244.5, Polish 188.4 -> 203.2, French 221.9 -> 249.1 with the Latin file; English, Chinese and Japanese keep the default file and stay within 0.6%. The file changes speed only. The first start with a new file learns the draft-cost table again. The 18 config goldens carry the one new log line.
2026-11-13 01:41:24 +01:00
Niko1221 b637627a37 prefill: size the prompt loan from the walk a piece takes
A prompt piece below the stream floor walks staged, but its loan of cache
slots was sized from the chunk rounded up to the 256 grid: a 999-token piece
under a 1,024 floor was lent the streamed layout (512-slot ring, fused MoE
buffers). The loan now uses floor - 1 for such a piece. Default on;
STRATA_PREFILL_LOAN_WALK=0 keeps the rounded chunk. Pure rule with a unit test.
2026-11-13 00:52:55 +01:00
Niko1221 d6a4e84481 Regenerate the settings register and docs/SETTINGS.md
python tools/settings_register.py, then --docs, after the layer-split changes: the read lines of
generate.cpp and native_dense.cpp moved; STRATA_STAGE_TRIM is a rollback setting.
2026-11-13 00:30:06 +01:00
Niko1221 3e28250e84 Docs: the dense-weight trim is the default with a layer split
STRATA_STAGE_TRIM moves from the opt-in table of docs/MULTI_GPU.md to a new "Turning a default off"
table (STRATA_STAGE_TRIM=0 or --no-trim-stage-weights keeps every card's full copy). docs/BATCHING.md
and the --trim-stage-weights usage line say the trim applies to explicit and auto splits and is the
default. The settings register marks STRATA_STAGE_TRIM as a rollback setting.
2026-11-13 00:29:52 +01:00
Niko1221 c5e4e51099 docs: settings page regenerated from the register
STRATA_HIP_PROMPT_F16 leaves "Switches you can turn on" (273 to 272) because the Radeon 780M on Linux has it on by default now, and STRATA_PF_STAGED_FO joins "Switches that go back to earlier behaviour" (65 to 66). Only docs/SETTINGS.md changes; a second run of the tool changes nothing.
2026-11-13 00:09:32 +01:00
Niko1221 59211f98b1 Merge f-fused-staged e521524f3 into f-p4-int (Windows Strix Halo reads prompt pieces below 1,024 tokens on the fused kernels' staged group entry; --short-read defaults to 24 there)
Five commits on f33e9fa7b (the earlier short-piece rule). On Windows with one gfx1151 card and a layer set in which every layer has no MMQ tile and the fused kernels take it (UD-Q4_K_XL), a
prompt piece below 1,024 tokens (the batched ones, from 26 tokens) now takes the staged walk's fused group entry: only the routed experts stream and they run on the fused kernels, with FP32 down
rows, instead of a dequantize and two FP16 GEMMs per routed expert. The step-one floor of 64 applies only with the entry off. The serve loop's --short-read default is 24 instead of 64 on that
class (a --short-read on the command line wins). Pieces of 1,100 tokens and more, other cards, other systems and sets with an MMQ tile are unchanged. STRATA_PF_STAGED_FO=0 is the way back
(the earlier behaviour byte for byte); with STRATA_PREFILL_STREAM_MIN=1024 as well it is the old FP16 path; STRATA_PF_STAGED_FO=1 asks for the entry on any card (research).

Measured on a Strix Halo (UD-Q4_K_XL, three rounds, one start per arm): prompt ms with the old FP16 path / the earlier rule / this default 303 / 303 / 268 at 32 tokens, 595 / 595 / 317 at 64,
1,797 / 418 / 343 at 128, 2,305 / 514 / 449 at 256, 3,675 / 1,022 / 977 at 1,000; 1,100 and 2,048 tokens the same in every arm. Forced-token KL of the default against the long path with FP32 rows 0
at 256 and 768 tokens, the way back equals the earlier rule (KL 0, 36 of 36 request ids identical). Decode unchanged (65.8 ms a window).

The branch changes data/settings-register.json, docs/STRIX_HALO.md, prefill.cpp and generate.cpp; the register is regenerated by its tool on the merged tree with the branch's hand-kept entries
(the new STRATA_PF_STAGED_FO and the note of STRATA_PREFILL_STREAM_MIN).
2026-11-13 00:09:19 +01:00
Niko1221 27cf035e5c Merge f-amd-f16 8d7f997d4 into f-p4-int (the Radeon 780M on Linux reads its 16-bit prompt GEMMs FP16 in and out by default; the hyper-connection up-mix kernel has an FP16 path)
Three commits on 662e72ac2. With STRATA_HIP_PROMPT_F16=1 the fused hyper-connection up-mix (STRATA_HC_UPMIX, on by default on the 780M under Linux and in the Windows Strix Halo set) read the
FP16 activation images as BF16: forced-token KL 166 times that of the MMQ path, top-1 68.7%. The up-mix kernel now has an FP16 variant (new test hip_gr_upmix_parity: 20 BF16 and 6 FP16-io
sizes up to 8,192 tokens, error against FP64 1.6e-7 to 3.6e-7 of the largest value for the fused kernel, 6.2e-5 to 1.2e-4 for the FP16 pair), and a Radeon 780M (gfx1103, integrated, Linux)
now runs the prompt's 16-bit GEMMs FP16 in and out with nothing set. STRATA_HIP_PROMPT_F16=0 is the way back; =1 still works on any card. Every other chip, every discrete card and
Windows are unchanged, and nothing is printed for the default.

Measured on a Radeon 780M (Q2_0, 24 prompts of 2K tokens, 64 forced tokens each, the draft-cost table fixed): forced-token KL against the FP16 path, ratio to the MMQ path 1.091 [0.968, 1.231]
with FP16 io, top-1 97.5%; prompt speed ratio to nothing set 1.11 / 1.15 / 1.19 / 1.25 at 300 / 1,000 / 2,048 / 8,192 tokens (with the fused prompt kernels on top: 1.11 / 1.15 / 1.63 / 1.45).

The branch changes include/strata/core/arch_defaults.hpp and src/core/arch_defaults_test.cpp, which the earlier fused-default merge also changed at the same place; both sides are kept (the
fused-default declaration and test block first, the FP16-io ones after). The settings register is regenerated by its tool on the merged tree, with the hand-kept status (default) and note
of STRATA_HIP_PROMPT_F16 from the branch.
2026-11-13 00:08:40 +01:00
Niko1221 7d7590f40f docs: settings page regenerated from the register
STRATA_PF_FUSED_KQ moves from "Switches you can turn on" (274 to 273) to "Switches that go back to earlier behaviour" (64 to 65) and its documented-in column now lists DGX_SPARK_LINUX.md. Only docs/SETTINGS.md changes; a second run of the tool changes nothing.
2026-11-13 00:04:19 +01:00
Niko1221 336b8089f4 docs: the DGX Spark's table sets six speed defaults, with the K-quant fused kernels; the QUANTS.md row and the register note name the Spark
DGX_SPARK_LINUX.md: the defaults table gets a sixth row for STRATA_PF_FUSED_KQ=1 (UD-Q4_K_XL prompt 1.10x at 2K, 1.26x at 4K, 1.18x at 8K, 1.53x at 20K, median of 10 paired runs), the heading and first line say six, and the paragraph on what the switches do to the answers gives the forced-token KL of the K-quant switch (0.895 times that of MMQ, interval 0.81 to 0.99; top-1 agreement 96.3% against 95.7%; the same text twice, byte for byte).

QUANTS.md: the Q4_K (gate/up) row says the Spark's defaults table sets the switch.

settings-register.json: the hand-kept note of STRATA_PF_FUSED_KQ names the DGX Spark (12.1); the generated fields follow the register tool.
2026-11-13 00:04:10 +01:00
Niko1221 e521524f38 docs: Strix Halo prompt-piece speedups of the staged entry and of the way back, from one build
Old FP16 short path, the way back (STRATA_PF_STAGED_FO=0) and the default were all measured on the same build, medians of 3 rounds, 96 to 1,000 token pieces:
old path / default 3.76x (1,000 tokens) to 5.24x (128 tokens), old path / way back 3.60x to 4.48x.
2026-11-12 23:35:36 +01:00
Niko1221 d7ae86fcf1 setup: --draft-vocab latin, and the help and docs say the file follows the computer's languages
setup.py learns the `latin` choice that the locale rule already picks (data/draft_vocab_latin.bin: English, code and the German, Spanish, French and Polish tokens, 62,102 ids, a draft head of about 203 MiB on IQ3_S next to cyrillic 193 and fr 151), prints "draft layer: the token subset with the Latin-script languages" when it copies it, and the --draft-vocab help and docs/DETAILS.md say that with no choice the file follows the computer's languages and that a choice always wins. The cyrillic help line now carries the measured figure in the same form as the new one.

Measured on an RTX PRO 5000 (IQ3_S, two rounds pooled), default file -> chosen file, tokens a second: Russian 180.0 -> 227.6 (cyrillic); German 211.7 -> 233.6, Spanish 220.1 -> 244.5, French 221.9 -> 249.1, Polish 188.4 -> 203.2 (latin); English 265.2 with the default, 266.0 with latin, 266.6 with cyrillic; Chinese 238.4 -> 199.2 and Japanese 222.2 -> 194.4 with latin. Output tokens are identical in every arm (72 of 72 and 24 of 24 requests each).
2026-11-12 23:26:18 +01:00