model: Nemotron-omni-v3-alias (#23857)
This commit is contained in:
@@ -19,7 +19,10 @@ from sglang.srt.configs.lfm2 import Lfm2Config
|
||||
from sglang.srt.configs.lfm2_moe import Lfm2MoeConfig
|
||||
from sglang.srt.configs.lfm2_vl import Lfm2VlConfig
|
||||
from sglang.srt.configs.longcat_flash import LongcatFlashConfig
|
||||
from sglang.srt.configs.nano_nemotron_vl import NemotronH_Nano_VL_V2_Config
|
||||
from sglang.srt.configs.nano_nemotron_vl import (
|
||||
NemotronH_Nano_Omni_Reasoning_V3_Config,
|
||||
NemotronH_Nano_VL_V2_Config,
|
||||
)
|
||||
from sglang.srt.configs.nemotron_h import NemotronHConfig
|
||||
from sglang.srt.configs.olmo3 import Olmo3Config
|
||||
from sglang.srt.configs.qwen3_5 import Qwen3_5Config, Qwen3_5MoeConfig
|
||||
@@ -61,6 +64,7 @@ __all__ = [
|
||||
"Lfm2VlConfig",
|
||||
"NemotronHConfig",
|
||||
"NemotronH_Nano_VL_V2_Config",
|
||||
"NemotronH_Nano_Omni_Reasoning_V3_Config",
|
||||
"JetNemotronConfig",
|
||||
"JetVLMConfig",
|
||||
"Step3p5Config",
|
||||
|
||||
@@ -1387,6 +1387,7 @@ multimodal_model_archs = [
|
||||
"MllamaForConditionalGeneration",
|
||||
"MossVLForConditionalGeneration",
|
||||
"NemotronH_Nano_VL_V2",
|
||||
"NemotronH_Nano_Omni_Reasoning_V3",
|
||||
"PixtralForConditionalGeneration",
|
||||
"Qwen2AudioForConditionalGeneration",
|
||||
"Qwen2VLForConditionalGeneration",
|
||||
|
||||
@@ -150,3 +150,12 @@ class NemotronH_Nano_VL_V2_Config(PretrainedConfig):
|
||||
video_maintain_aspect_ratio=self.video_maintain_aspect_ratio,
|
||||
)
|
||||
return radio_config
|
||||
|
||||
|
||||
class NemotronH_Nano_Omni_Reasoning_V3_Config(NemotronH_Nano_VL_V2_Config):
|
||||
model_type = "NemotronH_Nano_Omni_Reasoning_V3"
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
# Explicit __init__ prevents PretrainedConfig.__init_subclass__ from
|
||||
# replacing the parent's custom __init__ with a dataclass-generated one.
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
@@ -372,4 +372,8 @@ class NemotronH_Nano_VL_V2(EVS):
|
||||
self.sound_encoder.load_weights(sound_weights)
|
||||
|
||||
|
||||
EntryClass = [NemotronH_Nano_VL_V2]
|
||||
class NemotronH_Nano_Omni_Reasoning_V3(NemotronH_Nano_VL_V2):
|
||||
pass
|
||||
|
||||
|
||||
EntryClass = [NemotronH_Nano_VL_V2, NemotronH_Nano_Omni_Reasoning_V3]
|
||||
|
||||
@@ -19,13 +19,19 @@ import numpy as np
|
||||
import torch
|
||||
from PIL import Image
|
||||
|
||||
from sglang.srt.configs.nano_nemotron_vl import NemotronH_Nano_VL_V2_Config
|
||||
from sglang.srt.configs.nano_nemotron_vl import (
|
||||
NemotronH_Nano_Omni_Reasoning_V3_Config,
|
||||
NemotronH_Nano_VL_V2_Config,
|
||||
)
|
||||
from sglang.srt.managers.schedule_batch import (
|
||||
Modality,
|
||||
MultimodalDataItem,
|
||||
MultimodalProcessorOutput,
|
||||
)
|
||||
from sglang.srt.models.nano_nemotron_vl import NemotronH_Nano_VL_V2
|
||||
from sglang.srt.models.nano_nemotron_vl import (
|
||||
NemotronH_Nano_Omni_Reasoning_V3,
|
||||
NemotronH_Nano_VL_V2,
|
||||
)
|
||||
from sglang.srt.models.parakeet import ParakeetExtractor
|
||||
from sglang.srt.multimodal.audio_from_video import extract_audio_from_video_bytes
|
||||
from sglang.srt.multimodal.evs import EVSProcessor
|
||||
@@ -51,7 +57,7 @@ MAX_FRAMES = 128
|
||||
|
||||
|
||||
class NanoNemotronVLImageProcessor(BaseMultimodalProcessor):
|
||||
models = [NemotronH_Nano_VL_V2]
|
||||
models = [NemotronH_Nano_VL_V2, NemotronH_Nano_Omni_Reasoning_V3]
|
||||
gpu_image_decode = (
|
||||
False # NanoNemotronVL processes loaded image as PIL image explicitly
|
||||
)
|
||||
@@ -59,7 +65,11 @@ class NanoNemotronVLImageProcessor(BaseMultimodalProcessor):
|
||||
def __init__(self, hf_config, server_args, _image_processor, *args, **kwargs):
|
||||
super().__init__(hf_config, server_args, _image_processor, *args, **kwargs)
|
||||
self.evs = EVSProcessor(
|
||||
hf_config, {NemotronH_Nano_VL_V2_Config: NemotronH_Nano_VL_V2}
|
||||
hf_config,
|
||||
{
|
||||
NemotronH_Nano_VL_V2_Config: NemotronH_Nano_VL_V2,
|
||||
NemotronH_Nano_Omni_Reasoning_V3_Config: NemotronH_Nano_Omni_Reasoning_V3,
|
||||
},
|
||||
)
|
||||
Image.MAX_IMAGE_PIXELS = None
|
||||
self.image_size = hf_config.image_size
|
||||
|
||||
@@ -39,6 +39,7 @@ from sglang.srt.configs import (
|
||||
KimiVLConfig,
|
||||
LongcatFlashConfig,
|
||||
MultiModalityConfig,
|
||||
NemotronH_Nano_Omni_Reasoning_V3_Config,
|
||||
NemotronH_Nano_VL_V2_Config,
|
||||
NemotronHConfig,
|
||||
Olmo3Config,
|
||||
@@ -87,6 +88,7 @@ _CONFIG_REGISTRY: Dict[str, Type[PretrainedConfig]] = {
|
||||
DotsVLMConfig,
|
||||
DotsOCRConfig,
|
||||
NemotronH_Nano_VL_V2_Config,
|
||||
NemotronH_Nano_Omni_Reasoning_V3_Config,
|
||||
NemotronHConfig,
|
||||
DeepseekVLV2Config,
|
||||
Qwen3_5Config,
|
||||
|
||||
Reference in New Issue
Block a user