Skip to content

docs(model): document Nemotron Omni vision_dp_over_cp - #5646

Merged
cuichenx merged 11 commits into
mainfrom
huvu/vision_module_DP_docs_skills
Aug 27, 2026
Merged

cuichenx merged 11 commits into
mainfrom
huvu/vision_module_DP_docs_skills

Conversation

@huvunvidia

@huvunvidia huvunvidia commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Documents the model.vision_dp_over_cp flag added by #5645, in two places.

1. Example README (examples/models/nemotron/nemotron_3_omni/README.md)

  • New Vision DP Over CP section under ## Training: what the flag does
    (images/tubelets sharded over the LM's CP group — data parallelism over
    images, not ring attention), the fact that it defaults to True and is a
    silent no-op at CP=1, and the measured A/B results.
  • Notes the load-balance caveat: images are split by count with the remainder on
    the last rank, so multi-image data with varying image counts balances unevenly.
  • Drive-by fix of a typo in the vision input mode table:
    model.temporal_patchrecipe_dim -> model.temporal_patch_dim.

2. New perf skill (skills/nemo-mbridge-perf-vision-dp-over-cp/)

  • SKILL.md — enablement, a disambiguation table against the pre-existing and
    unrelated dist_train.vision_context_parallel_size, code anchors,
    implementation map (split, placeholder padding, encode, even-grid padding,
    project-then-gather, merge), measured impact, six pitfalls, and an A/B
    verification procedure.
  • card.yaml — validation status, feature meaning, constraints, known
    limitations, evidence files, follow-up validation.
  • evals/evals.json — two positive activation tasks plus one negative routing
    task, because this skill shares the "context parallel" vocabulary with
    nemo-mbridge-perf-hierarchical-context-parallel while describing an unrelated
    mechanism.
  • BENCHMARK.md, skill-card.md, skill.oms.sig — generated and signed by the
    NVSkills pipeline. Tier 3 verdict: PASS, overall 70% -> 98% for Claude Code
    and 79% -> 95% for Codex; the negative routing task was answered correctly.
  • Registered in docs/skills-index.md under Performance Techniques.

Rename

The flag was called vision_context_parallel in earlier revisions. It was
renamed to vision_dp_over_cp at review request, because the old name read as
sequence-dimension context parallelism (which this is not) and collided visually
with the unrelated dist_train.vision_context_parallel_size. This PR follows
that rename: the skill directory moved from
skills/nemo-mbridge-perf-vision-context-parallel/ to
skills/nemo-mbridge-perf-vision-dp-over-cp/, and the flag name was updated in
the README, SKILL.md, card.yaml, evals/evals.json, BENCHMARK.md, and
docs/skills-index.md.

The disambiguation section in SKILL.md deliberately still names
dist_train.vision_context_parallel_size — that knob is unchanged, and telling
the two apart is the reason the section exists.

⚠️ skill.oms.sig needs re-signing before merge

The rename invalidated the attached signature on both counts: the signed subject
name is still nemo-mbridge-perf-vision-context-parallel, and the pinned SHA-256
digests for SKILL.md, card.yaml, evals/evals.json, and BENCHMARK.md no
longer match their contents. The file was moved with the rest of the directory
but deliberately not hand-edited. The NVSkills pipeline needs to re-run and
re-sign before this merges.

Merge order

Please merge #5645 first — it introduces the flag these docs describe.

Measurements quoted in the docs

Nemotron-3 Nano Omni 30B-A3B, 2 nodes / 16 GPUs, PP=1 DP=2 EP=8 ETP=1 MBS=2
GBS=64 GA=16, flag flipped only:

Dataset TP CP Step time Peak memory
InfoVQA 4 2 13.2 -> 12.5 s 81 -> 73 GB
Mantis 2 4 12.2 -> 11.6 s 81 -> 77 GB
llava_video 4 2 13.6 -> 13.0 s 84 -> 75 GB

Both a memory win (-5% to -11% peak) and a throughput win (-4% to -5% step time).

Test plan

  • Docs-only change; no source code touched.
  • evals.json parses as JSON; card.yaml parses as YAML.
  • NVSkills-Eval Tier 3 PASS (pre-rename content).
  • Sphinx/Fern build check on the renamed skills-index.md toctree entry.
  • Re-run NVSkills to re-sign skill.oms.sig after the rename (see above).

Add a Vision Context Parallelism section to the Nemotron-3 Omni example
README covering the model.vision_context_parallel flag, its CP>1 gating,
and the measured step-time/memory A/B across three datasets. Also fixes a
typo in the vision input mode table (temporal_patchrecipe_dim).

Signed-off-by: Huy Vu <huvu@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Aug 18, 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.

@huvunvidia huvunvidia added docs Documentation-only updates or documentation debt docs-only With great power comes great responsibility. area:model Model implementations and HF bridge logic needs-review PR is ready for code review and waiting on a reviewer labels Aug 18, 2026

### Vision Context Parallelism

`model.vision_context_parallel=True` shards the microbatch's images (or

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.

This documents model.vision_context_parallel=True, but that field does not exist on the Nemotron Omni provider in this tree. The provider hardcodes vision_cfg.context_parallel_size = 1 (nemotron_omni_provider.py:105) and defines no vision_context_parallel attribute, and the modeling code contains no image-count sharding + gather (the only CP logic in modeling_nemotron_omni.py shards the text sequence, not images).

