Commit Graph
1347 Commits
Author SHA1 Message Date
Niko1221 fec06e9f78 setup: --output jsonl, machine-readable progress for a program that installs a model (#4941)
An app that installs a model for its user with `setup.py --yes --no-start`
had only setup's human text to follow. With --output jsonl setup writes one
JSON object per line to stdout (schema_version 1): step, ok, warning,
progress (label, done_bytes, total_bytes; at most once a second per file and
once at the end), error (message, hint, exit_code; kind no_space with path,
free_bytes, needed_bytes for the disk refusal, refused, interrupted) and last
done (exit_code, run_config: the strata-<model>.json it wrote). Exit codes
are unchanged; without the option nothing changes.

stdout's file descriptor is kept for the JSON and stdout itself is pointed at
stderr, so every human line and every program setup runs (pip, the fetch
helpers, the packer) writes there and no other byte reaches the JSON stream.
docs/DETAILS.md "Installing a model from another program" has the table.

Tests: tools/test_setup_jsonl.py (every stdout line parses, also after a
child program writes raw bytes with no newline and a partial human line; the
error event's fields and exit code; nothing changes without the option; done
names the run config); tools/test_setup_*.py and tests/tuning on p1006.
2026-11-16 17:25:59 +01:00
Niko1221 6a1e6833d8 models: strata models explain NAME shows where the launch looks for a model (#4887)
When a model shows as "not on this computer", nothing said which folders the
launch had looked in. `strata models explain IQ3_S` (or iq3_s, qwen/IQ3_S)
prints the data folder the launch uses (or --data-dir), every folder name it
tries under models/ (setup's spelling, the lower-case tag, the same name in
other letter case) and whether it is there, the folder it will use and the
.gguf files in it with their sizes; when none is there, the folders that are.
--output json gives the same. It reads folder names and file sizes only.

Catalog.model_folder_trace is the lookup itself and model_folder returns its
pick, so the explanation is the launch's own decision. Text as approved;
docs/TERMINAL_LAUNCH.md "Models you already have" names the command.

Tests: tests/terminal/test_models_explain.py (setup's spelling, the lower-case
tag, another letter case on a case-sensitive disk, nothing found with the
folders listed, no models folder, an unknown name, the CLI and its JSON, and
nothing written); with the cli/models/catalog/docs tests 735 passed on Boston.
2026-11-16 17:22:56 +01:00
LawiK974 ee70336055 launch, docker: --draft-vocab and DRAFT_VOCAB carry setup's draft vocabulary (#5786)
strata launch --draft-vocab cjk|en|cyrillic|fr|latin passes setup's choice
of the draft tokens through; the preset and the flag summary keep it, the Mac
setup step takes it, and without it nothing is passed (setup's own pick from
the computer's languages stays). The Docker image passes DRAFTING and
DRAFT_VOCAB to strata launch.

Taken from the PR with its author; resolved against the current tree (its
base still had DeepSeek's speed modes, which stay out) and completed: the list
is setup.py's DRAFT_VOCABS with latin (the PR had four), pinned equal by a
test; help and docs/DOCKER.md text as approved.

Tests: tests/terminal/test_launch_draft_vocab.py (each name round-trips
through the preset to setup's arguments, none passed by default, an unknown
name refused, the entrypoint lines and the docs row), and an entrypoint run in
tools/test_docker_entrypoint.py; with test_docker_files, test_launch and
test_launch_tui 235 passed on p1004.
2026-11-16 16:52:37 +01:00
Niko1221 cd14fd48a0 launch: run-defaults.json, user-wide server settings for every launch (#5858)
Settings a person wants for every model and preset (the reporter's example:
"undeclared_tool_calls": "call") had to go into each model's config or the
rebuilt launch config, or need an environment variable. strata launch now
reads run-defaults.json beside launch-presets/ (~/.config/strata or
%APPDATA%\Strata). Without the file nothing changes.

Allowed: the Settings view's server keys (serve/runconfig.EDITABLE, checked
with runconfig.check; not mtp, open_browser or vram_reserve_mib) and
undeclared_tool_calls ("text" | "call"). A bad key is skipped and named, the
rest apply; an unreadable file or one that is not an object is skipped whole.
Lowest precedence: the model's installed config, a value the Settings view
saved since the last start and this launch's own --set come first. What the
file supplied is remembered in the launch config ("user_defaults"), so the
#5371 carry-over keeps a Settings-view change but not a stale default: an
edited defaults file takes effect at the next launch. Terminal only; the app
does not read the file. docs/TERMINAL_LAUNCH.md "Defaults for every launch".

Tests: tests/terminal/test_run_defaults.py (throw-away config folders);
with test_launch and test_launch_tui 198 passed on p1004.
2026-11-16 16:33:54 +01:00
Niko1221 15cb960724 telemetry: the top-level PCIe fields stay card 0's; the slowest card is named in gpu_pcie_bottleneck (#5801 #5981)
Follow-up to the cherry-picked #5801, on the coordinator's additive rule for
the metrics contract (11-16):
- serve/telemetry.py: gpu_pcie_gen / gpu_pcie_gen_max / gpu_pcie_width keep
  their meaning (card 0's reading) instead of a per-field minimum over the
  cards, which could describe a link no card has (Gen5 x8 + Gen3 x16 gave
  "Gen3 x8"). New "gpu_pcie_bottleneck": {card, gen, gen_max, width,
  width_max}, all from the ONE card whose link carries the least (lane rate
  of its generation x its width; a card with an unknown generation or width
  never wins; one card: that card; none when no card reports both).
- Terminal Overview: the PCIe tile shows that card's link
  (pcie_bottleneck over the per-card rows), subtitle "slowest of N cards";
  the Power tile says "N cards · limit X W" / "N cards" (wording approved by
  the coordinator 11-16; the existing rule drops the limit when the line
  does not fit the tile).
- web Monitor: the big PCIe number with several cards comes from
  gpu_pcie_bottleneck; per-card power reads "X W of Y W limit".
- docs/TERMINAL_LAUNCH.md follows ("the slowest card's PCIe link",
  "2 cards · limit 360 W").
Tests: serve/test_server.py (the PR's aggregate tests now check card 0 +
the bottleneck; new: one real card never a mix, one card / no reading) and
test_monitor_classic.py; with test_terminal, test_visual_detail and
test_overview 491 passed on p2003 (6 fail on the PR alone). A model-free
read of the AMD reader on p2006's Radeon 780M (sysfs, no engine): Gen4 x16,
pcie_width_max 16, path 2/2, bottleneck = card 0. Not checked: a discrete
AMD card, two real cards, the web page in a browser (GUI-1116, owner PC).
2026-11-16 14:49:12 +01:00
Jie Ren 4fc8472034 Monitor: each card gets its own PCIe ceiling and power limit, so a card that runs narrower than it could is visible (#5801)
Net change of PR #5801 (head 6a65b4228: 57868948c, the merge 6c1c9d002 and
6a65b4228 by Jie Ren) applied to f-0216-int with a three-way merge, no
conflicts. Each "gpus" row carries power_limit and its own PCIe link
(gen, gen_max, width, width_max, rx/tx, own_gen, path); the NVML and AMD
readers add pcie_width_max; the Terminal's Cards strip, the Hardware page
and the web Monitor name each card's link ("Gen5 x8 of x16").

The PR also made the top-level gpu_pcie_* fields the minimum over the cards,
field by field; that is changed in the next commit (the top-level fields
stay card 0's, the slowest card goes in a new field). Supersedes the
producer part of PR #4623.
2026-11-16 14:31:46 +01:00
Niko1221 b9eff8d348 runtime: the restart plan reports the stop phase's limit and, apart from it, the last stop's time; protocol notes (#5956 #5958 #5954)
One lifecycle contract for the three management PRs (all by l473n79c618e),
reimplemented after review:

#5956: the PR's min_wait_s (last observed drain + 5 s) is not a safe floor:
a fast stop says nothing about the next one, and the kill/reap wait after the
drain deadline was left out. The restart plan now carries two additive
fields: teardown_limit_s, the stop phase's worst case (shutdown_timeout +
the host's 8 s kill grace + the 10 s reap wait, Host._stop_child; named
STOP_KILL_GRACE / STOP_REAP_WAIT), and last_teardown_s, what the last stop of
a running server took here (null before the first; informational, never a
bound). Nothing else in the plan or the status changes.

#5958: no new action. runtime.status of a ready instance already carries
state, instance_id, profile_revision, model_state and api_url (the readiness
probe's result), and the owner re-checks owner and instance at the restart
itself; fixtures only.

#5954: docs/MANAGEMENT_PROTOCOL.md "Semantic notes" (approved by the
coordinator 11-16). Corrected against the code: for runtime.restart, wait_s
is the caller's wait for the owner's answer, not a server-side budget
(runtime.restart -> _rpc timeout); a failed new instance gets its own stop
before the rollback start, so the whole restart is bounded by
2 x (teardown_limit_s + startup_wait_s). The PR's point that
`connect --write --output json` does not write is dropped (fixed by #5955).

Tests: tests/terminal/test_restart_teardown_budget.py (fake clock, no
processes): fast then slow stop, a stop that times out and is reaped, a
failed load with rollback inside the documented bound, the status fields a
swap gate reads, a ready file of an earlier instance gives no address, a
restart planned on one instance refused after a swap (nothing stopped), and
the two plan readers (bench managed match, recipes plan) with the new fields.
On 756242554 they fail; with test_runtime, test_recipes and test_bench
106 passed on p2003.
2026-11-16 14:25:46 +01:00
Guillaume PUTIER a9f2de40f3 setup: parallel counts pinned RAM and per-cell VRAM at long contexts (#6046)
With KV streaming, each slot pins its whole K/V in RAM (12.38 GiB at
1M int8) and keeps about 1.8 KB of VRAM per context cell beyond 32K.
parallel_slot_gb counted 0.59 GB per slot whatever the context, so
setup recommended 2 slots for IQ3_S at 1M on a 32 GB card. Measured on
an RTX 5090 with 125.6 GiB of RAM: 4 slots ran every request 3-4x
slower, 8 slots stopped the engine at start.

The recommendation now also keeps the expert arena plus every
session's pinned K/V within 75% of the RAM (Windows refused to pin
past 99 of 125.6 GiB), takes the K/V bytes per cell from KV_CELL_BYTES
(k8v4 816), and the note says how much RAM each request would pin when
RAM is what rules it out.

Doc: docs/BATCHING.md, what a slot costs at long contexts

Cherry-picked from PR #6046 (c9a879750). The wording of the setup lines
follows in the next commit. tools/test_setup_parallel.py: 3 fail on
756242554, pass here (p2003; the snapshot step there fails on base and
head alike: no node on that box).
2026-11-16 14:23:18 +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