Commit Graph
6 Commits
Author SHA1 Message Date
Niko1221 4558513fa9 tools/force_check.py: the neutral-writer gate for prompt-arithmetic changes (cut, gen-neutral, gate)
Owner decision 11-10: the forced-token check of a change of the prompt arithmetic (a prompt kernel, an expert format's prompt path) uses a
neutral third program as the writer of the forced text.

- `cut`: prompt cuts of one long id file at fixed offsets (the cuts of the 11-10 runs) -> a corpus.
- `gen-neutral`: llama.cpp's llama-server on the same GGUF writes the greedy continuations; the prompt goes in as token ids (the ids `score`
  feeds the engine), temperature 0 / top_k 1, no prompt cache, the ids read back (return_tokens); the set is marked "writer": "neutral".
- `gate`: scores the neutral set through stock twice and the candidate twice (--path decode); PASS = each candidate arm passes the rate
  rule and the event rule against the two stock arms, REJECT if any is rejected, else INCONCLUSIVE; the reversed direction is written to
  gate.json and not required.  It refuses an engine-written set (--allow-engine-writer for a diagnostic).
- The stock-written gen / score / check stays, labelled as a diagnostic that measures the distance from the writer.

Why, in the help with the numbers: on stock-written text the FP16 prompt path (the KL reference) failed by more than the kernel under test
(+1.66 points against +1.14, IQ3_XXS, R9700); with the candidate writing, stock failed by the same margin (+1.69 / +1.56); with llama.cpp
writing, the candidate passed every pairing (R9700 v31 -0.39 / -0.33, IQ3_XXS -0.16 twice; A6000 v31 48 prompts +0.21 / +0.16).

Tests: tools/test_force_check_neutral.py (a stand-in llama-server for /health and /completion, synthetic arms for the two directions, the
refusal of an engine-written set).  l620: the new tests 9 passed, selftest ok, tools/check py-tools 1759 passed, docs passed.
2026-11-10 09:33:27 +01:00
Niko1221 506f65781e Remove unused imports reported by Ruff F401 (cleanup 4.3)
60 files, 94 names: strata_control, strata_cli, serve, integrations/harness,
metal/setup_mac.py, packaging/make_local_feed.py, sycl/tools/fixups.py and the
tools/ scripts. Left alone: test files and tests/, bench/results, __init__.py
re-exports, apps/host/audit-fixes (moving in 3.5), tools/dflash2/final_tables.py
(its exec() uses the namespace), tools/nvfp4_verify_gguf.py (torch) and the
platform import in strata_control/doctor.py (tests patch doctor.platform).
2026-11-07 16:28:41 +01:00
Niko1221 f281e3fe26 force_check.py: absolute path for the profile copy
(cherry picked from commit 1fb1e134809f6015c72802f19a99d70a1b1636db)
2026-11-06 15:47:43 +01:00
Niko1221 f46e88d610 force_check.py: cfg profile_src gives each engine start a fresh copy of the expert profile
(cherry picked from commit e47164c8e9d4d0ae0826d10177cc4d74369ec0bf)
2026-11-06 15:47:43 +01:00
Niko1221 d486fbe7d6 serve: STRATA_FOLLOW / STRATA_FOLLOW_LOGPOS token forcing through the real decode/verify windows (test and measurement only, off by default); force_check.py score --path decode
(cherry picked from commit af68878f0cc4c5aa4618da8f96b10f9262230721)
2026-11-06 15:47:43 +01:00
Niko1221 65909b2d0f verify: STRATA_VERIFY_PROFILE and STRATA_ROUTE_STATS reports cover windows up to 16 rows (measurement only; default behaviour unchanged); tools/force_check.py: the token-forcing check (scorer driver + the paper's two rules)
(cherry picked from commit b3b8c1d5a088c998947895a3a4007138b085da66)
2026-11-06 15:47:43 +01:00