[NPU]Fix GLM-4.7-Flash failed on NPU (#22509)

This commit is contained in:
Todobe
2026-04-23 01:06:58 +08:00
committed by GitHub
parent 0addd185af
commit 92f28e9ba8
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -1753,7 +1753,7 @@ class DeepseekV2DecoderLayer(nn.Module):
hidden_states,
residual,
forward_batch,
self._gfx95_quant_format,
getattr(self, "_gfx95_quant_format", ""),
)
hidden_states = self.self_attn(
+3 -1
View File
@@ -20,7 +20,6 @@ from typing import Iterable, Optional, Tuple
import torch
import torch.nn.functional as F
from sgl_kernel import dsv3_router_gemm
from torch import nn
from transformers import PretrainedConfig
@@ -81,6 +80,9 @@ from sglang.srt.utils.hf_transformers_utils import get_rope_config
_is_cuda = is_cuda()
_device_sm = get_device_sm()
if _is_cuda:
from sgl_kernel import dsv3_router_gemm
logger = logging.getLogger(__name__)