model(vlm): mistral 3.1 (#5099)

Co-authored-by: KivenChen <sleigh-queue-0y@icloud.com>
This commit is contained in:
Kiv Chen
2025-05-16 18:36:18 -07:00
committed by GitHub
parent 69748d088d
commit 64825b8395
6 changed files with 152 additions and 21 deletions

View File

@@ -20,6 +20,7 @@ from sglang.srt.models.llava import (
LlavaQwenForCausalLM,
)
from sglang.srt.models.llavavid import LlavaVidForCausalLM
from sglang.srt.models.mistral import Mistral3ForConditionalGeneration
from sglang.srt.utils import load_image, logger
from sglang.utils import get_exception_traceback
@@ -176,10 +177,10 @@ class LlavaImageProcessor(BaseMultimodalProcessor):
class LlavaMultimodalProcessor(BaseMultimodalProcessor):
"""
This is a wrapper class used to identify the multimodal processor for Llava architecture models.
This is a wrapper class used to identify the multimodal processor for Llava architectures' vision model.
"""
models = [LlavaForConditionalGeneration]
models = [LlavaForConditionalGeneration, Mistral3ForConditionalGeneration]
def _get_sgl_processor_cls(self, model_type: str):
if hf_name := HF_MAPPING_NAMES.get(model_type):