Skip to content

validator: on-GPU throughput re-measurement gate (durable compute-forgery fix) - #98

Open
karpabot wants to merge 1 commit into
RalphLabsAI:mainfrom
karpabot:feat/compute-remeasure-gate
Open

validator: on-GPU throughput re-measurement gate (durable compute-forgery fix)#98
karpabot wants to merge 1 commit into
RalphLabsAI:mainfrom
karpabot:feat/compute-remeasure-gate

Conversation

@karpabot

@karpabot karpabot commented Jul 5, 2026

Copy link
Copy Markdown

The durable fix for the forgery flood

Static MFU ceilings (PR #96 micro_batch, PR #97 compile-aware) narrow the window but can't know a specific recipe's real ceiling. This measures it: re-run the would-be king's exact config for ~30 steps on the validator's own GPU (synthetic data — throughput is data-independent) and reject a declared tok/s that can't be reproduced. There is no ceiling to game — it's the physical rate the forger lies about.

How it decides (_remeasure_verdict, pure + unit-tested)

declared_tps <= measured_tps × gpu_scale × margin, where gpu_scale = declared-GPU bf16 peak / validator-GPU peak (H100↔H200 = 1.0), and margin (default 1.6×) absorbs memory-bandwidth + torch-version + thermal variance. Verified on the real numbers:

bundle declared re-measured ratio verdict
Kaizen b1930c27 356k ~86k (uncompiled) 4.1× REJECT
andreastanm 239k ~86k 2.8× REJECT
#1217 324k ~42k 7.7× REJECT
danielortega (legit king) 239k ~172k (H100 re-run of his compiled recipe) 1.15-1.4× PASS

Safety / rollout

  • Would-beat-king only — cost is O(king-changes), not O(submissions).
  • A failed verdict only withholds the crown (status: remeasure_withheld); it never dethrones the sitting king and never auto-blacklists. Every ambiguity (disabled / no config / probe fail / timeout) is fail-OPEN.
  • Ships OFF. RALPH_COMPUTE_REMEASURE ∈ {off, shadow, enforce}. Rollout: shadow on the box → confirm the known forgeries log would_REJECT and 5CqhtHE7/danielortega log would_PASS → tune RALPH_REMEASURE_MARGIN → flip to enforce.
  • Env-tunable: RALPH_REMEASURE_STEPS (30), _TIMEOUT_S (1500, covers max-autotune), _MARGIN (1.6).

The GPU probe needs hardware, so it's validated in shadow on the box; the mode-parsing, verdict math, GPU-scaling, and fail-open are unit-tested (18 tests). Composes with PR #97 (interim compile-aware ceiling holds the line meanwhile).

🤖 Generated with Claude Code

…gery fix)

The static MFU ceilings (PR#96/RalphLabsAI#97) narrow the forgery window but can't know a
specific recipe's real achievable throughput. This measures it: op_compute_remeasure
re-runs a would-be king's EXACT config for K steps on the validator's own GPU
(synthetic data — throughput is data-independent) and rejects a declared tok/s that
exceeds the measured achievable by more than a GPU-scaled margin. Nothing to game — it
is the physical rate the forger lies about. It caught every real forgery this week
(2-8x over measured) and passes the legit king (danielortega, 1.15x, within margin).

- op_compute_remeasure: pre-crown, would-beat-king-only (cost O(king-changes)). Wired
  into service.score_and_decide; a failed verdict WITHHOLDS the crown (status
  remeasure_withheld), never dethrones the sitting king.
- _remeasure_verdict (pure, unit-tested): declared <= measured * gpu_scale * margin;
  scale by bf16 peak (H100<->H200==1.0), margin default 1.6x absorbs memory-bandwidth
  + torch-version + thermal variance (danielortega's legit +15%).
- _run_throughput_probe: copy canonical recipe + apply patch + synthetic shards + run
  train.py K steps, measure steady-state tok/s (skip step-0 compile/warmup). Env-tunable:
  RALPH_REMEASURE_STEPS/_TIMEOUT_S/_MARGIN.
- off/shadow/enforce via RALPH_COMPUTE_REMEASURE; ships OFF. Every ambiguity fail-OPEN.
- 18 tests (mode, verdict vs real numbers, GPU-scaling, fail-open, margin boundary).

Ships OFF: shadow-calibrate on the box (run vs 5CqhtHE7 + known bundles, confirm the
forgeries would-REJECT and legit would-PASS, tune margin), THEN flip to enforce.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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