Skip to content

fix(benchmark): increase Aegis target output limit - #3753

Merged
cmunley1 merged 5 commits into
NVIDIA-NeMo:mainfrom
muskank7:fix/aegis-v4-target-model-output-limit
Sep 30, 2026
Merged

cmunley1 merged 5 commits into
NVIDIA-NeMo:mainfrom
muskank7:fix/aegis-v4-target-model-output-limit

Conversation

@muskank7

@muskank7 muskank7 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Raise the five-row Aegis v4 benchmark target-model output ceiling from 16,384 to 131,072 tokens (128K), and regenerate all five committed benchmark rows.
  • Raise the separate five-row resources-server example input ceiling from 1,024 to 131,072 tokens and replace its rollouts with a new live Super → Gym → Aegis run.
  • Document an internal Step 25 EA safety result as a reference target, with its dataset, inference settings, score definition, and unresolved-row caveat.

Why

Reasoning-capable target models may need more than 16K tokens before producing a final answer. The new 128K value is a ceiling, not a required output length; it does not change the Aegis judge limit, the verifier, or the default final-answer-only judging mode. There is no linked issue; this is a focused follow-up to #3699 and the review discussion on this PR.

Internal reference result (not an official score)

An internal, non-Gym run used 5,964 MM-Aegis v3.3 prompts (2,624 with images; input JSONL SHA-256 d54ed8d391a3e52ca5adc3b4b165ae2cf5d4813d126d3d9421c496c7fc730a62) with the Nemotron 3.5 Super VL EA MOPD large_multi_domain_opd_v1/step_25_hf checkpoint. Super used thinking enabled, temperature 1.0, top-p 0.95, and a 32,768-token output limit. Only final answers were judged. Aegis v4 used revision b47f6f6c18dc7d11a786abbbca2510cba58ede20, temperature 0.01, top-p 0.95, 200 output tokens, and category reporting.

The result was 5,795 safe, 168 unsafe, and 1 unresolved response judgement. Unsafe rate over all rows is 168 / 5,964 = 2.8169%; the Gym resolved-only unsafe-rate target would be 168 / 5,963 = 2.8174%. A later retry received a safe judgement for a different, one-word model response; it did not resolve or replace the original row in these counts. The dataset is not included in this PR, and the five-row built-in smoke benchmark cannot reproduce this aggregate result. A strict full-dataset comparison must reuse the data and 32,768-token generation setting. This is an internal reproduction target, not a score already reproduced by Gym or an independently reported/official score.

Correction to my earlier comment: the recorded internal Step 25 run used 32,768 max_tokens; 16,384 was the previous built-in Gym benchmark ceiling, not the recorded run's normal generation setting.

Example rollouts

Both the benchmark rows and the separate resources-server example inputs now request up to 131,072 target-model output tokens. I regenerated the committed resources_servers/aegis_v4_safety/data/example_rollouts.jsonl with a live end-to-end Gym run on Slurm job 7546959:

five example inputs → Nemotron 3.5 Super VL EA Step 25 → Gym final-only verifier → Aegis v4

All five target responses completed with final answers (195–1,926 actual output tokens); all five Aegis judgements resolved; no rollout failures. The two intentionally unsafe user prompts were labelled unsafe, and all five target responses were labelled safe. The 128K setting is an available ceiling, not the number of tokens forced or actually generated. Gym's example metadata collator reported example_metrics.json already up to date, so that file did not change. These five smoke results are not the 5,964-row reference score.

Validation

  • venv/bin/python benchmarks/aegis_v4_safety/prepare.py — regenerated five rows; verified that only their max_output_tokens values changed.
  • venv/bin/gym env validate aegis_v4_safety --kind benchmark --sync --json — five rows, no warnings or manifest drift.
  • venv/bin/pytest -q tests/unit_tests/test_task_data.py::TestRepoDataMatchesSchemas::test_all_committed_rows_validate — passed.
  • venv/bin/ruff check benchmarks/aegis_v4_safety/prepare.py and venv/bin/ruff format --check benchmarks/aegis_v4_safety/prepare.py — passed.
  • venv/bin/pre-commit run --all-files — passed against the final diff.
  • venv/bin/gym dataset collate --config resources_servers/aegis_v4_safety/configs/aegis_v4_safety.yaml --config resources_servers/aegis_v4_safety/configs/aegis_v4_model.yaml --mode example_validation --output-dir /tmp/aegis_v4_example_collate_128k — passed; example metadata remained current.
  • venv/bin/gym env test --resources-server aegis_v4_safety +should_validate_data=true +uv_venv_dir=/tmp/aegis_v4_gym_test_128k +skip_venv_if_present=true — 23 tests passed and five-row example data validated.
  • Live Super → Gym → Aegis example job 7546959 — completed successfully, five completed final answers, five resolved judgements, zero rollout failures; the generated rollout file's SHA-256 is 73c5e232565d8249c74a425ffbfc6c6b3f720882bedb7f089a7a0edfc9002d30.

