Skip to content

feat(indic gpqa_diamond): add Indic GPQA Diamond benchmark - #3603

Merged
yuhezhang-ai merged 9 commits into
NVIDIA-NeMo:mainfrom
anushaknvidia:indic/gpqa-diamond
Oct 12, 2026
Merged

yuhezhang-ai merged 9 commits into
NVIDIA-NeMo:mainfrom
anushaknvidia:indic/gpqa-diamond

Conversation

@anushaknvidia

@anushaknvidia anushaknvidia commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds indic/gpqa_diamond using ai4bharat/indic-gpqa, Gym’s English GPQA zero-shot prompt, simple_agent, and the mcqa verifier.

  • Supports 198 questions in each of 14 Indic languages: 2,772 tasks. English can be selected explicitly.
  • Pins dataset revision c3c32b0a0ec7aeebe884c4c55c46730b4274a612 and verifies the source file’s SHA-256.
  • Validates source coverage, unique Record IDs, and nonempty translations without English fallback. Explanations and translation-review fields are excluded from model input.
  • Uses benchmarks/prompts/eval/aai/mcq-4choices.yaml: a single user message requesting a final Answer: A/B/C/D line. This matches Gym’s English GPQA prompt, not the original GPQA repository’s baseline prompt.
  • Shuffles choices deterministically using the embedded English question, keeping answer positions aligned across languages.
  • Uses eight attempts per question. The metric is pass@1[avg-of-8]/accuracy on a 0–100 scale—not best-of-eight. Unextractable responses remain incorrect.
  • Keeps generation settings runtime-configurable. The documented production example uses thinking enabled, temperature 1, top-p 0.95, top-k off, seeds 0–7, and 120,000 maximum output tokens; these are not hard-coded benchmark defaults.

Opted-in Indic results are format-normalized accuracy. To obtain unchanged English-harness/strict extraction accuracy, reverify the same responses without the opt-in, preserving the denominator.

Validation

Rebased onto upstream main at 4a9236e48c82f0dc23365a4c0088b1e54d00d3a8.

Validated head: 558042fb77cbc72a0321d01a1bc4c8c1677faa1e.

  • Reproduced the parser regressions and manifest composition failure before fixing them.
  • Preparation, MCQA, manifest, prompt, benchmark-discovery, and seed-metadata tests: 389 passed.
  • MCQA component tests: 47 passed, with component data validation successful.
  • pre-commit run --all-files: passed.
  • git diff --check upstream/main: passed.
  • All seven PR commits have DCO sign-off.

Commands run:

PYTHONPATH=resources_servers/mcqa:. RAY_TMPDIR=/tmp \
HF_DATASETS_CACHE=/tmp/gpqa-pr3603-hf-cache \
pytest --import-mode=importlib \
  benchmarks/indic/gpqa_diamond/tests/test_prepare.py \
  resources_servers/mcqa/tests/test_app.py \
  tests/unit_tests/test_environment_validation.py \
  tests/unit_tests/test_environment_manifest.py \
  tests/unit_tests/test_prompt.py \
  tests/unit_tests/test_benchmarks.py \
  tests/unit_tests/test_rollout_seed_metadata.py -q --tb=short

gym env test +entrypoint=resources_servers/mcqa \
  +should_validate_data=true +skip_venv_if_present=true

pre-commit run --all-files
git diff --check upstream/main

An initial sandboxed test run encountered hostname-resolution failure during unrelated benchmark discovery. The identical suite passed with normal hostname resolution; no unrelated code was changed.

Preparation evidence

Exercised production preparation using the real, previously downloaded ai4bharat/indic-gpqa/train.parquet:

  • 198 source records.
  • 14 languages × 198 questions = 2,772 prepared rows.
  • Source revision and content hash match the original Hugging Face download metadata.
  • gym env validate indic/gpqa_diamond passed, including manifest/config agreement and prepared-data validation.

Source SHA-256:

34cd810650109f4c08b842e69dcadcff17da3a23c37a0f75d0d6a667b1e2c0cf

Prepared JSONL SHA-256:

