@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 437f9162d0
Fork 0

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 15, 18:30 UTC

[Model] Pixtral: Remove layer instantiation duplication (#15053)

Signed-off-by: Julien Denize <julien.denize@mistral.ai>

Julien Denize committed Mar 19, 2025 at 03:34 UTC 437f9162d0eacf5b3f179c864c9664dfc8a020ff
1 file changed -9
vllm/model_executor/models/pixtral.py
-9
@@ -365,16 +365,7 @@ class PixtralForConditionalGeneration(nn.Module, SupportsMultiModal,
365 spatial_merge_size=self.vision_args.spatial_merge_size,
366 use_mlp_bias=False,
367 )
368 - if self.vision_args.add_pre_mm_projector_layer_norm:
369 - self.pre_mm_projector_norm = RMSNorm(self.vision_args.hidden_size,
370 - eps=1e-5)
368
372 - if self.vision_args.mm_projector_id == PATCH_MERGE:
373 - self.patch_merger = PatchMerger(
374 - vision_encoder_dim=self.vision_args.hidden_size,
375 - spatial_merge_size=self.vision_args.spatial_merge_size,
376 - use_mlp_bias=False,
377 - )
369 self.vision_language_adapter = VisionLanguageAdapter(
370 self.vision_args, dim=config.text_config.hidden_size)
371