Both halves come from main 58ee32277: the app side (f-0217-int2) and the engine
side (f-eng-0163, on f-bw-a). Four conflicts, all in the serve parser and one
doc table:
- terminal/serve/frontend.py, _track (#4923): the app lane and FIX-ENG fixed the
same stray-backtick rule; the FIX-ENG form is kept (it also carries a span
that is already open across lines), the same parity as the app lane's.
- terminal/serve/frontend.py, _quoted_think_end (#5605): the app lane's pair
rule ("</think>" inside a pair of quotes) and FIX-ENG's closing-quote rule
and #6218 backtick-span rule are all kept, in one function.
- terminal/serve/test_parser_track.py: the reference model follows the kept
_track rule.
- terminal/serve/test_parser_stray_backtick.py: both lanes added a file of this
name; the app lane's stays, FIX-ENG's is test_parser_stray_backtick_eng.py.
- docs/DETAILS.md, "On by default" table: FIX-SPEED's longer prefill-share row
and its two new rows are kept; the STRATA_ROUTE_TAIL_SKIP row is not there
any more (tail skip is off by default in 0.2.17, its own section below).
From PR #6150 (halfspeedhuman; its commit 8a124e431), author kept. On a Mac, --rope-scaling linear|yarn was parsed
and logged as active, but no rotation changed: every RoPE rotation on Metal reads the cos/sin table that
Window::init built without scaling, and rope_table_set does nothing on Metal. Window::init now builds that table
with the shared build_rope_table(64, rope_scaling(), ...) when a scaling is set (YaRN's magnitude factor included,
as on the PC), refuses an invalid setting with a message, keeps the model file's frequency base (and logs it when
the resolved one differs), and logs the table it built. Without --rope-scaling the original loop runs unchanged,
so the default path is the same bits. The DFlash2 drafter keeps its own unscaled table (it only proposes tokens).
docs/MAC.md gains a short section on the option. Author's check (Apple M6): the default path gives identical answers
on three requests, including a 37,687-token one; the engine links on our M5 Max (see the gate table).
From PR #6260 (Viktor Bystrov; its commit 3773be472), author kept. Only the docs half of the PR is taken. docs/MAC.md says
what Auto does on a Mac: setup skips the MTP draft layer on a streaming Mac below 96 GB; DFlash2 is fetched for
compatible Qwen3.8-Flash-Next packs; Q2_0 and IQ3_XXS use the stock drafter (1.2 GB), UD-Q4_K_XL and UD-IQ4_XS-v31 the
tuned one (0.34 GB, --spec 6, --draft-conf 0.7), with the stock one when the tuned one is not available; IQ3_S uses MTP;
DFlash2 missing means MTP when its layer is there. Checked against strata_control/drafting.py choice_of for Metal (Q2_0,
IQ3_XXS, UD-Q4_K_XL and UD-IQ4_XS-v31 give dflash2, IQ3_S gives mtp). The link to the licence notice
(terminal/data/dflash2-tuned/NOTICE.md) points at a file that exists.
Not taken: the PR's changes to engine/metal/setup_mac.py (a docstring, three messages the Mac setup prints, "This model
keeps using the MTP." and "(one token per step is faster there)" among them): the file is under engine/, which this lane
does not change, and the messages are user-visible text for the owner to approve. Applies as posted (docs).
Text change: docs text (see TEXT-PENDING in the results file).
Checked first: engine/CMakeLists.txt, engine/cmake/, the SYCL, Metal and split projects and the picture reader's CMake files have no FetchContent,
ExternalProject, file(DOWNLOAD) or git clone; the engine's ggml is the tree vendored in engine/third_party/strata-ggml, and -DSTRATA_GGML_DIR is an
optional override. setup.py downloads no llama.cpp (get_llama_cpp() "Nothing is downloaded any more"; gguf-py is vendored in
engine/third_party/strata-gguf-py).
Removed or made true, nothing else added:
- AMD_HIP.md ("CMake fetches the pinned llama.cpp revision ..." and the -DSTRATA_GGML_DIR line and comment of the gfx906 container recipe), STRIX_HALO.md
("CMake fetches the revision it needs ..." -> "The engine build needs no llama.cpp checkout."), INTEL_ARC.md ("The build fetches ggml ..." and "it fetches
llama.cpp's gguf-py helper from GitHub"), DGX_SPARK_LINUX.md ("the first run also fetches llama.cpp"), MAC.md ("and llama.cpp's ggml at the commit the PC
build pins"), SAFETY.md ("a first model install also fetches llama.cpp's preparation scripts"), AMD_HIP_PERFORMANCE.md ("Use the repository-pinned llama.cpp
dependency"), SPLIT_ENGINE.md (-DSTRATA_GGML_DIR=<llama.cpp checkout> in the split build);
- GYRO.md: the paragraph about the configure-time ggml overlay (cmake/strata_ggml_tq_overlay.cmake and engine/third_party/ggml-tq are not in the tree), and
the build block no longer clones agentionai's llama.cpp fork or passes -DSTRATA_GGML_DIR (it starts with "The engine build needs no llama.cpp checkout.");
- DETAILS.md: the --flash-attn row of strata-vision (it describes ggml's AVX-512 fallback; the picture reader has no ggml and ignores the option);
- ORCA.md and UNSLOTH_Q4.md: "gguf-py from the pinned llama.cpp dependency" -> "The pack tools carry their own gguf-py; STRATA_GGUF_PY can point to another
gguf-py directory".
Left: measured tables and history that name the llama.cpp fork or the old build (GYRO.md results, benchmark reports, release notes).
The pages a user follows still told them to run `python tools/iq_pack.py`, `.venv/bin/python -m serve.server`, `packaging/monitor_bundle.py`,
`docker/build.sh`, `tools\hip\build_windows.bat`, `bench.sh`, `Strata\tools\strata_mcp.py` and to read `src/...`, `sycl/...`, `apps/...`: places that no longer
exist. Found with tools/layout/checks/docs_paths.py (each old path existed before the move and has a new place on this tree) and fixed there, plus the
Windows-style and example paths its tokenizer does not read:
- scripts and tools: `tools/<python tool>` -> `terminal/tools/...`, `serve/...`, `strata_cli/...`, `strata_control/...`, `data/...`, `requirements*.txt`, `setup.py` and
`strata.py` in a command -> `terminal/...`; `.venv/bin/...` -> `terminal/.venv/bin/...`; `python -m serve.server` -> `python terminal/serve/server.py`;
- repository tooling: `packaging/` -> `tools/packaging/`, `docker/` -> `tools/docker/`, `bench.sh` and `BENCH.bat` -> `tools/...`;
- engine and app sources named in the text: `src/`, `include/`, `metal/`, `sycl/`, `third_party/` -> `engine/...`, `apps/` -> `app/`;
- benchmark results: `bench/results` -> `docs/bench-results` (strata_bench.py writes there);
- the MCP server examples: `Strata\tools\strata_mcp.py` -> `Strata\terminal\tools\strata_mcp.py`.
Only commands and the paths in them changed. A file name in a sentence (`setup.py`, `strata.py`) and the sentences that describe an INSTALLED Strata's
layout (`strata_control/update_keys.json` inside every installed Strata) are left as they are, as are docs/ORCA_Q4_K_S.md (it tells the reader to build the
v0.2.15 tag), the benchmark reports and the history pages. No line was dropped: every command still exists.
Made by tools/layout/move_0216.py (the commit before this one) on db8e0be9c, the final code head of 0.2.16:
- 75 git mv (renames, so `git log --follow` and blame keep working; packaging/acceptance_matrix.md shows as delete + add because its links
changed too) and 3 removals: SETUP.bat, UPDATE.bat and update.sh (setup.py --update pulls the code now);
- 1,425 path edits in 307 files: root-relative paths in CI, Docker, .gitignore and the release scripts; Markdown links; Python and
Node joins from a root that moved with its folder; explicit edits for code that computes a root or names a moved path; tables of
repository paths inside tests.
engine/ holds what CMake builds (src, include, cmake, metal, sycl, spark, third_party, the C++ tests and benches). app/ is the desktop
app and its host (was apps/). terminal/ is the Terminal in the layout of the installed one (strata.py, setup.py, strata_cli,
strata_control, serve, bin, data, ref, crates, the Python tools and tests). docs/ has the documentation, docs/lang/ the translated
READMEs, docs/history and docs/bench-results. tools/ has the repository's own checks, packaging, docker, research and nix.
tests/core/test_tqp_ref.py is a pytest file and stays with the Python tests (terminal/tests/core/).
AGENTS.md, README.md, LICENSE, setup.sh and START-HERE.bat stay at the root.
No behaviour change: the same command lines, the same sources. For this head a replay of the script gave the same numbers and the path
scan (tools/layout/checks/path_scan.py) reports no hit; the suites and the builds run on this commit next.
Port of PR #5793 (alexjyong), its sensor commit beff71030 (the Temperature unit commit of the same PR is not part of this). On a Mac the Monitor's GPU
temperature and power cards read a dash because powermetrics needs root. With STRATA_MACOS_SENSORS=1 they are read the way the Stats app reads them: the SMC's
per-chip GPU temperature keys (the HID sensors as the fallback) and IOReport's GPU Energy counter for power, all private macOS calls looked up by name so
a macOS without one leaves that reading empty. Without the variable nothing changes (the owner's decision for #5016: a private-API probe behind an opt-in).
Merged onto the current base (conflicts in serve/telemetry.py with the ADL2 reader, the one-ioreg-per-process reader and the Intel reader: all kept). One change to the
PR in the resolution: the sensors reach only the Monitor's reader. They are attached in monitor_reader (_Metal.attach_sensors), never in gpu_reader, which the
server's VRAM checks and the drafter's sizing also call, so those never start the private calls. Two tests added for that wiring (serve/test_apple_sensors.py
18 tests). docs/MAC.md and the code comment say that the idle readings were also checked on an M5 Max.
Checked on m1002 (M5 Max, macOS 27.3, python 3.9.6, under lockrun): switch unset = the reader is unchanged (no temp or power keys, the old note); switch on =
init 48 ms, 7 of the M5's 8 SMC GPU keys answer, idle 23.4 to 23.6 C over six reads, power 0.0 W idle, all in range, no crash. Loaded readings were not measured.
py-serve on p1004: 1855 passed / 0 failed (base 1836 passed plus one flaky test, test_connection_deadline PeerStall, which also passed on the first head run); tools/check docs passes.
Conflicts:
- apps/host/src/locales/*.json (9): mechanical, both sides only add keys at the end (HEAD s9039-s9051, guib s9101): union.
- serve/server.py: mechanical, the same #2497 / PR #4307 fix came in twice (identical code, different comments): HEAD's kept.
- serve/web/app.js, decided by the coordinator 11-16: f-1116-tui's per-card power / PCIe block stays; guib's #5457 (fcfe18e55) "not available" plus st.gpu_note goes into the single-card branch of the power and PCIe metrics (phaseA-tests\int0216\int0216_resolve_appjs2.py). serve/test_web_*.py 78 passed.
cf5abac23 makes setup decide resident vs streaming with the engine's own rule (the weights plus 12 GiB beside them against Metal's share). The table's 'needs about' and 'recommended from' columns are recomputed from strata_control/mac_fit.py at cf5abac23, the streaming section's heading and rule sentence say the same, and Gyro-S needs about 43 GB to stay resident. The PR's note that Gyro-S on 64 GB runs out of Metal memory (4d56071aa) is not taken: not measured here. Wording approved by the coordinator.
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.
DeepSeek V4.1-Flash leaves every user page, as written in par/dsout/DOCS-DRAFTS.md:
- README.md and its 7 translations lose the DeepSeek block; docs/media/models/deepseek.svg is
removed with its credit lines.
- MODELS, INSTALL, docs/README, MAC, TROUBLESHOOTING, AMD_HIP, DOCKER, INTEL, MULTI_GPU,
TERMINAL_LAUNCH, AI_SETUP, AI_REFERENCE, MEDIA_KIT, DETAILS, SAFETY, DGX_SPARK_LINUX, STRIX_HALO,
STRIX_HALO_WINDOWS, AGENTS.md and the packaging pages (README, UPDATES, ENGINE-COMPONENT,
mac/README): DeepSeek sections, rows and clauses deleted; the eight approved new sentences.
STRIX_HALO's WSL sentence (true for every AMD engine) moves to the Quick start.
- The three links to DEEPSEEK41.md anchors that no longer exist (MODELS.md twice,
TERMINAL_LAUNCH.md once) went with their sections, so the link check passes again.
- docs/data/capabilities.json drops the deepseek41 family; docs/CAPABILITIES.md and the cap
blocks regenerated by tools/capability_table.py --write. MEDIA_KIT.md has no cap block left,
so tools/capability_table.py no longer lists it; tools/test_capability_table.py points its two
contradiction tests at qwen38 / qwen36 and loses the DeepSeek-on-a-Mac test.
- docs/SETTINGS.md: the three STRATA_DS4_* rows go (count 280 -> 277). The page is not fully
regenerated: tools/settings_register.py --docs would also change seven rows that are not about
DeepSeek and were already out of date on f-own-int 9bef5255d; they wait for the owner.
- The four approved help texts lose their [DRAFT] prefix: strata launch --context, and
"choose the Qwen engine" (strata components use / remove).
Kept on purpose: DeepSeek as a cloud provider and search key, every DeepSeek Harness mention,
docs/release-notes-*.md and history/, docs/DEEPSEEK41.md and DEEPSEEK_MAC.md (the five-line page).
Removes the window.cpp branches of the fused router, the partial GDN commit and the
weight-prefetch dispatch, and the wpf kernel (gr.metal). The router_route kernel stays:
metal/tests/token_chain.cpp (its default) and metal/tests/fuse_parity.cpp still use it.
docs/MAC.md loses the row that described ROUTE and PARTIAL. The register marks the
three retired in 0.2.13.
SET_DEFAULTS is the one per-(backend, set) table (Metal only; IQ3_S stays on the MTP). Setup, strata launch and strata drafting fetch fetch the tuned pack through the signed feed
(pinned size and SHA-256, resumable, silent offline, the standard drafter and then the MTP as fallbacks). Apache-2.0 licence and the modified-by-Strata notice ship in
data/dflash2-tuned and are copied beside the file. The Metal 'not tested' line is replaced for these sets.
Coder: expert-pruned 256-expert Coder, M5 Max, 5 interleaved pairs, identical greedy tokens in all 40 runs per class, over --spec 2: story -2.5%
(0/5), code +7.1%, JSON +9.3%, agent turn +12.5% (5/5 each). It has no Mac setup entry yet; the name is what a config for it would pass.
fp16 decode (PR 4807): setup writes STRATA_METAL_F16=1 into the config's env for a resident IQ3_S or Q2_0 pack (STRATA_METAL_F16=0 there turns
it off; streaming and the other sets are untouched). The owner's rule was an option unless it passes the 61-task quality suite: off / on / off
again on IQ3_S 54/61 each, on Q2_0 54/61 each, the same 7 tasks failing in all arms, no family drop, no new hallucination flag, 0 pass/fail
changes between two runs of the same arm; decode +14% (IQ3_S) and +15% (Q2_0) in the suite runs, top-1 96-97% and mean KL 0.009-0.016 against fp32
(phaseA-tests/mac-q/RESULTS.md sections 20, 22, 30).
Unset, the output is unchanged (the build with the change, unset, gives the same greedy ids as the build without it in 12 of 12 runs, gemv_parity / gr_parity / expert_parity pass). With STRATA_METAL_F16=1 the decode windows of a resident model use half-precision GEMVs (Q2_0, Q3_K-Q6_K, IQ4_XS) and the Q2_0 routed experts.
M5 Max, spec 3 + min-p 0.5, 3 interleaved pairs, decode tok/s unset -> on: Q2_0 story 105.0 -> 114.9 (+9.4%), code 125.6 -> 143.7 (+15.5%), json 130.8 -> 135.1 (+3.3%, one noisy pair), agent 116.1 -> 131.6 (+13.4%); IQ3_S (dense GEMVs only) story 93.1 -> 104.3 (+8.8%), code 103.6 -> 118.5 (+12.5%), json 122.5 -> 135.4 (+10.6%), agent 103.8 -> 117.8 (+12.3%).
It changes arithmetic: teacher-forced over 4,995 positions against the same build unset, Q2_0 top-1 97.12%, mean KL 0.0094 (p99 0.119), perplexity 4.456 against 4.442; IQ3_S top-1 96.16%, mean KL 0.0160 (p99 0.211), perplexity 4.119 against 4.135. The half range is not guarded (see the PR). Off by default.
M5 Max, MTP, 5 interleaved pairs, fixed harness (each run's spec, min-p and context read from the engine's own log), greedy ids identical in every run, over --spec 2:
Q2_0 story 104.4 -> 104.7 (+0.4%), code 114.4 -> 127.3 (+11.5%), JSON 124.6 -> 132.5 (+6.3%), agent turn 115.9 -> 117.9 (+1.9%, 3/5 pairs).
IQ3_S story 94.2 -> 93.3 (-0.9%), code 103.8 -> 106.1 (+2.5%), JSON 105.1 -> 122.6 (+16.7%), agent turn 102.1 -> 107.1 (+4.9%).
The earlier Q2_0 'flat' result and IQ3_S '+1.4..3.6%' came from a harness that gave the spec flags to the first pair of an arm only. Other sets keep --spec 2.
M5 Max, MTP, IQ3_S, 5 interleaved pairs (2 + 3), greedy tokens identical in every run: --spec 3 --spec-min-p 0.5 against --spec 2:
story 93.8 vs 92.4 tok/s (+1.4%), code 103.4 vs 100.4 (+3.0%), JSON 105.3 vs 101.6 (+3.6%), agent turn 100.8 vs 98.0 (+2.8%).
Q2_0 measured flat (-1.0% to 0.0%, 5 pairs; 800-token story -0.7%), so it keeps --spec 2; --spec 3/4 without min-p lose on both.
mac_fit.spec_args picks the flags by model; engine_args takes the model name (setup.py and metal/setup_mac.py pass it); a streaming
Mac keeps STREAM_SPEC, a Mac without the draft layer keeps --spec 2. The engine's own default (--spec 2) and an explicit --spec in a
config are unchanged. Test: tools/test_setup_mac.py.
sign-and-notarize.sh starts strata-vision --version in the signed engine folders (it already signs every Mach-O).
MAC.md carries the M4 numbers (0.45 s on the GPU, 50.7 s on the CPU for a 260-token picture) and the rule.
MAC: the .dmg and the Terminal bring the Metal engine; pictures only with the source build. AMD_HIP: the 24 GB
picture rule and the measured R9700 GPU reader. INTEL: the grouped XMX label is engine 0.1.45.3 (not 0.1.48), plus
the A750 prompt-hang fix (fca3c5958; STRATA_PF_DMA_PAGEABLE=1 restores the old copy). INTEL_ARC: maintainers now test
on a B70 and an A750; where the Intel engine comes from. OLDER_GPUS: the P100 sm_60 defaults (STRATA_SM60_PERF).
MULTI_GPU: two models on two cards, one make per engine. MODELS and TROUBLESHOOTING: the Mac and Intel Arc have no
picture reader yet.
Recorded with the hardware they were measured on, per the measured-numbers rule, because
neither can be fixed here: mm_gu3's fault is a threadgroup-count threshold of the
cooperative-tensor path on this GPU (the fix shape would change the M5's register-operand
GEMM), and router_route's race has no acquire atomic to fix it with on this Metal
(device-scope atomics are relaxed-only, macOS 26.6). Both are opt-in and off by default;
the engine's M1 defaults are the v2 expert GEMMs and the separate gemv + moe_route, which
run on this box.
Measured on an M1 Max (macOS 26.6.2, Q2_0): mm_gu3 with 35 threadgroups passes and 40
faults (data-independent; the engine's tile 16x32x32 SG 4 and the v3 test's 190 tiles both
fault). router_route's logits are bitwise gemv's, but two identical runs give different
ids, weights and plan.
Co-authored-by: Demetree Kallergis <1394829+demetree@users.noreply.github.com>
qsa_attn_mm and qsa_flash (metal/kernels/qsa_prompt.metal) fill their single-simdgroup
matmul2d right inputs with
rk[i] = id >= 0 ? half(float(kq[row * QD + k]) * float(ksc[...])) : half(0.0f);
and that shape - a select with the device load in the arm - loses the threadgroup on an M1
Max: every dispatch of the two kernels fails with
kIOGPUCommandBufferCallbackErrorInnocentVictim, deterministically, and they run only under
MTL_SHADER_VALIDATION=1. qsa_prompt_parity dispatches qsa_attn_mm the way the file intends
(it is the matrix-unit attention of a prompt chunk) and faulted on its first dispatch before
this change. The engine reaches the same fills through qsa_flash, which it dispatches under
STRATA_METAL_PROMPT_QSA=flash; its default on an M1/M4 is the fp32 qsa_attn, which never
touches these kernels - that is why the default prompt path kept running while the parity
test could not, and why this is measured on the test rather than on a request.
The row is now clamped with max(id, 0), the load is unconditional, and the select is on the
value. For an id >= 0 the value is what it was; for an id < 0 it was discarded either way, so
the results do not change.
Measured on an M1 Max (macOS 26.6.2, Metal compiler 32023): qsa_prompt_parity ALL PASS -
qsa_attn_mm vs qsa_attn rel L2 3.09e-04 (pos0 0) and 3.56e-04 (pos0 30000), qsa_flash 3.72e-04
and 4.22e-04, qsa_score_mm worst rel 2.66e-06 (T 96, within budget and with 2051 selected
cells a token); before the change the test faulted on its first dispatch and reported nothing.
The compile failure that started this - qsa_flash's cooperative_tensor copy, "cannot
initialize a parameter of type 'void *' with an rvalue of type 'const void *'" - is already
fixed in main (#2323); this change is the runtime half of the same two kernels' M1 Max
bring-up.
What it leaves alone: the COOP_K4 path (a function constant: compiled out of the M1/M4
pipelines), qsa.metal, and every host file; no CUDA, HIP or SYCL backend builds these kernels.
docs/MAC.md records the M1 Max with the measured tok/s (the hardware's medians, from the
benchmark report: chat decode 10.6, 4K prompt 223.7, 16K prompt 228.6 tok/s).
Co-authored-by: Demetree Kallergis <1394829+demetree@users.noreply.github.com>
stream.cpp: the standalone-mmap fallback (the prompt's buffers as their own allocation) sat inside the chunk loop behind the slot-class check, so it only ran when a chunk was big enough for the prompt's 1.60 GB of buffers. When the arena shrank below that at the start (the 24 GB M2: chunks of 0.8-1.0 GB), every chunk was skipped and the prompt stopped with 'no arena region for the prompt buffers'. Both standalone sites - a fitting chunk whose slots a class cannot spare, and no fitting chunk at all - now share standalone_region(); the fitting-chunk carve and the slot-class rule are unchanged.
This is the half of #2323 that 0.1.44.1 could not see: the hotfix's reporter ran a 96 GB M2 Max, where the arena's chunks are several GB and the prompt region always fits. On a 16-24 GB Mac running --mmap-experts, 0.1.44.1 still stops at the first prompt with 'metal prompt: no arena region for the prompt buffers'; this makes the standalone allocation run there too.
Verified on a 24 GB M2 (macOS 26.6.2, Qwen3.8-Flash-Next GSQ-RCO-Q2_0 streaming): the fallback line appears where the error used to be, prompts run end-to-end (3.7-4.1 tok/s steady in web chat, no crashes). That run predates the standalone_region() refactor, which moves the same statements into one function both call sites use.
docs/MAC.md: the small-arena note says the prompt's buffers also get their own allocation when no chunk of the arena is big enough for them.
The GPU's own wiring of the arena ends seconds after its last command buffer, and a Metal residency set did not hold it either
(wired memory 75 -> 3 GB between requests, measured with vm_stat and a probe). Idle, the arena is ordinary anonymous memory, and a
20 GB file written beside it made macOS compress tens of GB of it: the third panic (wired 2.4 GB, file cache 50 GB, compressor 1.9M pages).
mlock keeps it wired (STRATA_METAL_WIRE_ARENA=0/1, default on from 64 GB; not when the fill stopped early). Same write, arena wired,
full speed: compressor +0.7M pages (the engine's non-arena memory), 408 pages swapped, nothing else.
docs/MAC.md: the footprint cap, the wiring and the new variables.