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_moe import Lfm2MoeConfig
|
||||||
from sglang.srt.configs.lfm2_vl import Lfm2VlConfig
|
from sglang.srt.configs.lfm2_vl import Lfm2VlConfig
|
||||||
from sglang.srt.configs.longcat_flash import LongcatFlashConfig
|
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.nemotron_h import NemotronHConfig
|
||||||
from sglang.srt.configs.olmo3 import Olmo3Config
|
from sglang.srt.configs.olmo3 import Olmo3Config
|
||||||
from sglang.srt.configs.qwen3_5 import Qwen3_5Config, Qwen3_5MoeConfig
|
from sglang.srt.configs.qwen3_5 import Qwen3_5Config, Qwen3_5MoeConfig
|
||||||
@@ -61,6 +64,7 @@ __all__ = [
|
|||||||
"Lfm2VlConfig",
|
"Lfm2VlConfig",
|
||||||
"NemotronHConfig",
|
"NemotronHConfig",
|
||||||
"NemotronH_Nano_VL_V2_Config",
|
"NemotronH_Nano_VL_V2_Config",
|
||||||
|
"NemotronH_Nano_Omni_Reasoning_V3_Config",
|
||||||
"JetNemotronConfig",
|
"JetNemotronConfig",
|
||||||
"JetVLMConfig",
|
"JetVLMConfig",
|
||||||
"Step3p5Config",
|
"Step3p5Config",
|
||||||
|
|||||||
@@ -1387,6 +1387,7 @@ multimodal_model_archs = [
|
|||||||
"MllamaForConditionalGeneration",
|
"MllamaForConditionalGeneration",
|
||||||
"MossVLForConditionalGeneration",
|
"MossVLForConditionalGeneration",
|
||||||
"NemotronH_Nano_VL_V2",
|
"NemotronH_Nano_VL_V2",
|
||||||
|
"NemotronH_Nano_Omni_Reasoning_V3",
|
||||||
"PixtralForConditionalGeneration",
|
"PixtralForConditionalGeneration",
|
||||||
"Qwen2AudioForConditionalGeneration",
|
"Qwen2AudioForConditionalGeneration",
|
||||||
"Qwen2VLForConditionalGeneration",
|
"Qwen2VLForConditionalGeneration",
|
||||||
|
|||||||
@@ -150,3 +150,12 @@ class NemotronH_Nano_VL_V2_Config(PretrainedConfig):
|
|||||||
video_maintain_aspect_ratio=self.video_maintain_aspect_ratio,
|
video_maintain_aspect_ratio=self.video_maintain_aspect_ratio,
|
||||||
)
|
)
|
||||||
return radio_config
|
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)
|
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
|
import torch
|
||||||
from PIL import Image
|
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 (
|
from sglang.srt.managers.schedule_batch import (
|
||||||
Modality,
|
Modality,
|
||||||
MultimodalDataItem,
|
MultimodalDataItem,
|
||||||
MultimodalProcessorOutput,
|
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.models.parakeet import ParakeetExtractor
|
||||||
from sglang.srt.multimodal.audio_from_video import extract_audio_from_video_bytes
|
from sglang.srt.multimodal.audio_from_video import extract_audio_from_video_bytes
|
||||||
from sglang.srt.multimodal.evs import EVSProcessor
|
from sglang.srt.multimodal.evs import EVSProcessor
|
||||||
@@ -51,7 +57,7 @@ MAX_FRAMES = 128
|
|||||||
|
|
||||||
|
|
||||||
class NanoNemotronVLImageProcessor(BaseMultimodalProcessor):
|
class NanoNemotronVLImageProcessor(BaseMultimodalProcessor):
|
||||||
models = [NemotronH_Nano_VL_V2]
|
models = [NemotronH_Nano_VL_V2, NemotronH_Nano_Omni_Reasoning_V3]
|
||||||
gpu_image_decode = (
|
gpu_image_decode = (
|
||||||
False # NanoNemotronVL processes loaded image as PIL image explicitly
|
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):
|
def __init__(self, hf_config, server_args, _image_processor, *args, **kwargs):
|
||||||
super().__init__(hf_config, server_args, _image_processor, *args, **kwargs)
|
super().__init__(hf_config, server_args, _image_processor, *args, **kwargs)
|
||||||
self.evs = EVSProcessor(
|
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
|
Image.MAX_IMAGE_PIXELS = None
|
||||||
self.image_size = hf_config.image_size
|
self.image_size = hf_config.image_size
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ from sglang.srt.configs import (
|
|||||||
KimiVLConfig,
|
KimiVLConfig,
|
||||||
LongcatFlashConfig,
|
LongcatFlashConfig,
|
||||||
MultiModalityConfig,
|
MultiModalityConfig,
|
||||||
|
NemotronH_Nano_Omni_Reasoning_V3_Config,
|
||||||
NemotronH_Nano_VL_V2_Config,
|
NemotronH_Nano_VL_V2_Config,
|
||||||
NemotronHConfig,
|
NemotronHConfig,
|
||||||
Olmo3Config,
|
Olmo3Config,
|
||||||
@@ -87,6 +88,7 @@ _CONFIG_REGISTRY: Dict[str, Type[PretrainedConfig]] = {
|
|||||||
DotsVLMConfig,
|
DotsVLMConfig,
|
||||||
DotsOCRConfig,
|
DotsOCRConfig,
|
||||||
NemotronH_Nano_VL_V2_Config,
|
NemotronH_Nano_VL_V2_Config,
|
||||||
|
NemotronH_Nano_Omni_Reasoning_V3_Config,
|
||||||
NemotronHConfig,
|
NemotronHConfig,
|
||||||
DeepseekVLV2Config,
|
DeepseekVLV2Config,
|
||||||
Qwen3_5Config,
|
Qwen3_5Config,
|
||||||
|
|||||||
Reference in New Issue
Block a user