Repository navigation
fix(osworld): keep the Nano Omni profile's sampling and document its Omni v3 recipe - #4897
Open
JeffPengCoder wants to merge 6 commits into
Open
JeffPengCoder wants to merge 6 commits into
JeffPengCoder wants to merge 6 commits into
Conversation
prepare.py always wrote responses_create_params with max_output_tokens 1500 and temperature 1.0. Collection applies those values over every row and the agent config, so a run prepared with --profile nano_omni and no sampling flags ignored the profile's temperature 0.6 and 4096-token limit. Write each sampling value only when its flag is passed. The default and pointer profiles already configure 1500 and 1.0 themselves, so their requests are unchanged. Signed-off-by: Jeff Peng <jepeng@nvidia.com>
…oring rules The Nano Omni profile reproduces the reference scores only with a serving configuration that was not written down: the checkpoint's own tokenizer with the chat template embedded in its tokenizer_config.json (vLLM otherwise serves the separate chat_template.jinja), the nano_v3 reasoning parser plugin, and the vLLM flags of the reference runs. Document them with sources and SHA-256 digests, the 361-task test_nogdrive input and how to build it, the model-explicit infeasible scoring rule, reference scores for a self-check, and the AgentENV backend's requirements. Signed-off-by: Jeff Peng <jepeng@nvidia.com>
The chat template, reasoning parser, tokenizer and reference scores belong to the Omni v3 checkpoint revision 24e67ea0. Later revisions and other Nemotron generations, such as Nemotron 3.5 Super or Nemotron 4, ship their own tokenizer and chat template and may need a different parser; the repository's Nemotron 3.5 Super launchers already use the model's own template with nemotron_v3. Say so in the README, the profile and the agent README, and describe the AgentENV backend as it stands once the provider endpoints are on main. Signed-off-by: Jeff Peng <jepeng@nvidia.com>
The per-step output limit is a tunable setting rather than a fixed part of the recipe: the profile's 4096 and the 16384 passed by the AgentENV reference runs both produced the reference scores. Describe how truncation shows up (finish_reason length, then model_output_truncated), how to count it from the trajectory record or the full model I/O log, when to raise the limit, and how to keep it within the served context length. Signed-off-by: Jeff Peng <jepeng@nvidia.com>
7 tasks done
…file The profile sent no chat_template_kwargs, so the served template's own default decided whether earlier assistant turns keep their reasoning. Every reference score was measured with that default, truncate_history_thinking=true: image-backed history turns are rendered as an empty <think></think> plus the Action, while turns folded into the text history keep their Thought. Set it explicitly so a different template, server or caller default cannot change the model input unnoticed, and document it with the serving recipe. Sending false, as NVIDIA's computer-use cookbook does, is a different recipe. Signed-off-by: Jeff Peng <jepeng@nvidia.com>
Merge main at bd6f5f0 and document the managed manifest/lock installation contract and AgentENV SDK endpoint compatibility. Preserve the Nano Omni sampling fix and parser behavior. Validation: 1565 tests passed; the one installer assertion failure also reproduces on main. All 60 sampling cases and pre-commit checks passed. Signed-off-by: Jeff Peng <jepeng@nvidia.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
prepare.pyalways emitted 1500 output tokens and temperature 1.0, overriding the Nano Omni profile's 4096 / 0.6 recipe. This change preserves profile and task-row sampling unless the caller passes explicit flags, pins the tested history-template argument, and documents the Omni v3 serving recipe.Base and dependencies
This PR includes main at
bd6f5f0d8f3a56cbf3f7e1d2d4a1d2220b7ff6fe. Updated head:9de7ffcf8e75498a6ed2c97cec3efb3a71e642f4. The main-relative diff remains limited to the original seven OSWorld files.pyproject.tomlanduv.lock, with a separately locked opt-in OSWorld runtime layer. The recipe documentation now follows that installation contract.What does this PR do?
It preserves the Nano Omni profile's sampling and documents the serving and agent configuration behind the reported Omni v3 scores, together with the current managed-install and SDK compatibility requirements.
prepare.pyno longer overrides the profile's sampling.responses_create_paramswithmax_output_tokens: 1500andtemperature: 1.0intoenv.yaml.row_params | responses_create_params_overridesinnemo_gym/rollouts/rollout_collection.py). The OSWorld agent then uses the request's values instead of its config.--profile nano_omniwithout flags ran at 1500 tokens and temperature 1.0 instead of the profile's 4096 tokens, temperature 0.6 and top-p 0.95.--max-output-tokens,--temperatureand--top-pdefault toNone, and only the values that are passed are written.test_nano_omni_env_keeps_the_profile_sampling_recipemerges the base config, thenano_omniprofile and the generatedenv.yaml, and checks the effective sampling, step limit and history policy.test_main_writes_complete_nano_omni_profilenow also checks that noresponses_create_paramsis written when the flags are omitted.The Omni v3 recipe is documented in
benchmarks/osworld/README.md, with pointers from the profile config and the agent README:nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning-BF16at revision24e67ea0.--chat-template. The correct one is SHA-256ab7813c3…, the template embedded in the checkpoint'stokenizer_config.json. By default vLLM serves the checkpoint'schat_template.jinja(41428e0c…) instead.nano_v3reasoning parser, where to get it, and thevllm servecommand.test_nogdrivemanifest (test_allwithout the 8 tasks that need Google Drive), including the command that builds that set.FAIL. The adapter never appendsFAILat the step limit.The profile pins
truncate_history_thinking=true.chat_template_kwargs, so the served template's own default decided whether earlier assistant turns keep their reasoning.true: image-backed history turns are rendered as an empty<think></think>plus the Action, and turns folded into the text history keep their Thought.test_nano_omni_profile_pins_truncated_history_reasoningchecks it.false, as NVIDIA's computer-use cookbook for this model does, keeps the reasoning in those turns. That changes the model input, so the README treats it as a separate recipe to validate.No issue: this documents the recipe behind the OSWorld scores reported in #3591. It also fixes a
prepare.pydefault that was found while checking those scores.Validation
Validated source:
9de7ffcf8e75498a6ed2c97cec3efb3a71e642f4, merging the original PR with mainbd6f5f0d8f3a56cbf3f7e1d2d4a1d2220b7ff6feand correcting README references to locked installation and SDK compatibility. The committed tree matches the audited candidate exactly.benchmarks/osworld/tests/test_run_scripts.py::test_managed_osworld_agent_installs_opensandbox_sdk, which still asserts the old managed-install contract, beginning withnemo-gym[dev]instead ofnemo-gym[dev,ray].default,pointer,nano_omni, omitted flags, single-field overrides, zero temperature, all flags, and task rows with their own sampling parameters. Every candidate emission matches the explicit flags. These are configuration/precedence checks, not live model rollouts.pre-commit run --all-files --show-diff-on-failure: passed.git diff --checkpassed. Only the intended README corrections differ from the initially tested merged tree; executable source is unchanged after the test run.Tests ran on macOS ARM64, Python 3.13.14, with a separate validation environment using root-lock aiohttp 3.14.4, Ray 2.58.0 and OpenAI 2.44.0. This is not a complete installation or smoke test of the managed component lock (which selects aiohttp 3.14.5 and different sandbox SDK versions).
The current CI classifier makes this a full-suite diff because benchmark Python/YAML files are uncategorized paths; the agent test file also prevents a docs-only interpretation. A trusted main CI run is still required for this updated head. An authorized
/ok to test <full-sha>applies only to the specified commit; no CI authorization comment was posted as part of this update.Rollouts
No new model/VM rollout was run during this main-sync review. The historical runs below validate the intended sampling on their original sources and SDKs; they do not qualify the new managed lock. A model-and-verifier smoke with the final frozen environment remains outstanding before claiming current-main runtime compatibility.
With this change,
--profile nano_omniwithout sampling flags gives the values the reference runs passed explicitly:--max-output-tokensis given.test_nano_omni_env_keeps_the_profile_sampling_recipechecks these values on the merged config.The README's reference scores come from real OSWorld runs on the 361 tasks with the documented serving configuration:
The most recent AgentENV run is the October 20 reproduction in #3591's description.
Compatibility and benchmark impact
--max-output-tokens,--temperatureand--top-pare all omitted,prepare.pyno longer writesresponses_create_params, so the profile's agent config decides the sampling:nano_omni: such runs change from 1500 output tokens at temperature 1.0 to the profile's 4096 tokens, temperature 0.6 and top-p 0.95, so their scores change.defaultandpointer: with standard task rows that supply no sampling values, they still inherit 1500 tokens, temperature 1.0 and no top-p fromosworld_agent.yaml.chat_template_kwargs: {truncate_history_thinking: true}on every request. With the documented template this is the template's own default, so the model input and the scores do not change. With a server or template whose default differs, the rendering now stays the tested one.Managed-runtime compatibility
The reference AgentENV runs used E2B 2.46.0, whose sandbox-create call uses
POST /sandboxes. The managed OSWorld agent lock now selects E2B 2.58.0, whose sync and async create calls usePOST /v2/sandboxes. The root Gym lock still selects 2.46.0; that does not control the isolated agent runtime. SDK wheels were read and their hashes checked against the committed locks to verify this difference.The README now makes that distinction explicit. A control plane must support the selected SDK's endpoint, or the run needs a separately recorded agent manifest and lock selecting the compatible SDK. An ad hoc post-install pin and
UV_CONSTRAINTdo not define a reproducible locked environment. No deployment compatibility or new score is claimed from unit tests, and no SDK, provider or parser fallback is introduced here.Checklist
pre-commit run --all-files) (so CI lint/format checks pass).git commit -s) (so the DCO check passes).