Repository navigation
feat(npu): Add FSDP2 LoRA example for Qwen3.8-27B for Ascend NPU - #9920
Merged
hjh0119 merged 2 commits intoAug 18, 2026
Merged
Conversation
Prepare 0-day NPU training script and accelerate config ahead of the Qwen3.8-27B release. Date: 2026/08/14-22:52
zheliuyu
marked this pull request as ready for review
August 14, 2026 17:24
Contributor
Author
@hjh0119 @tastelikefeet The failing citest / unittest job looks unrelated to this PR. This change only adds Ascend example scripts; lint and citest-npu both passed. The GPU unittest failure matches the known CUDA CI issue in #9862: pip install . in ci_container_test.sh re-resolves transformers onto 5.x (and/or later suites get polluted by the StructBERT remote-code install), then imports such as transformers.models.gemma3 fail. Should we wait for that CI fix to land and then re-run unittest before requesting review, or is it fine to review this PR as-is? |
addsubmuldiv
approved these changes
Aug 18, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Add Qwen3.8-27B Ascend NPU FSDP2 LoRA Training Example
ms-swift+flash-linear-attentionNPU adaptationSummary
Qwen3.8 and Qwen3.5 share a similar architecture—both use GDN—so this PR is primarily about demonstrating that
ms-swift +flash-linear-attentionworks on Ascend NPU.The main advantage of this setup is that no extra NPU training stack is required: both
ms-swiftandflash-linear-attentionprovide native NPU support.Timeline for this PR:
ms-swift+flash-linear-attentionfully working on Qwen3.5flash-linear-attentionNPU adaptationms-swiftNPU adaptationPR Type
Description
Adds an FSDP2 + LoRA SFT training example for Qwen3.8-27B on Ascend NPU, ready for post-release NPU adaptation.
New files
examples/ascend/train/qwen3_8/qwen3_8_27b_lora_fsdp2.sh— training entry scriptexamples/ascend/train/qwen3_8/qwen3_8_27b_fsdp2.json— Accelerate FSDP2 configKey points
USE_MCORE_GDN=0), withpacking=trueandmax_length=2048--model_type qwen3_5(Qwen3.8 config also matchesovis_ocr2, so auto-detection fails)ab181c671576fd9cdeed678d216a6273185be700Environment setup
Usage
Results