Skip to content

Commit cacd727

Browse files
authored
Merge branch 'main' into mchochowski/heterogeneous_moe
2 parents f2e8ef0 + 68e588a commit cacd727

311 files changed

Lines changed: 37664 additions & 26588 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dev.commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cf081d5df0b34b665d214ff936f27489d7396876
1+
bfa33263ca06e6974410d0ea871b25e21c5aee85

.github/workflows/claude-review.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,15 @@ jobs:
4444

4545
- name: Run Claude Code Review
4646
uses: anthropics/claude-code-action@v1
47+
env:
48+
ANTHROPIC_BASE_URL: ${{ secrets.NVIDIA_INFERENCE_URL }}
49+
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS: "1"
50+
DISABLE_PROMPT_CACHING: "1"
4751
with:
48-
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
52+
anthropic_api_key: ${{ secrets.NVIDIA_INFERENCE_KEY }}
4953
claude_args: |
5054
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr review:*),Read"
51-
--model "claude-opus-4-6"
55+
--model "${{ vars.CLAUDE_MODEL }}"
5256
prompt: |
5357
REPO: ${{ github.repository }}
5458
PR NUMBER: ${{ github.event.pull_request.number }}
@@ -113,8 +117,9 @@ jobs:
113117
114118
manual-review:
115119
if: github.event_name == 'issue_comment' && github.event.issue.pull_request != null && contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
116-
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_claude_review.yml@v0.88.0
120+
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_claude_review.yml@v1.7.0
117121
with:
122+
model: ${{ vars.CLAUDE_MODEL }}
118123
prompt: |
119124
Mandatory workflow — never skip or reorder:
120125
1. Read the PR diff first.
@@ -174,4 +179,5 @@ jobs:
174179
mcp__github_inline_comment__create_inline_comment are optional —
175180
use them only for specific code suggestions.
176181
secrets:
177-
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
182+
NVIDIA_INFERENCE_URL: ${{ secrets.NVIDIA_INFERENCE_URL }}
183+
NVIDIA_INFERENCE_KEY: ${{ secrets.NVIDIA_INFERENCE_KEY }}

.main.commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
25f6a09440c70ca6135ca44bc4dfbea4726c136a
1+
0823c731ed7d793aef047b6a64f2dbbf32bf6e2c

3rdparty/Megatron-LM

Submodule Megatron-LM updated 143 files

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
## 📣 News
1414
- [06/22/2026] **Megatron Bridge 0.5.0 released!** Highlights include expanded LLM and multimodal support (Qwen3.5, DeepSeek V4, Ernie 4.5, GLM-5/4.7, StepFun Step-3.5/3.7, MiMo-V2, Gemma 4, Falcon H1, Ling MoE V2, Nemotron-3 Nano Omni, Qwen3-Omni, Qwen3-ASR, and Nemotron Diffusion), MegatronMIMO and Energon v7 training updates, evaluator backend integration, eval-time context parallelism, deterministic recipes, quantized FP8/MXFP4 export, CUDA graph/performance improvements, and Megatron Inference/tokenizer unification with Megatron-LM. Huge thanks to our community contributors: [@HowardZorn](https://github.com/HowardZorn), [@hy2826](https://github.com/hy2826), [@bo-ke](https://github.com/bo-ke), [@beccohov](https://github.com/beccohov), [@dhiaEddineRhaiem](https://github.com/dhiaEddineRhaiem), [@pavelgein](https://github.com/pavelgein), [@ccclyu](https://github.com/ccclyu), [@hbhflw2000](https://github.com/hbhflw2000), and [@HollowMan6](https://github.com/HollowMan6)! See the [full release notes](https://github.com/NVIDIA-NeMo/Megatron-Bridge/releases/tag/v0.5.0).
1515

16-
- [06/16/2026] NVIDIA topped [MLPerf Training v6.0](https://developer.nvidia.com/blog/nvidia-blackwell-tops-mlperf-training-6-0-with-industry-leading-scale-and-performance/) across every benchmark, including the new DeepSeek-V3 and GPT-OSS MoE training workloads. Megatron Bridge serves as the packaging layer for the NeMo 26.06 training stack that integrates full-iteration CUDA graphs, HybridEP/router optimizations, all-to-all overlap, MXFP8 attention, and pipeline-layout balancing; the blog highlights [DeepSeek-V3 training](https://github.com/NVIDIA-NeMo/Megatron-Bridge/tree/main/scripts/performance/configs/deepseek) at **1,648 TFLOPS/GPU** (**6,338 tokens/sec/GPU**) on GB300. To try related runs, start from the [performance recipes](https://github.com/NVIDIA-NeMo/Megatron-Bridge/tree/main/scripts/performance); the corresponding container is expected with the NeMo 26.06 release soon.
16+
- [06/16/2026] NVIDIA topped [MLPerf Training v6.0](https://developer.nvidia.com/blog/nvidia-blackwell-tops-mlperf-training-6-0-with-industry-leading-scale-and-performance/) across every benchmark, including the new DeepSeek-V3 and GPT-OSS MoE training workloads. Megatron Bridge serves as the packaging layer for the NeMo 26.06 training stack that integrates full-iteration CUDA graphs, HybridEP/router optimizations, all-to-all overlap, MXFP8 attention, and pipeline-layout balancing; the blog highlights [DeepSeek-V3 training](https://github.com/NVIDIA-NeMo/Megatron-Bridge/tree/main/src/megatron/bridge/perf_recipes/deepseek) at **1,648 TFLOPS/GPU** (**6,338 tokens/sec/GPU**) on GB300. To try related runs, start from the [performance recipes](https://github.com/NVIDIA-NeMo/Megatron-Bridge/tree/main/scripts/performance); the corresponding container is expected with the NeMo 26.06 release soon.
1717

1818
- [06/04/2026] [**NVIDIA Nemotron 3 Ultra**](https://huggingface.co/nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B-BF16) is now public! Day-0 support for the 550B-A55B hybrid Mamba-Transformer MoE model is available on the [`nemotron_3_ultra`](https://github.com/NVIDIA-NeMo/Megatron-Bridge/tree/nemotron_3_ultra) branch, including checkpoint conversion, inference, SFT, PEFT (LoRA), and pretraining examples. Read the [NVIDIA Technical Blog](https://developer.nvidia.com/blog/nvidia-nemotron-3-ultra-powers-faster-more-efficient-reasoning-for-long-running-agents/) and see the [examples README](https://github.com/NVIDIA-NeMo/Megatron-Bridge/blob/nemotron_3_ultra/examples/models/nemotron/nemotron_3/ultra/README.md) for the full walkthrough.
1919

@@ -141,14 +141,14 @@ Training quickstart using pre-configured recipes:
141141

142142
```python
143143
from megatron.bridge import AutoBridge
144-
from megatron.bridge.recipes.llama import llama32_1b_pretrain_config
144+
from megatron.bridge.recipes.llama.h100 import llama32_1b_pretrain_1gpu_h100_bf16_config
145145
from megatron.bridge.training.gpt_step import forward_step
146146
from megatron.bridge.training.pretrain import pretrain
147147

148148
if __name__ == "__main__":
149149
# The recipe uses the Llama 3.2 1B architecture from Hugging Face.
150150
# This is random-init pretraining and does not require a converted Megatron checkpoint.
151-
cfg = llama32_1b_pretrain_config()
151+
cfg = llama32_1b_pretrain_1gpu_h100_bf16_config()
152152

153153
# The recipe already sets cfg.model internally using this pattern.
154154
# Override cfg.model to choose a different Hugging Face model ID as the architecture source.

docker/Dockerfile.ci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
ARG BASE_IMAGE=nvcr.io/nvidia/pytorch:26.04-py3
15+
ARG BASE_IMAGE=nvcr.io/nvidia/pytorch:26.06-py3
1616
FROM ${BASE_IMAGE} AS megatron_bridge
1717
WORKDIR /opt/Megatron-Bridge
1818

docker/Dockerfile.fw_final

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -96,32 +96,6 @@ RUN pip install "starlette==0.49.1" \
9696
# The actual onnx Python package is managed above via pip/uv; this stale copy triggers CVE scanners.
9797
RUN rm -rf /opt/pytorch/pytorch/third_party/onnx
9898

99-
# Patch jackson-core CVE inside Ray's bundled fat-jar (cannot upgrade Ray itself)
100-
RUN JACKSON_VERSION=2.18.6 && \
101-
TMPDIR=$(mktemp -d) && \
102-
wget -q "https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/${JACKSON_VERSION}/jackson-core-${JACKSON_VERSION}.jar" \
103-
-O "${TMPDIR}/jackson-core-fixed.jar" && \
104-
unzip -q "${TMPDIR}/jackson-core-fixed.jar" -d "${TMPDIR}/jackson_fixed" && \
105-
apt-get update && apt-get install -y --no-install-recommends zip && apt-get clean && \
106-
for RAY_JAR in \
107-
/usr/local/lib/python3.12/dist-packages/ray/jars/ray_dist.jar \
108-
/opt/venv/lib/python3.12/site-packages/ray/jars/ray_dist.jar; \
109-
do \
110-
rm -rf "${TMPDIR}/ray_dist" && \
111-
unzip -q "${RAY_JAR}" -d "${TMPDIR}/ray_dist" && \
112-
find "${TMPDIR}/ray_dist" -type d -name "jackson" | while read JACKSON_DIR; do \
113-
rm -rf "${JACKSON_DIR}/core"; \
114-
cp -r "${TMPDIR}/jackson_fixed/com/fasterxml/jackson/core" "${JACKSON_DIR}/core"; \
115-
done && \
116-
find "${TMPDIR}/ray_dist/META-INF" -name "pom.properties" 2>/dev/null | \
117-
xargs grep -l "jackson-core" 2>/dev/null | \
118-
xargs -I{} sed -i "s/^version=.*/version=${JACKSON_VERSION}/" {} ; \
119-
mv "${RAY_JAR}" "${RAY_JAR}.bak" && \
120-
(cd "${TMPDIR}/ray_dist" && zip -qr "${RAY_JAR}" .) && \
121-
rm -f "${RAY_JAR}.bak"; \
122-
done && \
123-
rm -rf "${TMPDIR}"
124-
12599
# Patch wandb-core: bump google.golang.org/grpc from 1.79.2 to 1.79.3 (CVE fix)
126100
ARG TARGETARCH
127101
RUN GRPC_VERSION=1.79.3 && \

docker/patches/vllm.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
diff --git a/utils/torch_utils.py b/utils/torch_utils.py
2-
index 1eb9306ed..0e0008aab 100644
2+
index 9269fbb44..77693bfd6 100644
33
--- a/utils/torch_utils.py
44
+++ b/utils/torch_utils.py
5-
@@ -788,6 +788,9 @@ def is_torch_equal_or_newer(target: str) -> bool:
5+
@@ -828,6 +828,9 @@ def is_torch_equal_or_newer(target: str) -> bool:
66
Returns:
77
Whether the condition meets.
88
"""
9-
+ if target == "2.12.0.dev":
9+
+ if target == "2.13.0.dev":
1010
+ return False
1111
+
1212
try:

docs/fern/versions/nightly/pages/megatron-lm-to-megatron-bridge.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ uv run python scripts/translate_mlm_to_bridge.py \
3030
```bash
3131
# From a Bridge recipe name (defaults exported as MLM args)
3232
uv run python scripts/translate_mlm_to_bridge.py --reverse \
33-
--recipe llama32_1b_pretrain_config
33+
--recipe llama32_1b_pretrain_1gpu_h100_bf16_config
3434

3535
# From a recipe plus inline overrides
3636
uv run python scripts/translate_mlm_to_bridge.py --reverse \
37-
--recipe llama32_1b_pretrain_config \
37+
--recipe llama32_1b_pretrain_1gpu_h100_bf16_config \
3838
--args "train.train_iters=1000 model.tensor_model_parallel_size=2"
3939

4040
# From Bridge overrides only (no recipe)
@@ -99,7 +99,7 @@ Run the generic recipe launcher and override config keys directly:
9999

100100
```bash
101101
uv run python scripts/training/run_recipe.py \
102-
--recipe llama3_8b_pretrain_config \
102+
--recipe llama3_8b_pretrain_2gpu_h100_bf16_config \
103103
--dataset llm-pretrain \
104104
train.micro_batch_size=2 \
105105
train.global_batch_size=128 \

docs/fern/versions/nightly/pages/models/gemma/gemma2.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ config = gemma2_27b_pretrain_config(
166166

167167
#### Gemma 2 2B
168168
```bash
169-
uv run python -m torch.distributed.run --nproc-per-node=8 run/run_recipe.py \
169+
uv run python -m torch.distributed.run --nproc-per-node=8 scripts/training/run_recipe.py \
170170
--pretrained-checkpoint /models/gemma-2-2b \
171171
--recipe gemma2_2b_sft_config \
172172
train.global_batch_size=64 \
@@ -188,7 +188,7 @@ config = gemma2_2b_sft_config(
188188

189189
#### Gemma 2 9B
190190
```bash
191-
uv run python -m torch.distributed.run --nproc-per-node=8 run/run_recipe.py \
191+
uv run python -m torch.distributed.run --nproc-per-node=8 scripts/training/run_recipe.py \
192192
--pretrained-checkpoint /models/gemma-2-9b \
193193
--recipe gemma2_9b_sft_config \
194194
train.global_batch_size=64 \
@@ -198,7 +198,7 @@ checkpoint.save=$SAVE_DIR/gemma2_9b_finetune
198198

199199
#### Gemma 2 27B
200200
```bash
201-
uv run python -m torch.distributed.run --nproc-per-node=16 run/run_recipe.py \
201+
uv run python -m torch.distributed.run --nproc-per-node=16 scripts/training/run_recipe.py \
202202
--pretrained-checkpoint /models/gemma-2-27b \
203203
--recipe gemma2_27b_sft_config \
204204
train.global_batch_size=64 \
@@ -210,7 +210,7 @@ checkpoint.save=$SAVE_DIR/gemma2_27b_finetune
210210

211211
#### Gemma 2 2B
212212
```bash
213-
uv run python -m torch.distributed.run --nproc-per-node=8 run/run_recipe.py \
213+
uv run python -m torch.distributed.run --nproc-per-node=8 scripts/training/run_recipe.py \
214214
--pretrained-checkpoint /models/gemma-2-2b \
215215
--recipe gemma2_2b_peft_config \
216216
--peft_scheme lora \

0 commit comments

Comments
 (0)