Skip to content

Commit

Permalink
FX symbolic_trace: do not test decoder_inputs_embeds (huggingface#31840)
Browse files Browse the repository at this point in the history
only test input_embeds, not decoder_input_embeds
  • Loading branch information
fxmarty authored Jul 9, 2024
1 parent 952dfd4 commit 0abf5e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_modeling_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@ def _create_and_check_torch_fx_tracing(self, config, inputs_dict, output_loss=Fa
(past_mask, inputs_to_test[1]["attention_mask"]), dim=1
)

if "inputs_embeds" in inspect.signature(model.forward).parameters:
if "inputs_embeds" in inspect.signature(model.forward).parameters and not model.config.is_encoder_decoder:
inputs_to_test.append(
{
"inputs_embeds": torch.rand(
Expand Down

0 comments on commit 0abf5e8

Please sign in to comment.