Skip to content

feat(selection): Selection.trim, the fewest SFT rows your test can see - #961

Merged
jacobweiss2305 merged 2 commits into
mainfrom
feat/sft-trim
Oct 12, 2026
Merged

jacobweiss2305 merged 2 commits into
mainfrom
feat/sft-trim

Conversation

@jacobweiss2305

@jacobweiss2305 jacobweiss2305 commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

No issue: Jacob asked for a trim() that finds the fewest SFT rows that saturate a test (2026-10-12).

Selection.trim(): how many SFT rows still move your test, and which rows to keep. Guide: docs/trim.md.

for n in rows.trim_sizes():                       # 64, 128, ... len(rows)
    scores[n] = [train_and_eval(rows.trim(n), s) for s in (0, 1)]
kept = rows.trim(scores, base=base_scores)

What it does and the evidence

Piece Choice Source
Default order dedupe, then seeded random random within about 1 pt of every selector on curated pools: arXiv:2410.09335, 2410.15225
Opt-in orders diverse (k-means on embeddings), target (closest to dev set), bigram (offline) 2502.17184 (embedding diversity r 0.76-0.97, lexical about -0.3), 2503.01807 (RDS+)
Curve rectified, power, log-linear; best at predicting the largest size wins 2402.02314, 1712.00409, 2308.01825; selection by extrapolation, 2209.06640
Stop smallest n where a doubling gains < min_gain (0.01) progressive sampling (Provost 1999); not the eval CI, which made N* scale with test size
Uncertainty paired bootstrap over items + seeds, 90% range; detectable-gain check 2411.00640
Guards forecast past 2x largest size, not identifiable, flat 2507.00885

Check

Simulated curve with known N* = 3,716: fit says 5,330, 90% range 2,551 to 6,607. A curve stopped at 1,024 comes back forecast. N* stays put when the test grows from 200 to 2,000 items. 15 new tests; full suite 2,693 passed; ruff, mypy, no-hardcoding clean.

Open: no published numbers on SFT seed variance by subset size, or on selection for pools of a few hundred to a few thousand rows. Next step is running this on 3-4 real datasets.

🤖 Generated with Claude Code

Jacob Weiss and others added 2 commits October 12, 2026 14:34
trim(n) keeps the first n of one nested order (seeded random by default,
diverse / target with embeddings, bigram offline; duplicates last).
trim({n: scores}, base=) fits rectified, power and log-linear learning
curves, keeps the form that best predicts the largest size, and returns
N*, the smallest size past which a doubling gains under min_gain, with a
paired bootstrap range and a detectable-gain check.

Grounded in arXiv:2410.09335, 2410.15225, 2503.01807, 2502.17184,
2402.02314, 2209.06640, 2308.01825, 2411.00640, 2507.00885.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jacobweiss2305
jacobweiss2305 merged commit 71b52e7 into main Oct 12, 2026
18 checks passed
@jacobweiss2305
jacobweiss2305 deleted the feat/sft-trim branch October 12, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant