docs/DEEPSEEK41.md records the engine-only benchmarks (the CPU lane is the
critical path on a Ryzen 1700; the opt-in zero-copy store moves two thirds
of it onto the card: 2.0 -> 3.3 tok/s alone, 4.5 to 6.9 through the front
end) and the template finding: the ISTA GGUF's template spells the DSML
tags the pre-1017 way, the official and Unsloth templates need a dict()
the pinned minja lacks, so data/dsv41/chat_template-ista-1017.jinja is
the GGUF's template with the five tags written out. README run line
updated to match.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
UPSTREAM.md gets the two new source rows and a section on what was taken
from Strata v0.2.4 and what was not; docs/DEEPSEEK41.md is rewritten for
this fork (files, pack recipe, run line, what is and is not there) in
place of upstream's installer-centred text; the README lists the third
engine and its run line.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
From Niko1221/Strata tag v0.2.4 (commit 96ca4383, 2026-10-24), unmodified: src/dsv41/ (the engine and its vendored
EXL3 / sampler / window kernels), include/strata/dsv41/, tests/dsv41/, tools/dsv41/{pack_gguf,smoke,tune}.py,
data/dsv41/ (the shipped hot-expert profiles), tools/trellis/tqenc.{cpp,hpp} (the tests' encoder),
third_party/project-maya/ (the MIT notice: the engine is a port of Project Maya's maya-ds4),
third_party/ggml/ggml-common-tq.h, docs/DEEPSEEK41.md (upstream's text, to be rewritten for this fork).
src/kernels/cpu: upstream's iq_avx2.{cpp,hpp}, iq_avx2_rows.inl, iq_avx512.{cpp,hpp} replace this fork's
(v0.1.45-poly.1) copies - they add the engine's CPU lane rows iq256x_rows / iq512x_rows and leave the main engine's
iq256_* / iq512_* as they were (upstream's statement; iq_avx2_parity is the check) - and the trellis CPU lane
tq_cpu.{hpp,cpp}, tq_avx2.cpp, tq_avx512.cpp, tq_states.hpp, tq_computed.hpp is new. expert_layout.hpp stays at
layout version 4 (upstream's 5 adds Hadamard-folded packs this fork has no use for yet).
CMakeLists.txt: upstream's strata-dsv41 block, with ggml.h / ggml-cpu.h coming through strata_kernels_cpu's ggml-cpu
link from the submodule (no FetchContent), the tq sources and flags in strata_kernels_cpu, and iq_avx512.cpp built
with -mavx512vpopcntdq -mbmi2 as upstream does (iq512x_rows uses them). Makefile: STRATA_BUILD_DSV41=ON and
strata-dsv41 among the targets `make build` produces.
Target: ISTA-DASLab/DeepSeek-V4.1-Flash-1017-GSQ-RCO-GGUF (IQ1_M / IQ2_XXS + the IQ4_NL Engram) on the A6000 VM.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Measured 2026-10-20 on a 16 GB VRAM frame (Coder IQ1_M, RTX 3090; IQ2_XS, RTX 4090 in a 32 GiB VM):
arena vs --resident-experts vs --mmap-experts, --ple-io direct vs mmap, and why a RAM number read as
RSS alone lies when the n-gram table is mapped. README links the page and the pre-built MTP directory
at huggingface.co/robertkarl/UnbiasedStrataPacks.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Closes#15. tools/vm/serve-{glm,qfn}-a6000.sh were the launch lines of one machine (its NVMe paths, ports, tmux
habits); they go. The bench/correctness runners (parity-run.sh, check-batch.sh, make-inputs.py, strata-run.py)
stay, since they are the procedure CORRECTNESS-PLAN.md describes, but read US2_MODELS (required), US2_BUILD
(default: this repository) and US2_RESULTS (default ~/us2-results/correctness) instead of /mnt/ds4 and ~/us2-build.
docs/MODEL-FILES.md names no machine's paths any more; the REAP50 row gives the serve command itself.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Upstream's bench/results/ (23 MB, one directory per community machine) and the fork's bench/unbiased/ run
directories (57 MB: step 6 to 9, 13, the 4090 run, the correctness record) are removed. A result from one machine
is a record, not source; the numbers that matter are in README.md "Measured", and the directories stay in history
at 7551f138 (git checkout 7551f138 -- bench/unbiased bench/results). bench/ keeps bench_vs_llama.py with its
corpus, the kernel probes, and bench/correctness/, the step-12 teacher-forced harness moved from
bench/unbiased/correctness/scripts/ without its per-campaign chain-*.sh glue (it writes under ~/us2-results/, not
in the tree). README, UPSTREAM.md, PLAN.md, docs/MODEL-FILES.md and docs/CORRECTNESS-PLAN.md point at the history
commit where they cited the directories.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The two tool-call parser changes that CMake applied to the submodule's working tree at every configure are now
commits 9547d8d and a6de9af on the fork's branch, and the submodule pins that branch's tip. The pinned commit alone
names the sources compiled, the submodule is clean after a build, and a bump of the pin that breaks the parser
changes fails in git, not in configure. patches/ and the CMake loop are removed; README, UPSTREAM.md, PLAN.md and
docs/CORRECTNESS-PLAN.md say where the changes live now. make test passes on the CUDA-free front-end build.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Record section 8: T2 holds on every set and arm (DeepSeek 0.69-1.06x, GLM 0.89-1.13x the CPU-vs-GPU floor); T1 flips at
3 and 5 margin positions where both llama.cpp runs agree (USTRAT-10); the GLM draft arm is not bitwise the base arm
because the draft block's VRAM moves 52 experts to the CPU (USTRAT-9); llama.cpp master's CPU run drifts from the
pinned reference by as much as the engine does (USTRAT-11). GLM reference = master 99db719b (pinned lacks glm5-next).
Inputs, top-20 reference extracts, engine outputs, scores, logs and the pod scripts as run; MODEL-FILES rows filled;
PLAN step 12 addendum; README sentence.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
bench/unbiased/2026-10-19-step13-acceptance/: results (per-run table, tally, reading of the non-passes), API-only
acceptance on five served models (A6000 Qwen3.6 IQ4_XS; RTX 3090 Flash-Next IQ3_XXS at 24 and 15 pool workers and
Qwen3.6 Q3_K_M; B200 DeepSeek V4 Flash and GLM 5.3 Flash), findings 1-8, server lines and engine info.
Outcome: every model completes md-toc, kvstore, bugfix and Minesweeper (and Minesweeper at temperature 1.0, except the
A6000 IQ4_XS page with a ReferenceError of its own) through the fork's server; DeepSeek and GLM after this step's two
fixes. API checks within 15 % of step 9 on the 3090 (Flash-Next only at --pool-workers 15, now the pod's start line);
first B200 figures recorded.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
patches/llama.cpp-any-argument-order.patch (common/chat-auto-parser-generator.cpp, common/parsers/deepseek.cpp):
the generated tool-call grammars accept required arguments in any order. Upstream takes them in schema order,
which holds when its own sampler is grammar-constrained; this engine samples unconstrained, and DeepSeek V4
Flash and GLM 5.3 Flash both wrote content before path for pi's write tool, so finished calls came back as
parse errors (USTRAT-7). Same fix the fork already carries for the Qwen3-Coder parser. GLM's md-toc run passes
with it; DeepSeek rerun in progress.
tools/acceptance: 300 s per-tool-call watchdog inside the container; the minesweeper judge serves the work tree
over HTTP (the headless browser refuses file: URLs) and counts errors correctly; rejudge.sh, summarize.py;
pi max output 24576 tokens. tools/pod/bringup.sh copies data/expert-profile.bin into the Flash-Next pack (the
engine exits without it). docs/MODEL-FILES.md: DeepSeek V4 Flash UD-IQ2_XXS and GLM 5.3 Flash 3.0bit rows
with hashes and first-start results on the 2x B200 pod. bench/unbiased/2026-10-19-step13-acceptance/: record
in progress (server lines, engine info, findings; result tables to follow).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Configuration A on the A6000 VM: llama.cpp 3cf03257 reference as a partial offload (28 of 48 layers) and a CPU run;
strata arms fp16, t4 (4-token windows), int8, int8str (streamed KV), pf512 (512-token prompt chunks), pin (every
expert on the card), cpu (fixed smaller cache, every miss on the CPU pool), pcie, and T0 repeats. T2 passes every set
in every arm (0.67-0.94x the reference's own CPU-vs-GPU spread); T1 fails at 0-4 of ~2,880 margin positions per arm,
six near-tie positions, none in every arm. check-batch 4 passes on both Qwen3.6 files.
Findings 4-6: strata's bits depend on the free VRAM at start (--expert-cache auto; CPU-computed misses round
differently) unless the expert cache is pinned, under which repeats, window sizes, KV streaming and the CPU tier are
bitwise reproducible; six Flash-Next T1 flips; the PCIe-fetched expert differs from the cached one on 18 rows of one
sequence. Tickets USTRAT-1 to 5.
Also: scripts as run (two-request scheme for long sequences, realign, the pinned and CPU-tier arms, check-batch,
chains), logs, scores, reference top-20 and sha256; STRATA_DUMP_THREADS in the dump tool (thread count moves no
bits, probes/cpu-threads); docs/MODEL-FILES.md gets the correctness column and the LFS-pointer note; README.md and
UPSTREAM.md state the results and the two upstream claims that did not hold; PLAN.md row 12 done.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Written by a planning agent (session c2843167); the user read it and approved
the checks as proposed. Step 12 runs them.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
bench/unbiased/2026-10-18-a6000-qwen36-iq4xs-images-step8/: four runs (API uncapped
2040 rows 146 s, API with --mmproj-gpu which ran on the CPU, API at the 300-row
default 15 s, and through pi 0.85.1 with @facts.png), six of six facts each time;
projector width checked at start. docs/MODEL-FILES.md gains the mmproj-F16 row.
README: run line with --mmproj, the limits (CPU encoder, quadratic in rows).
UPSTREAM.md: the --mmproj bullet replaced by what the front end does. PLAN row 8.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
bench/unbiased/2026-10-17-3090pod-step9/: four arms (upstream and fork, Flash-Next
IQ3_XXS and Qwen3.6 UD-Q3_K_M), upstream's tools/strata_bench.py --runs 3 --long plus
the three-document sustained supplement, raw client output, server logs, provenance
(engine sha256, fork commit), the runner, the launch logs, and a README with the
comparison tables and the two client-compatibility gaps found on the way.
Flash-Next: fork faster on every workload (chat 103.1 vs 87.1 tok/s, sustained
119.1 vs 105.1, prefill 2065/2531/2616 vs 1924/2342/2393). Qwen3.6: decode within
the run-to-run range; 4K prefill 4.7 % faster; 16K prefill 2.3 % slower with
non-overlapping ranges, recorded as a finding to explain. Engines were built
separately in each tree, so a build difference is not excluded.
PLAN.md section 11 and the step table, docs/MODEL-FILES.md statuses updated.
Row 3 (pi wall time) pending.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
frontend/tests/shapes-real-engine.sh runs seven request shapes against a live server (PLAN.md section 9, step 7): no
max_tokens; max_tokens 32768; a prior assistant message with reasoning_content and tool_calls followed by a tool
result; two tool calls asked for in one turn; a call with its optional arguments before the required one; a client
that disconnects two seconds into a stream, then a clean request; an 18k-token prompt streamed, timing the first byte
and counting SSE pings. Records: bench/unbiased/2026-10-17-{a6000-qwen36-ud-iq4xs-mtp,3090pod-flash-next-iq3xxs}-step7-
shapes/ and -step7-pi/, plus the A6000's Qwen3.6 UD-Q3_K_M smoke (…-a6000-qwen36-ud-q3km-mtp-step6/). docs/MODEL-FILES.md
describes the checks and the SSE ping default.
Verified 2026-10-17:
- Qwen3.6 UD-IQ4_XS on the A6000 and Flash-Next IQ3_XXS on the 3090 pod answer all seven shapes. Without max_tokens the
front end fills the context (n_predict 32,747); max_tokens 32,768 beyond the context is clamped, not refused; the
reasoning_content history is accepted and answered from the tool result; the optional-arguments-first call parses
("limit", "offset", then "path"); the disconnected stream is cancelled at the engine (finish=cancel after 387 and 172
tokens) and the next request answers in 0.09 s and 0.24 s; the 18,589-token prompt streams its first byte after 5.2 s
(Qwen3.6, A6000) and 8.0 s (Flash-Next, pod). Qwen3.6 issued the two parallel calls asked for; Flash-Next chose one
bash call instead, which is the model's choice, not a parsing fault. No ping was seen because the pinned server pings
after 30 s of silence (--sse-ping-interval); the run lines will set it lower for long prompts.
- pi 0.85.1 against Flash-Next on the pod completed the same multi-step task as against Qwen3.6: read, --json flag, 7
unittest tests, all passing, one commit (it also noticed and untracked __pycache__). 17 requests, 16 finish=stop and
the one cancel from the shapes run, prompts up to 4,644 tokens, max_tokens 32,768 passed through, no parse failure.
- Qwen3.6 UD-Q3_K_M (8966dd0c...) on the A6000: all six smoke checks, 214 to 235 tokens/s decode on short prompts.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
bench/unbiased/2026-10-17-3090pod-qwen36-ud-{q3km,iq4xs}-mtp-step6/: launch scripts (strata-poly with upstream
setup.py's flags for the qwen36 family), the model files' SHA-256 (8966dd0c... and df27a780..., both from
unsloth/Qwen3.6-35B-A3B-MTP-GGUF at 5bc3e238, equal to the Hugging Face LFS object ids), the engine's info lines and
the raw smoke responses. bench/unbiased/2026-10-17-a6000-qwen36-ud-iq4xs-mtp-step7-pi/: pi's transcript, the diff it
committed in the scratch project, the provider entry it ran with, and the server-side summary of the session.
Verified 2026-10-17 on the RTX 3090 pod, through the front end: both files serve all six smoke checks. UD-Q3_K_M:
211 to 227 tokens/s decode on short prompts, 105 of 120 drafts accepted on the thinking request; UD-IQ4_XS: 205 to
245 tokens/s, 273 of 295. The greedy answer is the same as Flash-Next's and the A6000's. The pi session on the A6000
(13 requests, prompts growing from 453 to 5,520 tokens, max_tokens 23,181 to 28,229, no min_p) had 13 DONE lines, 12
finish=stop and 1 finish=length, no tool-call parse failure and no error or warning other than the expected
"a grammar was requested; this engine does not constrain sampling, parsing only".
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Records under bench/unbiased/, one directory per box and model: the exact launch script, the fork commit, the engine's
info lines and the raw responses of frontend/tests/smoke-real-engine.sh (health, /v1/models, a greedy chat without
thinking, a sampled chat with thinking, a stream, a tool call). docs/MODEL-FILES.md tracks every model file tried, by
source repository, size and SHA-256, with its status; the same quantization from two Unsloth repositories is two rows,
because only the Qwen3.6-35B-A3B-MTP-GGUF files carry the draft block. Upstream's docs/MODELS.md is unchanged.
Verified 2026-10-17:
- Flash-Next GSQ-RCO IQ3_XXS on `strata`, with the pack, the expert profile, spec 4 and MTP exactly as upstream
PolyStrata v0.1.45-poly.1 ran it on the RTX 3090 pod on 2026-10-17: the front end serves all six checks on the pod
and on the A6000 VM. The greedy answer ("101\n103\n107", 12 completion tokens) is the same on both boxes and the same
as upstream PolyStrata's Python server on the same engine binary and files on the pod (upstream-compare/), which is
the step-6 gate of PLAN.md section 9.
- Qwen3.6-35B-A3B UD-IQ4_XS (MTP repository, SHA-256 df27a780...) on `strata-poly` with upstream setup.py's flags for
the family: all six checks on the A6000, 207 to 215 tokens/s decode on short prompts, 83% of drafts accepted. The
stream check ended by max_tokens with thinking on, as expected for a 200-token cap.
- Through an SSH tunnel, pi 0.85.1 with an openai-completions provider pointed at the Qwen3.6 server completed a
multi-step task in one run: read two files, added a --json flag, wrote 11 unittest tests, ran them, fixed nothing,
committed. pi sent no max_tokens cap below 28,229 and no min_p; the front end passed both through.
- The pod's /workspace is a geesefs FUSE volume that stalls to a few MB/s when the engine fills its expert cache from
it while anything writes; the engine then never becomes ready. bench/unbiased/*3090pod*/stage.sh stages the files
on the container disk (hashes of pack and MTP checked against the pod's artifacts.sha256, shard sizes equal).
Not yet: a speed comparison (the pod's fork decode on the two short smoke prompts was 64 tok/s against upstream's
112 tok/s sustained benchmark; step 9 measures both the same way), Qwen3.6 UD-Q3_K_M (downloaded and hashed, not run).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Seven docs pages that describe only removed components, the stdlib terminal
client, and the calibration tool that imports setup and serve.server, with
their tests. UPSTREAM.md records the cut and lists the tool scripts that stay
in the tree although they import removed modules.
Verified: nothing in the build references the removed files (grep).
Six README translations, docs/media, .github templates, SECURITY.md and
AGENTS.md. README.md stays until it is rewritten for the fork; its image links
are broken meanwhile. UPSTREAM.md records the cut.
Verified: nothing in the build references docs/media or .github (grep).
The upstream release tree, every tracked file byte for byte, from
https://github.com/VecSzn/PolyStrata at tag v0.1.45-poly.1, commit
d0cd84dc6bd009d1d9e2191e4e28cc76b80f1ee3. Nothing added, removed or edited;
git diff against this commit is the whole story of the fork.
Verified: the commit's tree hash equals the upstream commit's tree hash.
Every tracked file, .gitignore, .gitmodules and both submodules (llama.cpp at
3cf03257, llama-muse at 335916a) are removed so the next commit can import
PolyStrata v0.1.45-poly.1 unmodified and be the diff baseline of the fork.
UnbiasedStrata 1 remains at tags unbiasedstrata-1 (main, b124b59) and
unbiasedstrata-1-muse-spark-native (4c824e6).
Verified: git ls-files is empty; the working directory holds only .git.
No engine change. The '2000, DMA' runs were not GPU-only: the window stages
16 blobs and the rest of a layer's misses run on the CPU. Without overflow
the 1080 Ti's GPU path gives the same bytes at either cache size, as the 4090
does. llama.cpp on a second back end misses the rule against its own 4090
run on both fixtures; against the F32 oracle the engine is inside it on both
cards.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
Two causes, both a choice between numerically different correct paths: a missed expert computed on the CPU
against the same expert on the GPU once the adaptive tier has brought it in, and a prompt state built by the
verify windows against the batched prompt path. Every single-path configuration repeats bit for bit; every
state scored against llama.cpp teacher-forced along its own tokens passes the rule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
From the second Codex review of fa69e82. The engine's READY line carries
the context it allocated (`READY <max_context> stop`); when its VRAM plan
lowered the request, the front end kept validating prompts against --ctx
and announcing it. It now reads the figure, bounds requests by it and
says so. The automatic mapped-experts choice is not taken with an
explicit --shared-expert-arena or with the multi-GPU helpers. The plan's
session term keeps the RoPE table sized at the requested context when
lowering (at most 32 MiB conservative from 262,144 to 131,072): noted in
docs/qwen36-port/step5-serve.md, not threaded through the plan.
main.cpp syntax-checked on the Mac; the CUDA build follows when a card is
between measurements.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
What the engine now does with a Qwen3.6 pack, the hunks (file:line) in the
shared generate.cpp and verify.cpp, the three tests and their tolerances, and
the results: the window and runner tests pass on the 4090; IQ3_XXS and Q4_K_XL
teacher-force to llama.cpp at 61-64/64 top-1 with no rising drift; the step-3
parity suite is 100% of 33 after the gate lift. The 1080 Ti pass and the Q4
11 GB fit are the remaining items, blocked on the card's lock; the chat template
finding is REGINA-104.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
The MTP drafter's ring runs qsa_decode_attn_batch at its --mtp-window (32,768 by default: 512 blocks), so the 128-block cap had moved Flash-Next's drafter onto the online-rescale kernel with another summation order and a smaller scratch. qsa_decode_attn_chunks(cap, s) and the scratch take the shape: sparse keeps ceil(cap / 64) blocks and the old formula, dense is bounded at 128; below sm_75 every sparse shape runs the single-chunk kernel, so Flash-Next's path is the previous kernel, grid and scratch bit for bit at every capacity. The test holds sparse 32,768 -> 512 blocks and the old scratch; the notes state the drafter's case.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr
GPU against the float reference: 2e-2 (oracle-crosscheck.md: the Q8 oracle's ffn_moe_out max 5.3e-3 with the 4x
margin; Qwen3.6's five pairs measure 9.7e-3 to 1.3e-2), 3e-2 only for a pair with a Q5_0 role (q4_K/q5_0 measures
2.7e-2 at 2560 x 640, the pair the CMake note already describes). CPU against the reference stays at 3e-2: ggml-cpu
rounds the activations to Q8_K, one scale per 256 values against the GPU's q8_1 per 32 (measured up to 2.2e-2).
CPU against GPU, printed but never gated before, gets 4e-2 (both roundings, measured up to 2.4e-2). Each line prints
its bound. RTX 4090: 15 of 15 ctests, both real files at layers 0 / 34 / 39, q4_K/q5_0 and q5_0/q8_0 pass.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017tPVMg2wGSNR1KANEiUtwr