Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions vllm/multimodal/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,8 @@ def flat_from_sizes(modality: str,
Args:
modality: The modality of the multi-modal item that uses this
keyword argument.
slices: For each multi-modal item, the size of the slice that
is used to extract the data corresponding to it.
size_per_item: For each multi-modal item, the size of the slice
that is used to extract the data corresponding to it.
dim: The dimension to slice, default to 0.

Example:
Expand All @@ -590,7 +590,7 @@ def flat_from_sizes(modality: str,

```
Given:
slices: [3, 4, 2]
size_per_item: [3, 4, 2]
dim: 1

Input:
Expand Down
4 changes: 3 additions & 1 deletion vllm/multimodal/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,9 @@ def group_mm_kwargs_by_modality(
modality together into the same `MultiModalKwargs` instance.

Args:
mm_inputs: List of `MultiModalKwargsItem`.
mm_kwargs: List of `MultiModalKwargsItem`.
device: The device to place the grouped tensors on.
pin_memory: Whether to pin memory for faster host-to-device transfer.

Yields:
A tuple `(modality, num_items, grouped_kwargs)`.
Expand Down