[NPU]Fix GLM-4.7-Flash failed on NPU (#22509)
This commit is contained in:
@@ -1753,7 +1753,7 @@ class DeepseekV2DecoderLayer(nn.Module):
|
|||||||
hidden_states,
|
hidden_states,
|
||||||
residual,
|
residual,
|
||||||
forward_batch,
|
forward_batch,
|
||||||
self._gfx95_quant_format,
|
getattr(self, "_gfx95_quant_format", ""),
|
||||||
)
|
)
|
||||||
|
|
||||||
hidden_states = self.self_attn(
|
hidden_states = self.self_attn(
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ from typing import Iterable, Optional, Tuple
|
|||||||
|
|
||||||
import torch
|
import torch
|
||||||
import torch.nn.functional as F
|
import torch.nn.functional as F
|
||||||
from sgl_kernel import dsv3_router_gemm
|
|
||||||
from torch import nn
|
from torch import nn
|
||||||
from transformers import PretrainedConfig
|
from transformers import PretrainedConfig
|
||||||
|
|
||||||
@@ -81,6 +80,9 @@ from sglang.srt.utils.hf_transformers_utils import get_rope_config
|
|||||||
_is_cuda = is_cuda()
|
_is_cuda = is_cuda()
|
||||||
_device_sm = get_device_sm()
|
_device_sm = get_device_sm()
|
||||||
|
|
||||||
|
if _is_cuda:
|
||||||
|
from sgl_kernel import dsv3_router_gemm
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user