A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 7, 04:00 UTC
[Security] Respect user trust_remote_code setting in NemotronVL and KimiK25 (#36192)
Signed-off-by: Russell Bryant <rbryant@redhat.com>
Russell Bryant committed
Mar 6, 2026 at 01:15 UTC
00bd08edeee5dd4d4c13277c0114a464011acf72
2 files changed
+7
-2
vllm/model_executor/models/kimi_k25.py
+2
-1
@@ -174,7 +174,8 @@ class KimiK25ProcessingInfo(BaseProcessingInfo):
174
self.hf_config = self.get_hf_config()
175
self.media_token_id = self.hf_config.media_placeholder_token_id
176
media_processor = cached_get_image_processor(
177
- self.ctx.model_config.model, trust_remote_code=True
177
+ self.ctx.model_config.model,
178
+ trust_remote_code=self.ctx.model_config.trust_remote_code,
179
)
180
self.media_processor = media_processor
181
self.hf_processor = MoonshotKimiVAutoProcessor(
vllm/model_executor/models/nemotron_vl.py
+5
-1
@@ -402,6 +402,7 @@ class LlamaNemotronVLChatModel(nn.Module, SupportsMultiModal, SupportsPP, Suppor
402
multimodal_config = vllm_config.model_config.multimodal_config
403
404
self.config = config
405
+ self.model_config = vllm_config.model_config
406
self.multimodal_config = multimodal_config
407
self._patch_quant_config(config, quant_config)
408
@@ -456,7 +457,10 @@ class LlamaNemotronVLChatModel(nn.Module, SupportsMultiModal, SupportsPP, Suppor
457
*,
458
prefix: str,
459
):
459
- return AutoModel.from_config(config.vision_config, trust_remote_code=True)
460
+ return AutoModel.from_config(
461
+ config.vision_config,
462
+ trust_remote_code=self.model_config.trust_remote_code,
463
+ )
464
465
def _init_mlp1(
466
self,