d1b329df74de1d63171b8c1aed4b02d04f40705220e48d3961d6a3a151667b2d

Real model evidence

Ran native gym eval run on Bengali and Hindi source row 0, eight attempts each, using:

  • gnani/gnani-evon-v3.3-30B-A3B, revision fb9ddb6b58f2d235684388a9260671fca5ebccaf.
  • vLLM 0.21.0 with the model-specific nano_v3 reasoning parser.
  • Thinking enabled, temperature 0.6, top-p 0.95, top-k off, repetition penalty 1.0.
  • Explicit smoke override --max-output-tokens 16384, concurrency 4.
  • Captured outgoing requests confirming these settings and seeds 0–7 per language.

Results:

Language Completed Extracted Strict correct Normalized correct
Bengali 8/8 8/8 5/8 5/8
Hindi 8/8 8/8 8/8 8/8

All 16 responses finished with stop: zero capped responses and zero failed requests. Output lengths were 712–11,195 tokens. Separate reasoning items and final assistant messages were inspected.

Bengali produced five Answer: B and three Answer: D outputs against gold B; Hindi produced eight Answer: B outputs against gold B. Reverification reproduced every native extraction and reward.

Also reverified two real cached Bengali responses from sarvam-external/sarvam105b-05102026, using thinking enabled, the qwen3 reasoning parser, temperature 1, top-p 1, top-k off, and a 120,000-token cap:

Source row Final content Expected Strict extraction / reward Normalized extraction / reward
Bengali / 0 উত্তর: B B None / 0 B / 1
Bengali / 1 উত্তর: B B None / 0 B / 1

@copy-pr-bot

copy-pr-bot Bot commented Sep 22, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@nemo-automation-bot nemo-automation-bot Bot added the community-request Issue reported or requested by someone from the community label Sep 22, 2026
@yaoyu-33 yaoyu-33 added area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers complexity:medium Single-domain change with interacting parts or a moderate review surface feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer labels Sep 22, 2026
@github-actions github-actions Bot added the sla:triage-overdue Review assignment is over the one-business-day SLA label Sep 23, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-maintainers Waiting on maintainers to respond label Sep 24, 2026
@yaoyu-33 yaoyu-33 removed the needs-review PR is ready for code review and waiting on a reviewer label Sep 24, 2026

@yuhezhang-ai yuhezhang-ai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you address the two inline issues: the shared answer fallback can change existing benchmark scores, and the new manifest fails static validation?

Please also update the PR description to match the current dataset, prompt, parser, and generation settings, and include a reproducible dataset-access setup plus representative model-rollout evidence. My preparation attempt failed with DatasetNotFoundError because ai4bharat/indic-gpqa could not be accessed, so I could not validate real data or rollouts. The focused preparation and MCQA tests pass.

Comment thread resources_servers/mcqa/app.py Outdated
Comment on lines +463 to +464
if pred is None:
pred = _extract_terminal_labeled_choice(text, allowed_letters)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P2] Constrain and scope localized-answer extraction

Could we constrain this to recognized answer labels and opt the Indic rows into it? The new fallback treats Eliminated option: B and (A): B as a final choice. I reproduced verify() changing reward from 0 to 1 for gold B. With an answer-prefix-enabled row, \boxed{C} Eliminated option: B also changes from reward 1 to 0 for gold C because this fallback preempts the existing boxed-answer fallback.

Since this runs for every lenient_answer_colon_md consumer, it changes English GPQA, MMLU-Pro, SuperGPQA, and MMLU-ProX scoring too. Please restrict accepted labels, explicitly scope the added behavior, and add negative-shape and existing-consumer regression cases alongside the localized examples. These synthetic verifier comparisons establish the behavior; its frequency in real model output has not been measured.

determinism: seeded
resources_server: mcqa
agent_server: simple_agent
model_server: policy_model

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P2] Mirror the configured grading mode

Please add grading_mode: lenient_answer_colon_md to this manifest. Its configuration already resolves that value, and running validate_environment() on this head fails with Manifest composition is stale and grading_mode: manifest=null, config="lenient_answer_colon_md". This failure occurs before checking prepared data, independently of dataset access. Adding the matching top-level field resolves this composition mismatch.

