Skip to content

Commit 1e7f0bd

Browse files
ganteBernardZach
authored andcommitted
Qwen2VL: skip base input_ids-inputs_embeds equivalence check (huggingface#34535)
it has complex inputs_embeds computation
1 parent 78ed2fe commit 1e7f0bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/generation/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1610,7 +1610,7 @@ def test_generate_from_inputs_embeds(self, _, num_beams):
16101610
inputs_dict.pop("pixel_values_images", None)
16111611
# 2.C - No easy fix, let's skip the check that compares the outputs from `input_ids` and `inputs_embeds`
16121612
has_complex_embeds_computation = any(
1613-
model_name in model_class.__name__.lower() for model_name in ["moshi"]
1613+
model_name in model_class.__name__.lower() for model_name in ["moshi", "qwen2vl"]
16141614
)
16151615
# 3 - `inputs_dict` doesn't contain `attention_mask`. When `attention_mask` is not passed to generate,
16161616
# we infer it from `input_ids`. The last test case will fail if there is a pad token in the original input.

0 commit comments

Comments
 (0)