[feat]Ascend NPU Gemma-3-12b and Gemma-3-27b support (#8909)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user