[Feature Request] Improve Ling-3.0-tiny LoRA SFT support on Ascend NPU
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 20/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- machine-learning
Direzione di ricerca
Start with the proposed comparison branch linked in the issue and inspect its model compatibility changes, padding and packing support, FSDP2 LoRA example, and regression tests. Check how those changes handle Transformers 4.57.1 and 5.14.1, Ascend NPU training, and the listed MLA, KDA, and ShortConvolution paths. Done means the regression tests pass and the FSDP2 LoRA SFT example runs with the stated BF16 and attention settings.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Checklist / 检查清单
- I have searched existing issues, and this is a new feature request. / 我已经搜索过现有的 issues,确认这是一个新的 Feature Request。
Feature Request Description / Feature Request 描述
While working on LoRA supervised fine-tuning of inclusionAI/Ling-3.0-tiny on Ascend NPUs using ms-swift, we encountered several compatibility issues with the model's attention implementation and training pipeline.
Although Ling-3.0-tiny is already registered in ms-swift, the following issues affect its training:
- Transformers compatibility: RoPE initialization and buffer handling require adaptation for Transformers 5.x.
- MLA attention: The attention implementation does not always follow the configured backend, which can lead to incorrect causal masking.
- KDA and ShortConvolution: Short sequences and certain convolution paths require additional handling to ensure correct gradient propagation.
- Padding and packing: Left/right padding and padding-free packing require proper attention mask handling and sequence-boundary information across MLA and KDA layers.
I would like to improve Ling-3.0-tiny training support on Ascend NPUs by addressing these issues and providing a reproducible FSDP2 LoRA SFT example.
The proposed support includes Transformers 4.57.1 and 5.14.1, BF16, FlashAttention 2, regular padding, and sequential padding-free packing.
Pull Request / Pull Request 信息
I have prepared and validated a corresponding implementation:
The changes include model-specific compatibility fixes, padding and packing support, an Ascend FSDP2 LoRA training example, and regression tests.
I plan to submit a PR referencing this issue.
- Lingua principale
- Python
- Stelle
- 16.2k
- Fork
- 1.8k
- Merge medio
- 1g 14h
- PR unite (30g)
- 68
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di modelscope/ms-swift
-
get_multimodal_target_regex(..., exclude_router=True) does not exclude shared_expert_gateForse già presa @KonnyakuMatcha l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
modelscope/ms-swift#10696 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] GRPO REAL loss crashes with beta>0 and kl_in_reward=True (NoneType * Tensor)Forse già presa @newcloud123 l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
modelscope/ms-swift#10690 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] GRPO REAL loss divides by all groups instead of valid groups, silently scaling gradientsForse già presa @newcloud123 l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
modelscope/ms-swift#10688 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 Mezza giornata Idoneità per principianti 62/100
modelscope/ms-swift#10621 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] `get_seed` consumes a draw from the shared RandomState even when decision augmentation is disabled, changing the train/val split and dataset shuffleForse già presa @ryznren l’ha presa 38 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
modelscope/ms-swift#10466 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di modelscope/ms-swift
Issue simili
-
Test: to_hijri() accepts datetime.datetime and uses only the date partForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertagood first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
omarelshamy25x/shamy-hijri#63 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
polish
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
521xueweihan/HelloGitHub#4729 ·
-
[Bug]: Score parser reads parts of scientific notation as valid scoresForse già presa @AshutoshSingh840 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
UKGovernmentBEIS/control-arena#992 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
mvalentsev/awesome-free-ai-coding#70 ·
I maintainer di solito rispondono entro 1 giorno