Repository navigation
[recipe] feat: Add Qwen3.5 LLM-only SFT recipes with skip_megatron_pa… #3037
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 9 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
5e9e81c
[recipe] feat: Add Qwen3.5 LLM-only SFT recipes with skip_megatron_pa…
cuichenx fa2a200
fix: Fix llm_sft.sh REPO_ROOT path, packing config, and test mock
cuichenx b425c64
Merge origin/main into chcui/qwen35-llm-sft-recipe
cuichenx 5a5d772
Merge remote-tracking branch 'origin/main' into chcui/qwen35-llm-sft-…
cuichenx c7510dd
[test] feat: add T1.4 streaming skip test and T2.2 functional vision-…
cuichenx 837874e
[test] feat: add T2.5 optimizer state functional test for Qwen3.5 LLM…
cuichenx 1478bbc
[test] feat: add T2.6/T2.7/T2.8 functional tests for Qwen3.5 LLM-only…
cuichenx 6d59e64
Merge branch 'main' into chcui/qwen35-llm-sft-recipe
cuichenx 6c1384b
[test] fix: move qwen35 LLM functional tests to test_groups, add laun…
cuichenx 833db9a
[recipe, model] refactor: Skip vision tower init in Qwen3.5 LLM-only SFT
cuichenx 2e37443
[ckpt, model] refactor: remove unused skip_megatron_param_globs API
cuichenx ae69676
[model, recipe] refactor: rename Qwen3.5-VL provider field init_visio…
cuichenx 76a6831
[test] test: verify checkpoint resume via sentinel weight round-trip
cuichenx b7c21d1
[test] test: extend weight parity to fused QKV and gate_up layouts
cuichenx 6708918
[test] test: add peak GPU memory ceiling to T2.5
cuichenx b9ed11f
[recipe, test] refactor: drop no-op freeze_vision_* in qwen35_llm recipe
cuichenx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| #!/usr/bin/env bash | ||
| # Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| set -euo pipefail | ||
|
|
||
| # ============================================================================== | ||
| # Qwen3.5 LLM-only SFT on SQuAD (HF VLM checkpoint, vision weights skipped) | ||
| # | ||
| # Uses scripts/training/run_recipe.py with: | ||
| # - Recipes from megatron.bridge.recipes (qwen35_llm_*_sft_config) | ||
| # - --step_func vlm_step (text-only batches; no images) | ||
| # | ||
| # From the Bridge repository root: | ||
| # ./examples/models/vlm/qwen35_vl/llm_sft.sh | ||
| # | ||
| # Environment overrides: | ||
| # NPROC_PER_NODE GPUs per node (default: 8) | ||
| # RECIPE Recipe name (default: qwen35_llm_800m_sft_config) | ||
| # HF_PATH HF model id or local directory (default: Qwen/Qwen3.5-0.8B) | ||
| # EXTRA_ARGS Extra args passed to run_recipe.py (Hydra-style overrides) | ||
| # | ||
| # Examples: | ||
| # RECIPE=qwen35_llm_2b_sft_config HF_PATH=Qwen/Qwen3.5-2B ./examples/models/vlm/qwen35_vl/llm_sft.sh | ||
| # | ||
| # EXTRA_ARGS="train.train_iters=500 checkpoint.save=/tmp/qwen35_llm_ckpt" \ | ||
| # ./examples/models/vlm/qwen35_vl/llm_sft.sh | ||
| # | ||
| # Optional: pin dataset via run_recipe (default SQuAD matches the recipe): | ||
| # EXTRA_ARGS="--dataset llm-finetune dataset.dataset_name=squad" \ | ||
| # ./examples/models/vlm/qwen35_vl/llm_sft.sh | ||
| # ============================================================================== | ||
|
|
||
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
| REPO_ROOT="$(cd "${SCRIPT_DIR}/../../../.." && pwd)" | ||
| cd "${REPO_ROOT}" | ||
|
|
||
| NPROC_PER_NODE="${NPROC_PER_NODE:-8}" | ||
| RECIPE="${RECIPE:-qwen35_llm_800m_sft_config}" | ||
| HF_PATH="${HF_PATH:-Qwen/Qwen3.5-0.8B}" | ||
|
|
||
| # shellcheck disable=SC2086 | ||
| exec uv run torchrun --nproc_per_node="${NPROC_PER_NODE}" scripts/training/run_recipe.py \ | ||
| --recipe "${RECIPE}" \ | ||
| --step_func vlm_step \ | ||
| --hf_path "${HF_PATH}" \ | ||
| ${EXTRA_ARGS:-} | ||
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: This file has mode
100644(not executable), but it has a shebang and the README tells users to run it directly (./examples/models/vlm/qwen35_vl/llm_sft.sh). Considerchmod +x.