[feat]Ascend NPU Gemma-3-12b and Gemma-3-27b support (#8909)

This commit is contained in:
VDV1985 authored and GitHub committed 2025-08-31 00:25:07 -07:00
1 parent c112bcc461
commit ba861293cf
6 files changed
+136 -30

No files matched your search

@@ -13,7 +13,9 @@ from PIL import Image
from transformers import BaseImageProcessorFast
from sglang.srt.managers.schedule_batch import Modality, MultimodalDataItem
from sglang.srt.utils import load_audio, load_image, load_video, logger
from sglang.srt.utils import is_npu, load_audio, load_image, load_video, logger
_is_npu = is_npu()
@dataclasses.dataclass
@@ -232,7 +234,7 @@ class BaseMultimodalProcessor(ABC):
and isinstance(processor.image_processor, BaseImageProcessorFast)
and not self.server_args.disable_fast_image_processor
):
kwargs["device"] = "cuda"
kwargs["device"] = "cuda" if not _is_npu else "npu"
result = processor.__call__(
text=[input_text],
padding=True,