Skip to content

Commit

Permalink
[CI][UT]enable multimodal ut (#158)
Browse files Browse the repository at this point in the history
enable multimodal ut

---------

Signed-off-by: zouyida <zouyida@huawei.com>
  • Loading branch information
zouyida2002 authored Feb 27, 2025
1 parent 9448377 commit 94cd66b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 3 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ norecursedirs =
vllm-empty/tests/lora
vllm-empty/tests/models
vllm-empty/tests/mistral_tool_use
vllm-empty/tests/multimodal
vllm-empty/tests/standalone_tests
vllm-empty/tests/async_engine
vllm-empty/tests/mq_llm_engine
Expand Down Expand Up @@ -51,6 +50,9 @@ addopts = --ignore=vllm-empty/tests/test_utils.py
--ignore=vllm-empty/tests/models/decoder_only/language/test_aqlm.py
--ignore=vllm-empty/tests/models/decoder_only/language/test_gptq_marlin.py
--ignore=vllm-empty/tests/models/decoder_only/language/test_gptq_marlin_24.py
--ignore=vllm-empty/tests/multimodal/test_processing.py
--ignore=vllm-empty/tests/multimodal/test_processor_kwargs.py
--ignore=vllm-empty/tests/multimodal/test_utils.py

testpaths =
vllm-empty/tests
9 changes: 3 additions & 6 deletions vllm_ascend/model_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,7 @@ def _compute_multi_modal_input(self, inter_data: InterDataForSeqGroup,
assert image_grid_thw is not None or video_grid_thw is not None, (
"mrope embedding type requires multi-modal input mapper "
"returns 'image_grid_thw' or 'video_grid_thw'.")
second_per_grid_ts = mm_kwargs.get("second_per_grid_ts", None)

hf_config = self.runner.model_config.hf_config

Expand All @@ -707,14 +708,10 @@ def _compute_multi_modal_input(self, inter_data: InterDataForSeqGroup,
mrope_input_positions, mrope_position_delta = \
MRotaryEmbedding.get_input_positions(
token_ids,
hf_config,
image_grid_thw=image_grid_thw,
video_grid_thw=video_grid_thw,
image_token_id=hf_config.image_token_id,
video_token_id=hf_config.video_token_id,
vision_start_token_id=hf_config.vision_start_token_id,
vision_end_token_id=hf_config.vision_end_token_id,
spatial_merge_size=hf_config.vision_config.
spatial_merge_size,
second_per_grid_ts=second_per_grid_ts,
context_len=inter_data.context_lens[seq_idx],
seq_len=inter_data.seq_lens[seq_idx],
)
Expand Down

0 comments on commit 94cd66b

Please sign in to comment.