Skip to content

fix(metrics): weight gpt-oss accuracy by dataset sample count to matc… - #479

Merged
nvzhihanj merged 3 commits into
mainfrom
arekay/gptoss-sample-weighted-accuracy
Sep 1, 2026
Merged

fix(metrics): weight gpt-oss accuracy by dataset sample count to matc…#479
nvzhihanj merged 3 commits into
mainfrom
arekay/gptoss-sample-weighted-accuracy

Conversation

@arekay-nv

Copy link
Copy Markdown
Collaborator

The combined gpt-oss-120b accuracy was an unweighted mean of the three per-dataset scores (aime25/gpqa/livecodebench). That over-weights small datasets (AIME's 30 problems counted equally with LiveCodeBench's 1055) and diverges from the MLCommons reference submission score. Switch to a unique-problem-count weighted mean:

overall = sum(score_d * unit_samples_d) / sum(unit_samples_d)

which reproduces the reference exact_match (83.374 vs the old 80.95 on the same run). Rename the aggregator to samples_weighted_average_accuracy; the accuracy_results.json key stays "average_accuracy" for consumer stability.

Also fix the gpt-oss accuracy plot (results_plots.py), which still computed an unweighted overall and would otherwise disagree with the report/JSON headline.

  • Single-dataset models (DeepSeek-R1, BFCL, ...) are unchanged (weight cancels).
  • Weight guard: absent/None unit_samples -> 1.0 (legacy artifacts); a present but non-positive/non-numeric weight is treated as corrupt and skipped.
  • Tests: MLPerf reference lock (83.374), plot weighting, guard branches, and the average_accuracy JSON-key contract.

What does this PR do?

Type of change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor/cleanup

Related issues

Testing

  • Tests added/updated
  • All tests pass locally
  • Manual testing completed

Checklist

  • Code follows project style
  • Pre-commit hooks pass
  • Documentation updated (if needed)

…h MLCommons

The combined gpt-oss-120b accuracy was an unweighted mean of the three
per-dataset scores (aime25/gpqa/livecodebench). That over-weights small
datasets (AIME's 30 problems counted equally with LiveCodeBench's 1055) and
diverges from the MLCommons reference submission score. Switch to a
unique-problem-count weighted mean:

    overall = sum(score_d * unit_samples_d) / sum(unit_samples_d)

which reproduces the reference exact_match (83.374 vs the old 80.95 on the
same run). Rename the aggregator to samples_weighted_average_accuracy; the
accuracy_results.json key stays "average_accuracy" for consumer stability.

Also fix the gpt-oss accuracy plot (results_plots.py), which still computed an
unweighted overall and would otherwise disagree with the report/JSON headline.

- Single-dataset models (DeepSeek-R1, BFCL, ...) are unchanged (weight cancels).
- Weight guard: absent/None unit_samples -> 1.0 (legacy artifacts); a present
  but non-positive/non-numeric weight is treated as corrupt and skipped.
- Tests: MLPerf reference lock (83.374), plot weighting, guard branches, and the
  average_accuracy JSON-key contract.
@github-actions

Copy link
Copy Markdown

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@github-actions
github-actions Bot requested a review from nvzhihanj August 26, 2026 18:04
@github-actions github-actions Bot added the size/normal PR Review Policy: <=500 non-test lines & <=20 files label Aug 26, 2026
@arekay-nv
arekay-nv marked this pull request as ready for review August 26, 2026 22:12
@arekay-nv
arekay-nv requested review from a team and zihaok August 26, 2026 22:12

@zihaok zihaok left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, Thanks!

@nvzhihanj
nvzhihanj merged commit 84243f3 into main Sep 1, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/normal PR Review Policy: <=500 non-test lines & <=20 files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants