Skip to content

Commit 31d48a7

Browse files
committed
docs(model): disambiguate vision_context_parallel from dist-train knob
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>
1 parent 88e05ad commit 31d48a7

2 files changed

Lines changed: 20 additions & 4 deletions

File tree

  • examples/models/nemotron/nemotron_3_omni
  • skills/nemo-mbridge-perf-vision-context-parallel

‎examples/models/nemotron/nemotron_3_omni/README.md‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,6 @@ Multi-image data whose per-sample image count varies (Mantis at CP=4) therefore
292292
balances less evenly than uniform data, which is why its memory saving is the
293293
smallest of the three.
294294

295-
For code anchors, pitfalls, and the A/B verification procedure, see
296-
[the vision context parallel skill](../../../../skills/nemo-mbridge-perf-vision-context-parallel/SKILL.md).
297-
298295
### Image-Text — CORD-V2
299296

300297
[CORD-V2](https://huggingface.co/datasets/naver-clova-ix/cord-v2) is a

‎skills/nemo-mbridge-perf-vision-context-parallel/SKILL.md‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,22 @@ borrowing the CP group** — a rank encodes whole images, never partial ones.
2222
Shipped for Nemotron Omni. The MCore split/gather helpers are model-agnostic, so
2323
the pattern generalizes to any Bridge VLM with a dynamic-resolution encoder.
2424

25+
## Do Not Confuse With `dist_train.vision_context_parallel_size`
26+
27+
Bridge already has a similarly named and completely different knob:
28+
`vision_context_parallel_size` on the dist-train path
29+
(`src/megatron/bridge/models/qwen_vl/qwen3_vl_provider.py`, consumed in
30+
`src/megatron/bridge/training/initialize.py`).
31+
32+
| | `model.vision_context_parallel` (bool) | `dist_train.vision_context_parallel_size` (int) |
33+
|---|---|---|
34+
| Ranks | Reuses the language model's CP ranks | Gives the vision tower its **own** ranks |
35+
| Splits | Whole images across those ranks | The vision encoder's own sequence dimension |
36+
| Encoder `context_parallel_size` | Stays `1` | Set to this value |
37+
| Models | Nemotron Omni | Qwen3-VL dist-train |
38+
39+
They are not alternatives and do not compose in any tested configuration.
40+
2541
## Enablement
2642

2743
```python
@@ -95,7 +111,10 @@ Upstream helpers (do not modify — changes go through the MCore repo):
95111
images so no rank runs an empty encoder, and returns `num_padded_ranks` so the
96112
gather can drop them again.
97113
3. **Encode.** Each rank runs the full vision tower on its own images only.
98-
Activations, not just compute, are what drop by `1/CP`.
114+
Activations, not just compute, are what drop by `1/CP`. The vision encoder's
115+
own `context_parallel_size` stays hardcoded to `1` in
116+
`_build_vision_config` — that is correct and unchanged by this feature, since
117+
the sharding happens *outside* the encoder, over its inputs.
99118
4. **Even-grid padding.** `_pad_patch_grid_to_even` zero-pads an odd patch grid
100119
before pixel shuffle. Only the injected `1x1` placeholders hit this path;
101120
real frames are already even in both extents.

0 commit comments

Comments
 (0)