[transformers backend] flash-linear-attention availability check misses NPU (device whitelist cuda/xpu/mlu)
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- machine-learning
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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。
- Lenguaje dominante
- Python
- Estrellas
- 270
- Forks
- 68
- Merge medio
- 2 d 16 h
- PR fusionados (30 d)
- 38
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de modelscope/twinkle
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
modelscope/twinkle#429 ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 5/5 Más de una semana Aptitud para principiantes 22/100
modelscope/twinkle#411 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
modelscope/twinkle#408 ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 66/100
modelscope/twinkle#407 ·
Los mantenedores suelen responder en 2 días
-
魔搭托管的 Twinkle API 持续超时Abiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 15/100
modelscope/twinkle#319 · 5 comentarios ·
Los mantenedores suelen responder en 2 días
Todos los issues de modelscope/twinkle
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
AIR-Bench Foundation reads the first letter of the word after "answer" as the model's choicePosiblemente ocupada @beartester34 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
modelscope/evalscope#2330 ·
Los mantenedores suelen responder en 1 día
-
Distribution plot crashes when a numeric feature is constant in the train or test setPosiblemente ocupada @adembilge la tomó hoy. Abiertobug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
MAIF/shapash#847 · 1 comentario ·
Los mantenedores suelen responder en 10 días
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 2 días
-
namespace team:operations
Dificultad 2/5 1-3 horas Aptitud para principiantes 60/100
EclipseFdn/open-vsx.org#16738 ·
Los mantenedores suelen responder en 1 día