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 at7551f138(git checkout7551f138-- 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>
14 KiB
Relationship to upstream
Sources
| What | Where | Version |
|---|---|---|
Engines (strata, strata-poly), tools, docs |
https://github.com/VecSzn/PolyStrata | tag v0.1.45-poly.1, commit d0cd84dc6bd009d1d9e2191e4e28cc76b80f1ee3 |
| ggml, llama, common, mtmd, cpp-httplib | https://github.com/robertkarl/llama.cpp, branch UnbiasedStrata, as the submodule third_party/llama.cpp |
commit a6de9af3b19b5e3a5397f2c835a29a13c37664bd: ggml-org 3cf03257f219afbe7334045ff7c6a06ac68c627d (the commit upstream pins) plus the two parser commits below |
Commit 0197ae86 ("Import PolyStrata v0.1.45-poly.1 (d0cd84dc) unmodified") is the upstream tree, every tracked
file, with the same tree hash as upstream's commit. git diff 0197ae86 HEAD is the whole story of this fork;
git diff 0197ae86 HEAD -- src include is every change to the engines.
The history before that commit is UnbiasedStrata 1, a fork of Niko1221/Strata 0.1.39, ended at the tags
unbiasedstrata-1 and unbiasedstrata-1-muse-spark-native.
Rules
A thing is removed only when it (1) reaches the network during setup, build or start-up, (2) puts Python between a request and a token, (3) breaks or complicates the one-command build, or (4) is marketing. Everything else stays, built or not. Engine changes are bug fixes for the target (Linux x86-64, one NVIDIA GPU, Pascal or newer, CUDA 12.x), each recorded below with the file, the reason and the measurement.
Build (CMakeLists.txt, Makefile, .gitmodules, .gitignore)
- ggml from the submodule, not a fetch.
STRATA_GGML_DIRdefaults tothird_party/llama.cppand the configure stops with thegit submodule update --initline ifggml/CMakeLists.txtis missing. Upstream'sFetchContentof llama.cpp (the only network access of its build) is deleted. The three laterif(STRATA_GGML_DIR)blocks are unchanged; theirelse()branches are now dead..gitignoreno longer ignores/third_party/llama.cpp*. - llama.cpp changes are commits on a fork, not configure-time patches. The submodule points at
robertkarl/llama.cpp, branch
UnbiasedStrata: ggml-org3cf03257plus the two commits under "Changes to llama.cpp" below. Until 2026-10-19 the same changes werepatches/*.patch, applied to the submodule's working tree by CMake at configure (UnbiasedStrata 1 did it inmakeand in CMake both), which left the submodule dirty after every build and meant the pinned commit alone did not name the sources compiled. The pin now does;git statusis clean after a build. - llama.cpp's libraries for the front end. A second
add_subdirectoryof the submodule withLLAMA_BUILD_COMMONandLLAMA_BUILD_MTMDon and tests, tools, examples, server, app, UI, prebuilt UI, OpenSSL and llguidance off. It reuses the ggml targets configured above. Gated bySTRATA_FRONTEND(default on), not by CUDA, so the front end also builds on a machine without a GPU. - The front end,
unbiased-strata. Seven of llama.cpp'stools/serverfiles are compiled unmodified from the submodule into a static library (server-http,server-queue,server-task,server-common,server-chat,server-schema,server-stream): the HTTP layer, the task queue, the OpenAI request and result types, SSE framing, the request schema. The eighth,server-context.cpp, is bound tollama_contextand is replaced byfrontend/strata_context.cpp, which runs the engine as a child process over its line protocol (docs/BACKENDS.md) and uses a vocab-onlyllama_modelfor tokenizing, the chat template and the output parsers.server-http.cppreferences the web UI's asset table (ui.h, generated bytools/uiat build time, which downloads);frontend/ ui_stub/provides an empty one. No patch to llama.cpp was needed for this; the undocumented internal API oftools/serveris used as it is at the pinned commit. Makefile.make buildconfigures once and buildsstrata,strata-poly,strata_kqandunbiased-strataintobuild/bin/, not upstream'sall, which also builds about 70 parity and bench programs.make frontendbuilds the front end alone without CUDA intobuild-frontend/;make testbuilds and runs the front end's tests there against a fake engine (frontend/tests/): the adapter's cases and the HTTP surface a coding agent touches. The nvcc check applies only to thebuildandconfiguregoals.CUDA_ARCHSdefaults to61;75;86;89; an arch below 75 adds upstream'sSTRATA_EXPERIMENTAL_SM60(upstream's default is120, which needs CUDA 13).PORTABLE=1gives the AVX2 baseline instead of-march=native. One GCC for the C, C++ and nvcc host sides: the Makefile probesg++-15,g++-14, ... withnvcc -ccbinand passes the newest accepted one asCMAKE_C_COMPILER,CMAKE_CXX_COMPILERandCMAKE_CUDA_HOST_COMPILER. Without that, on a box whose defaultg++is newer than nvcc accepts (Debian 13 with CUDA 12.4: GCC 14 against a GCC 13 limit), the C++ files were compiled by GCC 14 and the CUDA files by GCC 13, andstratafailed to link on__cxa_call_terminate(upstream's installer handles the same case, its #1645).HOSTCXX=/usr/bin/g++-13overrides the probe.
Front end behaviour (frontend/), where it differs from llama-server or from upstream's server
Recorded here because a client written for one of the two may notice.
/healthreturns llama.cpp's{"status": "ok", "busy": ...}plus upstream's"service": "strata","loaded": true,"model","max_context"(commit453d3015). Upstream'stools/strata_bench.pyrefuses a server without the first two; the first step-9 fork arm was lost to that (the step-9 record's README; records are in history at7551f138,bench/unbiased/).- Streams always end with a usage chunk (empty
choices,usage,timings), as upstream's server does, whether or not the client sentstream_options.include_usage; llama-server sends it only on request (96f4ef1f). Same reason: the bench client readsprompt_tokensfrom it. - One slot. Requests are served one at a time in arrival order, as upstream's server does with one engine.
- No constrained decoding.
response_formatand tool schemas are parsed and used for output parsing, not enforced at the sampler, because the engine samples; logged once per such request. - Pictures are encoded in the front end (
--mmproj FILE, commit71886db0and after): llama.cpp's mtmd runs the projector and the front end writes upstream'sSVE1record file and sendsGENI … image_pad=<id> <file>, the protocol upstream's Python server spoke tostrata-vision. Projector width is checked against the model's embedding width at start. The default row budget is upstream's installer's (300 on the CPU, 1024 on the GPU;--image-max-tokensoverrides). The encoder runs on the CPU: the front end's ggml is built without CUDA, and--mmproj-gpuis refused when ggml has no GPU device (17e27213). Measured in 2026-10-18 on the A6000 (record in history at7551f138). --sse-ping-intervalis llama-server's (default 30 s); the measured Flash-Next runs used 10.- SIGTERM exits 1, not 0, after stopping the engine: the engine child dies with the process group and the front end reports it as an engine death with an empty message. Open; matters only to a service manager.
- Default
min_pis llama-server's 0.05 when a request omits it; upstream's server sends none. pi sends 0.
Changes to llama.cpp (robertkarl/llama.cpp, branch UnbiasedStrata)
Two commits on top of ggml-org 3cf03257; git -C third_party/llama.cpp diff 3cf03257 HEAD is exactly these.
9547d8d(common/parsers/qwen3-coder.cpp): the Qwen3-Coder tool-call grammar accepts a call's arguments in any order. Upstream takes the required ones first and the optional ones after; Qwen3.8 Flash-Next often writes the optional ones first (limit,offset,path), and because the grammar's tool-call group is optional and has no end anchor, such a call was dropped silently: the client gotfinish_reason=stopand an empty answer (UnbiasedStrata 1, 2026-10-08, REGINA-104). Qwen3.6's template routes to the same parser. Carried over from UnbiasedStrata 1 unchanged.a6de9af(common/chat-auto-parser-generator.cpp,common/parsers/deepseek.cpp): the same for every template the auto-generated PEG grammar serves (DeepSeek V4 Flash's DSML, GLM 5.3 Flash's<arg_key>form, and the rest). Upstream accepts the required arguments only in the schema's order, which holds when its own sampler is constrained by the grammar; this engine samples unconstrained, and both models wrotecontentbeforepathfor awritetool that declarespathfirst, so a finished, well-formed call was reported to the client as "output does not match the expected peg-native format" (PLAN.md step 13, 2026-10-19, USTRAT-7). Whether every required argument is present is left to the tool, as upstream already leaves it for optional-only tools.
Engine source (src/, include/)
No changes: git diff 0197ae86 HEAD -- src include is empty (checked 2026-10-18). The engines measured in step 9 are
these sources built in this tree; their binaries differ from upstream's build of the same sources, and the step-9
record says so where it matters.
Step 12 (harness bench/correctness/; record in history at 7551f138, bench/unbiased/correctness/; 2026-10-18) checked these builds against llama.cpp 3cf03257: upstream's
parity programs that cover the kernels in use (38 pass, poly_expert_parity fails its own bound on one UD-Q3_K_M expert),
and teacher-forced per-step distributions on 16 sequences per model (within llama.cpp's own CPU-vs-GPU spread on every set
and arm). Two upstream claims did not hold and are not repeated here: the draft block is not bitwise inert above 4-token
windows, and strata's output is not reproducible across starts unless the expert cache is pinned. Tickets USTRAT-1 to 5.
One test-only hunk since (2026-10-19, correctness checks of DeepSeek V4 Flash and GLM 5.3 Flash): src/poly/main.cpp
--tokens, --eos-ids and --follow accept @FILE (the comma-separated ids read from that file), because a 31K-id
list is over Linux's 128 KiB single-argument limit. tools/qwen35/q36_llama_dump.cpp (upstream's llama.cpp-side parity
program, not part of the build) takes the same @FILE for --tokens and --force. Nothing on the serve path changes.
Removed
Each entry names the rule above that it satisfies.
- Rule 1, installers and downloaders:
setup.py(8,223 lines: hardware detection, pip, CUDA, llama.cpp zips, prebuilt engines from GitHub releases, model files from Hugging Face or ModelScope, pack and MTP orchestration, run-config JSON, start),setup.sh,SETUP.bat,START-HERE.bat,UPDATE.bat,update.sh,Dockerfile,docker-entrypoint.sh,.dockerignore,flake.nix,flake.lock,requirements.txt(replaced bytools/requirements.txt: numpy and regex, for the offline tools only),conftest.py(pytest root forsetup.py's tests),tools/strata_mcp.py(an installer driven over MCP),tools/image/(stable-diffusion.cpp, Vulkan SDK and model downloads),tools/hip/package_windows.py(AMD nightly wheels), and their tests (tools/test_setup_*.pywith two golden JSONs,test_strata_mcp.py,test_qimage.py,test_docker_entrypoint.py,test_poly_prebuilt.py). The jobs ofsetup.pythat were not downloads (choosing engine flags per card, RAM and context) become documented flags inREADME.md. - Rule 2, Python in the serving path:
serve/(92 files, 33.9k lines: the HTTP server with the OpenAI, Anthropic and Responses dialects, the jinja2 chat templating, the Python tokenizer path, the per-family reasoning and tool-call parsers, MCP, structured output, replicas, Prometheus, the hardware monitor, the web UI and 58 test files) andpolystrata.py(the terminal front end, which importsserve/). Replaced by the C++ front end infrontend/, built from the pinned llama.cpp'scommon,mtmd,cpp-httpliband the engine-agnostic files oftools/server. The engines' stdin/stdout protocol is unchanged. - Rule 4, marketing: the six translated READMEs (383 KB),
docs/media/(12 MB: a 9.6 MB demo video still, a 1.8 MB GIF, the figure SVGs and their generator),.github/(issue and PR templates),SECURITY.md(the upstream project's advisory process) andAGENTS.md(contributor notes for upstream's tests and installers).README.mdis rewritten for this fork (PLAN.md step 10); the fork's model-file record isdocs/MODEL-FILES.md, its measurements are the "Measured" section ofREADME.md(records in history at7551f138). - Documents only removed components (decided 2026-10-17):
docs/INSTALL.md,AI_SETUP.md,MCP_SERVER.md,IMAGES.md,LLAMA_SWAP.md,COMMUNITY_BENCHMARKS.md,FAQ.md;chat.py(a terminal client) andtools/calibrate.py(importssetupandserve.server), with their tests. - Scripts that imported removed modules (decided 2026-10-17): the engine gate scripts that drove the engine
through the Python server's
StrataEngineclass (tools/batch_groups_cache_test.py,cancel_park_test.py,conversation_cache_*.py,conversation_restore_speed.py,logit_bias_english_example.py,logit_bias_http_probe.py,session_pressure_test.py),tools/strata_bench.pywithbench.shandBENCH.bat(one helper fromsetup),tools/make_poly_release.py, and the tests that importedsetuporserve(test_mtp_fetch.py,test_shards.py,test_strata_tokenizer.py,test_effort_end_args.py,test_research_run.py,test_benchmark_prompt.py,test_dll_closure.py,test_windows_amd_gpu.py, thetest_conversation_cache_*andtest_strata_bench.py). Upstream's copies run against upstream. - Per-machine results and logs (decided 2026-10-19): upstream's
bench/results/(23 MB, one directory per community machine) and the fork's ownbench/unbiased/run directories (57 MB). A result from one machine is a record, not source; the numbers that matter are inREADME.md"Measured", and the directories are in history at7551f138.bench/keeps what is reusable:bench_vs_llama.pywithprofile_corpus.json, the kernel probes, andbench/correctness/(the step-12 harness, moved frombench/unbiased/correctness/scripts/).