No request-routing or verifier logic changed. The fresh example rollouts validate the higher target-model ceiling end to end; the full 5,964-row internal score has not been reproduced by this five-row smoke run.

User-visible impact

The built-in five-row benchmark and five resources-server examples now permit longer target-model generations, which may increase runtime and generated-token cost. The Aegis safety-only score does not measure helpfulness or task correctness, and a high score can be obtained through blanket refusals.

@copy-pr-bot

copy-pr-bot Bot commented Sep 29, 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 29, 2026
cmunley1
cmunley1 previously approved these changes Sep 29, 2026
@cmunley1

Copy link
Copy Markdown
Contributor

Can we make it 128k and update example rollouts if needed? If you think it should not be 128k, that is ok, but many reasoning models such as nemotron can use > 16k when reasoning.

Also, is there any official / reported scores that this env reproduces?

@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-customer Waiting on the original author to respond label Sep 29, 2026
@muskank7

Copy link
Copy Markdown
Contributor Author

The included five-row benchmark is an integration test.

I previously ran a separate internal 5,964-row run that evaluated final answers only with Aegis v4. Super 3.5 VL still reasoned internally, but its reasoning trace was not sent to Aegis. All 5,964 target-model generations completed normally with finish_reason: stop max. The output limit was 16,384 tokens normally and the repair output limit was 32,768 tokens for the final difficult rows. But I agree with you that 128K is a better ceiling to account for reasoning enabled; I will update that tomorrow and regenerate the example inputs, rollouts, and metrics so they are consistent.

@yaoyu-33 yaoyu-33 added area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers bug Something isn't working complexity:low Localized change in one scope with a small, straightforward review surface labels Sep 29, 2026
@muskank7

Copy link
Copy Markdown
Contributor Author

Updated as requested: the benchmark and the separate example inputs now set max_output_tokens to 131,072 (128K). I regenerated the five committed example rollouts with a live Super 3.5 VL EA Step 25 → Gym → Aegis v4 run; all five target responses completed and all five Aegis judgements resolved. The 128K value is the allowed maximum, not a fixed number of tokens returned by Super.

I also added the internal 5,964-row Step 25 result as a reference target, not an official or already Gym-reproduced score: 5,795 safe, 168 unsafe, 1 unresolved (2.8174% unsafe among resolved rows). Correction to my earlier comment: that full run used a 32,768-token Super output limit; 16,384 was the old Gym benchmark ceiling. The PR description gives the exact settings, caveats, and validation results.

@svcnvidia-nemo-ci svcnvidia-nemo-ci removed the waiting-on-customer Waiting on the original author to respond label Sep 29, 2026
cmunley1
cmunley1 previously approved these changes Sep 29, 2026
@cmunley1
cmunley1 enabled auto-merge September 29, 2026 22:13
@yaoyu-33 yaoyu-33 added the needs-review PR is ready for code review and waiting on a reviewer label Sep 29, 2026
@cmunley1

Copy link
Copy Markdown
Contributor

/ok to test 4500556

auto-merge was automatically disabled September 30, 2026 06:21

Head branch was pushed to by a user without write access

…-model-output-limit

Signed-off-by: Muskan Kumar <[email protected]>

# Conflicts:
#	resources_servers/aegis_v4_safety/app.py
@cmunley1

Copy link
Copy Markdown
Contributor

/ok to test b054e81

@cmunley1
cmunley1 merged commit 1fdd7c1 into NVIDIA-NeMo:main Sep 30, 2026
36 checks passed

This branch was previously deployed

1 inactive deployment
public — b054e817 Deployed Sep 30, 2026 by copy-pr-bot[bot] via release / finalize / notify #4072
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 bug Something isn't working community-request Issue reported or requested by someone from the community complexity:low Localized change in one scope with a small, straightforward review surface 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