@svcnvidia-nemo-ci svcnvidia-nemo-ci added waiting-on-customer Waiting on the original author to respond and removed waiting-on-maintainers Waiting on maintainers to respond labels Oct 6, 2026
@github-actions github-actions Bot removed the sla:triage-overdue Review assignment is over the one-business-day SLA label Oct 6, 2026

@yuhezhang-ai yuhezhang-ai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, Anusha. The parser scoping and manifest fixes address my earlier comments. One configuration issue remains: please give indic_gpqa_diamond_agent its own Environment Server, following English GPQA. Combining the two benchmarks with strict environment routing currently fails; an explicit entry fixes it.

Two non-blocking suggestions: include the preparation tests in regular CI collection, and document the exact strict-rescoring steps using saved inputs and responses.

The focused tests pass. I still couldn’t access the Hub source here, so the real-data and model-run validation remains based on your recorded evidence.

grading_mode: lenient_answer_colon_md

indic_gpqa_diamond_agent:
_inherit_from: mcqa_simple_agent

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P2] Declare an Environment Server for the Indic agent

Could you add an indic_gpqa_diamond_environment_server inheriting mcqa_environment_server, with agent_server.name: indic_gpqa_diamond_agent, as English GPQA does? This config works alone, but composing it with benchmarks/gpqa/config.yaml and setting error_on_agent_without_environment_server=true fails with Agent instance(s) have no environment server … indic_gpqa_diamond_agent. I reproduced the failure and verified that the explicit block fixes it; English GPQA + MMLU-ProX is a passing control. Default mode generates a compatibility relay, so this does not break ordinary default-mode scoring. Please also update the test's top-level key assertion and cover the combined configuration.

import yaml

from benchmarks.gpqa import prepare as english_module
from benchmarks.indic.gpqa_diamond import prepare as module

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Non-blocking suggestion: include these preparation tests in normal CI collection

These tests provide useful protection for source integrity, translation validation, and preparation parity, but the root pytest configuration collects tests/, and the core CI entry point does not add this benchmark-local file. Could you move them to tests/unit_tests/test_indic_gpqa_diamond.py, following the Indic AIME tests, or explicitly collect this file? The focused command passes today; this would keep those checks running automatically on future changes.


This is **format-normalized accuracy** for opted-in Indic rows. To report the
unchanged English-harness/strict extraction accuracy on the same generations,
reverify with that opt-in absent or `false`; do not regenerate responses or change

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Non-blocking suggestion: show the exact strict-rescoring steps

Could you add an example that copies the materialized inputs, disables template_metadata.allow_localized_answer_labels in that copy, and passes it with the original rollouts to gym eval reverify? Reverification builds its payload from the saved inputs, so changing preparation settings alone would not change an existing run. Preserve the task/attempt identifiers and responses so the comparison uses the same generations and denominator. The existing mechanism supports this; a concrete example would make the documented score comparison reproducible.

@anushaknvidia

Copy link
Copy Markdown
Contributor Author

Thank you for the review @yuhezhang-ai. i have rebased and addressed these issues. Do let me know if there is an automated reviewer as a first step for some these comments. There are a bunch of PRs from Indic and I could run that on bulk.

@svcnvidia-nemo-ci svcnvidia-nemo-ci removed the waiting-on-customer Waiting on the original author to respond label Oct 12, 2026
@yaoyu-33 yaoyu-33 added the needs-review PR is ready for code review and waiting on a reviewer label Oct 12, 2026
@yuhezhang-ai

Copy link
Copy Markdown
Contributor

/ok to test c15e732

@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/38289849744

Merged via the queue into NVIDIA-NeMo:main with commit 450924b Oct 12, 2026
48 of 50 checks passed

This branch was previously deployed

1 inactive deployment
public — c15e7321 Deployed Oct 12, 2026 by copy-pr-bot[bot] via release / finalize / notify #5068
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers community-request Issue reported or requested by someone from the community complexity:medium Single-domain change with interacting parts or a moderate review surface feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants