[ROCm][CI] Transformers: pass only one of input_ids/inputs_embeds (#48258)

Signed-off-by: Stefan Koncarevic <stefan.koncarevic@amd.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>

stefankoncarevic committed Jul 13, 2026 at 19:28 UTC 9427c453863f3ab9e720748f04b9d6dd404ef602
1 file changed +4
vllm/model_executor/models/transformers/base.py
+4
@@ -631,6 +631,10 @@ class Base(
631 # [seq_len] -> [1, seq_len]
632 positions = positions[None, ...]
633
634 + # Transformers models expect either input_ids or inputs_embeds, but not both
635 + if input_ids is not None and inputs_embeds is not None:
636 + input_ids = None
637 +
638 outputs = self.model(
639 input_ids=input_ids,
640 inputs_embeds=inputs_embeds,