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 2, 14:45 UTC
[Model][Bugfix] Rename weight_mapper to hf_to_vllm_mapper in LlamaNemotronVL pooling models (#43581)
Signed-off-by: Jakub Zakrzewski <jzakrzewski@nvidia.com> Co-authored-by: opencode <noreply@opencode.ai> Co-authored-by: tomeras91 <57313761+tomeras91@users.noreply.github.com>
Jakub Zakrzewski committed
May 28, 2026 at 12:32 UTC
4ec28173139cdf91546515b99888b776542ee47d
1 file changed
+4
-4
vllm/model_executor/models/nemotron_vl.py
+4
-4
@@ -477,7 +477,7 @@ class LlamaNemotronVLForEmbedding(LlamaNemotronVLChatModel, VllmModelForPooling)
477
478
# Weight mapping from checkpoint format to vLLM format
479
# Different from parent class due to different vision model structure
480
- weight_mapper = WeightsMapper(
480
+ hf_to_vllm_mapper = WeightsMapper(
481
orig_to_new_prefix={
482
# Language model mapping
483
"language_model.layers.": "language_model.model.layers.",
@@ -533,7 +533,7 @@ class LlamaNemotronVLForEmbedding(LlamaNemotronVLChatModel, VllmModelForPooling)
533
def load_weights(self, weights: Iterable[tuple[str, torch.Tensor]]) -> set[str]:
534
"""Override to use different weight mapping for SigLIP."""
535
loader = AutoWeightsLoader(self)
536
- return loader.load_weights(weights, mapper=self.weight_mapper)
536
+ return loader.load_weights(weights, mapper=self.hf_to_vllm_mapper)
537
538
539
class LlamaNemotronVLForSequenceClassification(
@@ -543,8 +543,8 @@ class LlamaNemotronVLForSequenceClassification(
543
544
# Reranker checkpoint places base model weights under `model.*`,
545
# while `score.*` remains at the top level.
546
- weight_mapper = WeightsMapper(orig_to_new_prefix={"model.": ""}) | (
547
- LlamaNemotronVLForEmbedding.weight_mapper
546
+ hf_to_vllm_mapper = WeightsMapper(orig_to_new_prefix={"model.": ""}) | (
547
+ LlamaNemotronVLForEmbedding.hf_to_vllm_mapper
548
)
549
550
def __init__(self, *, vllm_config: VllmConfig, prefix: str = "") -> None: