feat(v0.4-alpha): llmlingua_style selector + 11-family paired-task corpus - #4
Merged
Merged
Conversation
A perplexity-free LLMLingua-style keep/drop selector: ranks units by mean per-token self-information (surprisal, -log2 P(token)) under a document-derived unigram model — a deterministic stand-in for LLMLingua's small-LM perplexity (the real method needs an LM at inference, deferred per model-research.md). Query-independent but information-theoretic, so boilerplate ranks low and rare/surprising content ranks high. Gate green (36 checks). Also refreshes the deferred lists: deterministic-tokenfold (PR #3) and llmlingua_style are no longer deferred; RTK and the Headroom Kompress-v2 sweep remain.
Adds 8 Tier-A fixtures spanning the model-research.md required slices: long_context_needle, code_build_error, code_patch, tool_call_json, log_multi_service, ccr_marker, and the project-disjoint rust_holdout + typescript_holdout hard slices. Authored + self-validated against the live gate and adversarially verified (8/8 confirmed) so each passes the gate AND genuinely differentiates selectors (>=1 selector fails at the 25% ceiling). Full 11-fixture gate: pass (132 checks). The richer report now discriminates: bm25 is the strongest deterministic selector (0.82 task @ 0.25), query-independent selectors are weak on query-driven tasks, and deterministic-tokenfold stays safe (1.0 task) but can't hit aggressive budgets (0.937) — the two gaps a learned selector must close.
Add fixtures 010-015 for all 11 Tier-A families, each with a notes field documenting why the fixture discriminates selectors. Gate-validated (eval/run_baselines.py --gate passes, 924 rows checked). Also documents the AgentMemory project-slug convention already used by this repo's local memory directory.
This was referenced Jul 27, 2026
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
Advances v0.4-alpha (Phase 8, F-057) toward its "reproducible baseline report" exit: adds the last buildable deterministic selector and expands the paired-task corpus from 3 to 11 families. Still shadow-only, no ML, nothing served —
develop-targeted research.What's in it
llmlingua_styleselector — a perplexity-free LLMLingua-style proxy: ranks units by mean per-token self-information (surprisal,-log2 P(token)) under a document-derived unigram model. A deterministic stand-in for LLMLingua's small-LM perplexity (the real method needs an LM at inference, deferred per model-research.md). That's the last lightweight selector; RTK (external tool) and the Kompress-v2 sweep (ML checkpoint) remain deferred.long_context_needle,code_build_error,code_patch,tool_call_json,log_multi_service,ccr_marker, and the project-disjointrust_holdout+typescript_holdouthard slices.The report now discriminates
Two gaps a learned selector must close: match bm25's 0.82 task success at aggressive ratios (and be more robust across task types), or match tokenfold's safety (1.0) at real compression.
Testing
python eval/run_baselines.py --gate→ pass, 132 checks (6 selectors × 11 fixtures × 2 ratios): universal critical-atom survival, ceiling respected, keep_all upper bound.Still deferred
RTK / RTK+tokenfold (external tool) and the unmodified Kompress-v2 achieved-token sweep (ML checkpoint); Tier-B public-repo corpora with license/revision manifests + project-disjoint splits; structural segmentation; LLM-judge failure diagnosis.