feat(v0.4-alpha): deterministic-tokenfold compressor baseline - #3
Merged
Conversation
The primary 'baseline to beat': runs the real tokenfold Rust CLI (compress --target-tokens)
as a whole-pipeline best-effort compressor, distinct from the unit-ranking selectors. It does
NOT get the harness's critical-atom forcing or hard ceiling, so its survival/ratio are measured
not asserted. Discovered via TOKENFOLD_BIN -> target/{release,debug} -> PATH; cleanly skipped
(n/a) when absent so the harness still runs build-less. On the current Tier-A fixtures it shows
the key gap the learned selector must close: lossless-safe (task+crit survival = 1.0) but
achieves only ~0.87 and can't reach the 0.5/0.25 budgets on low-repetition inputs.
Also makes task-answer containment whitespace-insensitive so a lossless reformat (JSON minify)
still counts as surviving (selector results unchanged), and gitignores Python __pycache__.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the
deterministic-tokenfoldbaseline to the v0.4-alpha harness (F-057) — the primary "baseline to beat" frommodel-research.md. It runs the real tokenfold Rust CLI as a whole-pipeline compressor so the learned selector (v0.4-beta) can be measured against the deterministic pipeline it must improve on.What's in it
deterministic-tokenfoldshells out totokenfold compress --target-tokens <budget>. Because it's a whole-pipeline best-effort compressor, the harness does not force critical atoms through it or enforce the exact ceiling — its critical-atom survival and achieved ratio are measured, not asserted (honest: a selector gets guarantees the CLI can't).TOKENFOLD_BIN→ localtarget/{release,debug}→PATH; when absent the baseline is cleanly skipped (n/a) and the report/gate say so, so the harness still runs in a build-less CI. Verified both paths."max_results": 25→"max_results":25) still counts as surviving. Selector scores are unchanged..gitignorenow covers Python__pycache__.The finding
deterministic-tokenfoldis lossless/evidence-safe (task + critical survival ≈ 1.0) but only reaches ~0.87 and cannot hit the 0.5/0.25 budgets on these low-repetition inputs (over_budget), while the aggressive selectors hit the budget but drop task success. That gap — safe-but-limited-ratio vs. aggressive-but-lossy — is precisely what a learned selector must close.Testing
python eval/run_baselines.py --gate→ pass (30 selector invariant checks;tokenfold_availablereported). Verified the graceful-skip path (binary absent →n/a, gate still passes).Still deferred
RTK / RTK+tokenfold (external tool), LLMLingua-style selector, Headroom Kompress-v2 achieved-token sweep; Tier-B public-repo corpora + project-disjoint splits; structural segmentation; real paired build/test execution.