[NPU] bugfix with Kimi-k2 and bge-reranker-v2 model (#17478)
Co-authored-by: amote-i <49533125+amote-i@users.noreply.github.com> Co-authored-by: cy <chenyang08056032@163.com>
This commit is contained in:
committed by
GitHub
co-authored by
amote-i
cy
parent
a4dc432587
commit
5d299c25c0
@@ -1648,7 +1648,7 @@ class NPUCompressedTensorsW4A16Int4DynamicMoEMethod(CompressedTensorsMoEMethod):
|
||||
self.num_experts = num_experts
|
||||
if (
|
||||
extra_weight_attrs.get(
|
||||
"intermediate_size_full", intermediate_size_per_partition
|
||||
"moe_intermediate_size", intermediate_size_per_partition
|
||||
)
|
||||
// intermediate_size_per_partition
|
||||
> 1
|
||||
|
||||
@@ -115,9 +115,10 @@ class RotaryEmbedding(MultiPlatformOp):
|
||||
cache = cache.to(dtype)
|
||||
|
||||
if (
|
||||
(not (_is_cuda or _is_npu) or self.head_size not in [64, 128, 256, 512])
|
||||
(not (_is_cuda) or self.head_size not in [64, 128, 256, 512])
|
||||
and not (_is_cpu)
|
||||
and not (_is_xpu)
|
||||
and not (_is_npu)
|
||||
):
|
||||
if _is_cuda or _is_hip:
|
||||
from sgl_kernel import rotary_embedding
|
||||
|
||||
Reference in New Issue
Block a user