Skip to content

eval: close exp_legal memorization holes (seeded pick + data-quality gates) - #195

Merged
george-connito merged 1 commit into
masterfrom
fix/exp-legal-eval-data
Jul 24, 2026
Merged

eval: close exp_legal memorization holes (seeded pick + data-quality gates)#195
george-connito merged 1 commit into
masterfrom
fix/exp-legal-eval-data

Conversation

@george-connito

Copy link
Copy Markdown
Collaborator

Miners scored val_loss ≈ 0.04 vs baselines of 4.5–12.5 (perplexity ~1.04) with all miners within 0.0006 of each other. Root cause is the eval data layer, not the seed: the MinerCommit2 block-hash seed (PR #175/#177) was verified correct on chain for all completed rounds.

Validated on the live validator by reproducing the round-8670446 eval stream with production code:

  • exp_legal still ran the legacy head-of-stream path (§2 shortcut of docs/exp-legal-migration-plan.md) — the whole draw came from the head of one sub-file;
  • 38% of streamed Multi_Legal_Pile rows have empty text → all-padding batches → NaN loss → silently excluded from the scored divisor;
  • 75% of non-empty rows share an identical 200-char prefix (templated boilerplate; zlib 0.364 vs c4 0.527);
  • truncation always scored each document's first 1024 tokens — its most templated region.

Changes:

  • eval_shard_pick: row_count_source="verified_table" (frozen per-shard counts double as the shard allowlist), leaf_name_pattern override, and load_builder script-bypass (Multi_Legal_Pile's builder streams files from external repos and needs trust_remote_code; the generic json builder reads the pinned native shard directly). Register (joelniklaus/Multi_Legal_Pile, all_all) @ 911e1d21 with all 29 native shards above the 10k-row headroom floor (counted by full decompress).
  • dataloader: eval-only deterministic gates eval_min_text_chars=200 and eval_dedup_prefix_chars=200 (exact-prefix set — builtin hash() is per-process randomized and could break cross-validator consensus).
  • tokenize_windowed: long docs contribute a content-hash-derived window instead of the boilerplate prefix (no RNG, consensus-safe). Adopted by the default dataset class and exp_legal; exp_math left for follow-up.
  • exp_legal config: eval_source_seeded_shard_pick: true (shortcut retired). Miner training still streams the all_all builder mix, so eval ⊆ training distribution.
  • evaluate: scored_batches/nan_batches log promoted to INFO — the only production signal that an average is silently excluding NaN batches.

Rollout: eval batches change; all validators must upgrade together (same discipline as the shuffle/skip bumps).

…y gates)

Miners scored val_loss ≈ 0.04 vs baselines of 4.5–12.5 (perplexity ~1.04)
with all miners within 0.0006 of each other. Root cause is the eval data
layer, not the seed: the MinerCommit2 block-hash seed (PR #175/#177) was
verified correct on chain for all completed rounds.

Validated on the live validator by reproducing the round-8670446 eval
stream with production code:
- exp_legal still ran the legacy head-of-stream path (§2 shortcut of
  docs/exp-legal-migration-plan.md) — the whole draw came from the head
  of one sub-file;
- 38% of streamed Multi_Legal_Pile rows have empty text → all-padding
  batches → NaN loss → silently excluded from the scored divisor;
- 75% of non-empty rows share an identical 200-char prefix (templated
  boilerplate; zlib 0.364 vs c4 0.527);
- truncation always scored each document's first 1024 tokens — its most
  templated region.

Changes:
- eval_shard_pick: row_count_source="verified_table" (frozen per-shard
  counts double as the shard allowlist), leaf_name_pattern override, and
  load_builder script-bypass (Multi_Legal_Pile's builder streams files
  from external repos and needs trust_remote_code; the generic json
  builder reads the pinned native shard directly). Register
  (joelniklaus/Multi_Legal_Pile, all_all) @ 911e1d21 with all 29 native
  shards above the 10k-row headroom floor (counted by full decompress).
- dataloader: eval-only deterministic gates eval_min_text_chars=200 and
  eval_dedup_prefix_chars=200 (exact-prefix set — builtin hash() is
  per-process randomized and could break cross-validator consensus).
- tokenize_windowed: long docs contribute a content-hash-derived window
  instead of the boilerplate prefix (no RNG, consensus-safe). Adopted by
  the default dataset class and exp_legal; exp_math left for follow-up.
- exp_legal config: eval_source_seeded_shard_pick: true (shortcut
  retired). Miner training still streams the all_all builder mix, so
  eval ⊆ training distribution.
- evaluate: scored_batches/nan_batches log promoted to INFO — the only
  production signal that an average is silently excluding NaN batches.

Rollout: eval batches change; all validators must upgrade together
(same discipline as the shuffle/skip bumps).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@george-connito
george-connito merged commit 4c72763 into master Jul 24, 2026
1 check passed
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