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
[Bugfix] Fix precommit - line too long in pixtral.py (#14960)
Signed-off-by: Tyler Michael Smith <tyler@neuralmagic.com> Co-authored-by: DarkLight1337 <tlleungac@connect.ust.hk>
Tyler Michael Smith committed
Mar 17, 2025 at 10:18 UTC
e1eb45d3973fc8d48f9c980095f08a84d801fc4a
2 files changed
+6
-5
requirements/test.txt
+1
-1
@@ -235,7 +235,7 @@ mbstrdecoder==1.1.3
235
# typepy
236
mdurl==0.1.2
237
# via markdown-it-py
238
-mistral-common==1.5.1
238
+mistral-common==1.5.4
239
# via -r requirements/test.in
240
more-itertools==10.5.0
241
# via lm-eval
vllm/model_executor/models/pixtral.py
+5
-4
@@ -73,7 +73,7 @@ class PixtralImagePixelInputs(TypedDict):
73
"""
74
A boolean mask indicating which image embeddings correspond
75
to patch tokens.
76
-
76
+
77
Shape: `(batch_size, num_images, num_embeds)`
78
"""
79
@@ -849,10 +849,10 @@ class VisionTransformer(nn.Module):
849
) -> torch.Tensor:
850
"""
851
Args:
852
- images: list of N_img images of variable sizes,
852
+ images: list of N_img images of variable sizes,
853
each of shape (C, H, W)
854
Returns:
855
- image_features: tensor of token features for
855
+ image_features: tensor of token features for
856
all tokens of all images of shape (N_toks, D)
857
"""
858
# pass images through initial convolution independently
@@ -935,7 +935,8 @@ class PatchMerger(nn.Module):
935
# x is (N, vision_encoder_dim)
936
x = self.permute(x, image_sizes)
937
938
- # x is (N / spatial_merge_size ** 2, vision_encoder_dim * spatial_merge_size ** 2)
938
+ # x is (N / spatial_merge_size ** 2,
939
+ # vision_encoder_dim * spatial_merge_size ** 2)
940
x = self.merging_layer(x)
941
942
# x is (N / spatial_merge_size ** 2, vision_encoder_dim)