[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>
This commit is contained in:
stefankoncarevic
2026-07-13 17:28:50 +00:00
committed by GitHub
co-authored by Harry Mellor
parent 43c8cbf79b
commit 9427c45386
@@ -631,6 +631,10 @@ class Base(
# [seq_len] -> [1, seq_len]
positions = positions[None, ...]
# Transformers models expect either input_ids or inputs_embeds, but not both
if input_ids is not None and inputs_embeds is not None:
input_ids = None
outputs = self.model(
input_ids=input_ids,
inputs_embeds=inputs_embeds,