Skip to content

feat: add inference_speed benchmark with throughput score#148

Open
lwalew wants to merge 2 commits into
developfrom
feat/scaling-benchmark-revamp
Open

feat: add inference_speed benchmark with throughput score#148
lwalew wants to merge 2 commits into
developfrom
feat/scaling-benchmark-revamp

Conversation

@lwalew

@lwalew lwalew commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Adds a new inference_speed benchmark. The existing scaling benchmark is left completely untouched (verified: no diff vs develop).

What it does

Measures MD throughput and how it scales with system size, and turns it into a score.

  • Reuses the scaling dataset via a new dataset_name hook on the base Benchmark — no duplicate data shipped.
  • Speed score: Hill function 1 / (1 + (t/t₀)ᵏ) on the per-atom step time (size-normalised), averaged over systems → faster models score higher. Contributes to the overall model score (scaling still does not).
  • New GUI page: throughput (ns/day) on log–log axes (toggle), power-law fit lines, per-episode variance error bars, and a summary table (scaling exponent, R², throughput, largest system).
  • Records per-episode times and the MD timestep on the result.

Caveats

  • ⚠️ The score t₀ (SCORE_PER_ATOM_STEP_TIME_MIDPOINT in inference_speed.py) is a documented placeholder calibrated for H100 — needs tuning against a real run so scores spread sensibly.
  • The score is wall-clock based ⇒ only comparable across models run on the same GPU (documented).

Tests added for the new benchmark + compute_speed_score; full suite (132) + ruff + mypy green.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

Coverage

Tests Skipped Failures Errors Time
133 0 💤 0 ❌ 0 🔥 12.597s ⏱️

Adds a new `inference_speed` benchmark (leaving `scaling` untouched) that measures
MD throughput and how it scales with system size, and turns it into a score.

- Reuses the `scaling` dataset via a new `dataset_name` hook on the base Benchmark,
  so no duplicate data is shipped.
- Produces a Hill-function speed score 1 / (1 + (t / t0)^k) on the per-atom step
  time, averaged over systems; faster models score higher. The score is wall-clock
  based and only comparable across models run on the same GPU. It contributes to the
  overall model score.
- New GUI page: throughput (ns/day) with log-log axes, power-law fit lines,
  per-episode variance error bars, and a per-model summary table.
- Records per-episode times and the MD timestep on the result.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lwalew lwalew force-pushed the feat/scaling-benchmark-revamp branch from 9420481 to 4ec5c8d Compare June 26, 2026 15:22
@lwalew lwalew changed the title feat: revamp scaling benchmark with throughput score and richer UI feat: add inference_speed benchmark with throughput score Jun 26, 2026
inference_speed now reports two complementary speeds per system:
- Model throughput (atoms/s): the raw forward pass, engine-independent. For mlip
  models this times the pure network forward on a pre-built graph (mirroring
  mlip-jax scripts/time_inference.py); for external ASE calculators it forces a
  recompute on the pre-built atoms (includes their neighbour-list build). Uses
  warm-up, block-until-ready/numpy-read sync, and slowest-20% outlier trimming.
- MD throughput (ns/day): the existing end-to-end short MD run.

The speed score now uses the per-atom model forward time (engine-independent)
rather than the MD step time. The GUI gains a metric selector across both
families and a graph-cutoff column in the summary table.

Co-Authored-By: Claude Opus 4.8 (1M context) <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