@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 4dd7978374
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 12, 03:30 UTC

[Bugfix] Fix regression on pooling models from PR#29621 (#29921)

Signed-off-by: Roger Wang <hey@rogerw.io> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

Roger Wang committed Dec 2, 2025 at 18:33 UTC 4dd79783744adbfdc86f9454bffb5a92715a7f61
1 file changed +7 -1
vllm/multimodal/parse.py
+7 -1
@@ -134,11 +134,17 @@ class EmbeddingItems(
134 or a list of embedding tensors (one per item).
135 """
136
137 + def _unwrap(
138 + self, item: torch.Tensor | MediaWithBytes[torch.Tensor]
139 + ) -> torch.Tensor:
140 + """Extract media from wrapper if present."""
141 + return item.media if isinstance(item, MediaWithBytes) else item
142 +
143 def get_count(self) -> int:
144 return len(self.data)
145
146 def get(self, index: int) -> torch.Tensor:
141 - return self.data[index]
147 + return self._unwrap(self.data[index])
148
149 def get_processor_data(self) -> Mapping[str, object]:
150 return {}