Skip to content

feat: Add YaRN rope scaling support on Magatron-Bridge#2052

Closed
RayenTian wants to merge 5 commits intomainfrom
ruit/yarn
Closed

feat: Add YaRN rope scaling support on Magatron-Bridge#2052
RayenTian wants to merge 5 commits intomainfrom
ruit/yarn

Conversation

@RayenTian
Copy link
Copy Markdown
Contributor

@RayenTian RayenTian commented Mar 3, 2026

What does this PR do ?

SFT

image

GRPO

image

Issues

close #1678

Usage

  • You can potentially add a usage example below

SFT

NRL_FORCE_REBUILD_VENVS=true \
uv run examples/run_sft.py \
        --config examples/configs/sft_openmathinstruct2_megatron.yaml \
        policy.model_name=${MODEL} \
        sft.max_num_steps=100 \
        policy.max_total_sequence_length=8192 \
        checkpointing.enabled=false \
        cluster.num_nodes=1 \
        ++policy.hf_config_overrides.rope_scaling.rope_type="yarn" \
        ++policy.hf_config_overrides.rope_scaling.factor=6.0 \
        ++policy.hf_config_overrides.rope_scaling.original_max_position_embeddings=32768

GRPO

uv run python examples/run_grpo.py \
    --config=examples/configs/grpo_math_1B_megatron.yaml \
    policy.model_name=${MODEL} \
    grpo.max_num_steps=100\
    ++policy.hf_config_overrides.rope_scaling.rope_type=yarn \
    ++policy.hf_config_overrides.rope_scaling.factor=6.0 \
    ++policy.hf_config_overrides.rope_scaling.original_max_position_embeddings=32768 \
    ++policy.generation.vllm_kwargs.hf_overrides.rope_scaling.rope_type=yarn \
    ++policy.generation.vllm_kwargs.hf_overrides.rope_scaling.factor=6.0 \
    ++policy.generation.vllm_kwargs.hf_overrides.rope_scaling.original_max_position_embeddings=32768 \
    logger.wandb_enabled=false \
    checkpointing.enabled=false \
    cluster.num_nodes=1

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you run the unit tests and functional tests locally? Visit our Testing Guide for how to run tests
  • Did you add or update any necessary documentation? Visit our Document Development Guide for how to write, build and test the docs.

Additional Information

  • ...

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 3, 2026

✅ Submodule Fast-Forward Check Results

Check based on commit: 3f16d49 (PR #2052 from ruit/yarn)

✅ Submodules that are properly updated:

Megatron-Bridge: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 3, 2026

✅ Submodule Fast-Forward Check Results

Check based on commit: dea9529 (PR #2052 from ruit/yarn)

✅ Submodules that are properly updated:

Megatron-Bridge: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 3, 2026

✅ Submodule Fast-Forward Check Results

Check based on commit: e4dc70a (PR #2052 from ruit/yarn)

✅ Submodules that are properly updated:

Megatron-Bridge: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@github-actions github-actions Bot added the Documentation Improvements or additions to documentation label Mar 4, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 4, 2026

✅ Submodule Fast-Forward Check Results

Check based on commit: 6e11596 (PR #2052 from ruit/yarn)

✅ Submodules that are properly updated:

Megatron-Bridge: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Mar 6, 2026

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.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 6, 2026

✅ Submodule Fast-Forward Check Results

Check based on commit: 1a1d65b (PR #2052 from ruit/yarn)

✅ Submodules that are properly updated:

Megatron-Bridge: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@RayenTian RayenTian force-pushed the ruit/yarn branch 2 times, most recently from d9d9d08 to 62789ac Compare March 12, 2026 03:57
@github-actions
Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: 62789ac (PR #2052 from ruit/yarn)

✅ Submodules that are properly updated:

Megatron-Bridge: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@github-actions
Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: ef29608 (PR #2052 from ruit/yarn)

✅ Submodules that are properly updated:

Megatron-Bridge: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@github-actions
Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: d386e40 (PR #2052 from ruit/yarn)

✅ Submodules that are properly updated:

Megatron-Bridge: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@RayenTian RayenTian added the CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version) label Mar 12, 2026
Signed-off-by: ruit <ruit@nvidia.com>
Signed-off-by: ruit <ruit@nvidia.com>
@RayenTian RayenTian added CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version) and removed CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version) labels Mar 12, 2026
@RayenTian
Copy link
Copy Markdown
Contributor Author

/ok to test d9cdeb4

@github-actions
Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: d9cdeb4 (PR #2052 from ruit/yarn)

✅ Submodules that are properly updated:

Megatron-Bridge: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

Signed-off-by: ruit <ruit@nvidia.com>
Signed-off-by: ruit <ruit@nvidia.com>
@RayenTian RayenTian closed this Apr 2, 2026
@RayenTian RayenTian deleted the ruit/yarn branch April 8, 2026 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version) Documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can we apply yarn to Nemo-RL

1 participant