Setting an undefined key on a config dataclass silently creates a phantom field, so users following this section would get a no-op with no error. Please either land the implementing change first, or gate this doc behind it and confirm the exact flag name.

@claude

claude Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Light review of docs-only PR.

Typo fix is correct: temporal_patchrecipe_dim to temporal_patch_dim matches the provider field (nemotron_omni_provider.py:173) and its usage across recipes/examples.

Concern: the new Vision Context Parallelism section documents model.vision_context_parallel=True, but no such field exists on the Nemotron Omni provider. The provider hardcodes vision context_parallel_size = 1 (nemotron_omni_provider.py:105) and defines no vision_context_parallel attribute, and modeling_nemotron_omni.py has no image-count sharding + gather (its only CP logic shards the text sequence, not images). A user copying model.vision_context_parallel=True would silently create a phantom config field (no-op, no error). Land the implementing change first, or gate the doc behind it and confirm the exact flag name. Inline comment posted at line 268.

Suggested test cases

  • No perf tests impacted. (Docs-only PR; no files under scripts/performance/configs/ and no recipe configs were changed.)

=> Huy: False alarm, because this PR will go in after #5645

Capture the vision_context_parallel findings as a proper perf skill:
SKILL.md with enablement, code anchors, implementation map, the measured
3-dataset A/B, and the load-balance pitfalls; card.yaml with validation
status, constraints, and follow-up validation; an evals dataset with two
positive tasks and one negative routing task against hierarchical CP,
which shares the "context parallel" vocabulary but not the mechanism.

BENCHMARK.md and skill-card.md are committed with empty result tables:
those numbers come from an NVSkills-Eval run that has not happened yet
and must not be hand-authored. skill.oms.sig is likewise omitted since
it is a Sigstore bundle from the NVIDIA signing pipeline.

Signed-off-by: Huy Vu <huvu@nvidia.com>
@svcnvidia-nemo-ci

Copy link
Copy Markdown
Contributor

/nvskills-ci

svc-nvskills-signing and others added 2 commits August 18, 2026 15:48
Signed-off-by: nvskills-svc-account <svc-nvskills-signing@nvidia.com>
Bridge already exposes dist_train.vision_context_parallel_size, an
unrelated Qwen3-VL knob that gives the vision tower its own ranks and
sets the encoder's own context_parallel_size. Add a comparison table so
the two are not mistaken for alternatives, and record that the encoder
config intentionally keeps context_parallel_size=1 under this feature
because the sharding happens outside the encoder, over its inputs.

Drops the README link into the skill tree per review feedback.

Signed-off-by: Huy Vu <huvu@nvidia.com>
@svcnvidia-nemo-ci

Copy link
Copy Markdown
Contributor

/nvskills-ci

@huvunvidia

Copy link
Copy Markdown
Contributor Author

/ok to test 31d48a7

@kamran-nvidia
kamran-nvidia requested a review from yaoyu-33 August 18, 2026 16:33
@huvunvidia
huvunvidia requested a review from cuichenx August 20, 2026 14:49
Comment thread examples/models/nemotron/nemotron_3_omni/README.md Outdated
@svcnvidia-nemo-ci

Copy link
Copy Markdown
Contributor

/nvskills-ci

huvunvidia and others added 2 commits August 25, 2026 08:40
PR #5645 turned image sharding on by default and moved the sharded projection
onto the FP8-alignment helper, which invalidated the enablement guidance, the
code anchors, and the A/B baseline arm documented here. Also records that a
two-rank unit test now covers the placeholder path CP=8 still lacks.

Signed-off-by: Huy Vu <huvu@nvidia.com>
@svcnvidia-nemo-ci

Copy link
Copy Markdown
Contributor

/nvskills-ci

@huvunvidia

Copy link
Copy Markdown
Contributor Author

/ok to test 67e0579

svc-nvskills-signing and others added 3 commits August 25, 2026 16:05
Signed-off-by: nvskills-svc-account <svc-nvskills-signing@nvidia.com>
Follows the flag rename in the implementation PR. The skill directory
becomes nemo-mbridge-perf-vision-dp-over-cp; skill.oms.sig is now stale
(subject name and file digests both changed) and needs an NVSkills
pipeline re-run.

Signed-off-by: Huy Vu <huvu@nvidia.com>
@svcnvidia-nemo-ci

Copy link
Copy Markdown
Contributor

/nvskills-ci

@huvunvidia

Copy link
Copy Markdown
Contributor Author

/ok to test cf63462

Signed-off-by: nvskills-svc-account <svc-nvskills-signing@nvidia.com>
@huvunvidia huvunvidia changed the title docs(model): document Nemotron Omni vision context parallelism docs(model): document Nemotron Omni vision_dp_over_cp Aug 27, 2026
@cuichenx

Copy link
Copy Markdown
Contributor

/ok to test 155154e

@cuichenx cuichenx added ready-to-merge PR is approved, current, and only waiting for CI to pass before merge and removed needs-review PR is ready for code review and waiting on a reviewer labels Aug 27, 2026
@cuichenx
cuichenx enabled auto-merge (squash) August 27, 2026 15:53
@cuichenx
cuichenx merged commit 14d7c67 into main Aug 27, 2026
41 checks passed
@cuichenx
cuichenx deleted the huvu/vision_module_DP_docs_skills branch August 27, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:model Model implementations and HF bridge logic docs Documentation-only updates or documentation debt docs-only With great power comes great responsibility. ready-to-merge PR is approved, current, and only waiting for CI to pass before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants