[transformers backend] flash-linear-attention availability check misses NPU (device whitelist cuda/xpu/mlu)
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
Start by locating Twinkle’s linear_attention_sp availability check and how it uses Transformers’ is_flash_linear_attention_available(); the issue does not name a file or test. Compare the current check with the reported successful fla import on Ascend NPU, then verify that the availability decision allows the reported Qwen3.5 packing/SP path to use FLA. The issue says a patch has been submitted and a PR is to follow, so check for that work before starting.
索引モデルが issue の本文から書いたものです。
説明
Checklist / 检查清单
- I have searched existing issues, and this is a new bug report. / 我已经搜索过现有的 issues,确认这是一个新的 bug report。
Bug Description / Bug 描述
Qwen3.5 GatedDeltaNet 在 SP/packing 布局下依赖 flash-linear-attention(import 名为
fla)。twinkle 复用 transformers 的 is_flash_linear_attention_available(),其设备
白名单只含 cuda/xpu/mlu——Ascend NPU 上即使 fla 已安装且 triton-ascend 内核可用,
也被误判为不可用,GDN 走慢路径或直接报错。
How to Reproduce / 如何复现
- Ascend NPU + torch_npu + triton(带 ascend backend)+ pip install flash-linear-attention
- python: import fla 成功,但 twinkle 的 linear_attention_sp 判定 FLA 不可用
(is_flash_linear_attention_available() 返回 False)。 - Qwen3.5-4B packing/SP 训练时 GDN 无法使用 FLA 内核。
期望:改为包探测(importlib.util.find_spec('fla')),或设备白名单加入 NPU。
Additional Information / 补充信息
- twinkle: dev-swift-v5 @ dd3d68f
- Hardware: Ascend910 x2, torch_npu 2.10.0.post7, triton-ascend 3.6.0+
- fla 0.6.0 在 NPU 上实测可用(Qwen3.5-4B / MoE SP 训练 20 步 PASS)
- 我们提交了包探测补丁(与 transformers 白名单取"或",CUDA 行为不变),PR to follow。
- 主要言語
- Python
- スター
- 270
- フォーク
- 68
- 平均マージ
- 2日 16時間
- マージ済み PR(30日)
- 38
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
modelscope/twinkle のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
modelscope/twinkle#429 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 5/5 1週間以上 初心者へのやさしさ 22/100
modelscope/twinkle#411 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
modelscope/twinkle#408 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 66/100
modelscope/twinkle#407 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
modelscope/twinkle#319 · コメント 5 件 ·
メンテナーはふだん 2 日以内に返信
modelscope/twinkle の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
AIR-Bench Foundation reads the first letter of the word after "answer" as the model's choice対応中かも @beartester34 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
modelscope/evalscope#2330 ·
メンテナーはふだん 1 日以内に返信
-
Distribution plot crashes when a numeric feature is constant in the train or test set対応中かも @adembilge が今日担当しました。 オープンbug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 10 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 2 日以内に返信
-
namespace team:operations
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
EclipseFdn/open-vsx.org#16738 ·
メンテナーはふだん 1 日以内に返信