mirror of
https://github.com/hiyouga/LlamaFactory.git
synced 2026-02-04 09:13:10 +00:00
[v1] fix kernel moe patch (#9867)
This commit is contained in:
@@ -324,7 +324,7 @@ class NpuFusedMoEKernel(BaseKernel):
|
|||||||
if not cls.check_deps():
|
if not cls.check_deps():
|
||||||
raise RuntimeError("torch_npu is not available but NpuMoEFusedMoEKernel was called.")
|
raise RuntimeError("torch_npu is not available but NpuMoEFusedMoEKernel was called.")
|
||||||
|
|
||||||
archs = getattr(model.config, "architectures", [])
|
archs = getattr(model.config, "architectures", None) or []
|
||||||
target_moe_mapping = None
|
target_moe_mapping = None
|
||||||
for arch in archs:
|
for arch in archs:
|
||||||
if arch in kernel_moe_mapping:
|
if arch in kernel_moe_mapping:
|
||||||
|
|||||||
Reference in New Issue
Block a user