I get a "You have to specify either input_ids or inputs_embeds" error, but I do specify the input ids
I trained a BERT based encoder decoder model:ed_modelI tokenized the input with:txt = "I love huggingface"
inputs = input_tokenizer(txt, return_tensors="pt").to(device)
print(inputs)The output clearly shows that ainput_idsis the return dict{'input_ids': tensor([[ 101, 5660, 7975, 2127, 2053, 2936, 5061,  102]], device='cuda:0'), 'token_type_ids': tensor([[0, 0, 0, 0, 0, 0, 0, 0]], device='cuda:0'), 'attention_mask': tensor([[1, 1, 1, 1, 1, 1, 1, 1]], device='cuda:0')}But when I try to predict, I get this error:ed_model.forward(**inputs)ValueError: You have to specify either input_ids or inputs_embedsAny ideas ?
2021-06-03T06:19:19Z
Does this help:ValueError: You have to specify either input_ids or inputs_embeds! · Issue #3626 · huggingface/transformers · GitHub
2021-06-04T10:55:56Z
Yes, thank you !Solved the issueDo you happen to have any thoughts on this as well ?Constrain the search of the decoder in seq2seq architechtureBeginnersI am trying to train a seq2seq model with constraints on the form of the output sequence. 
My input sequence is unconstrained (any sentence), and my output sequence is formal language that resembles assembly. 
The output sequence is a series of triplets of (operator, operand_1, operand_2) 
An example triplet is (move, living_room, kitchen), note that given that the operator is "move" the type of the 2 operands is determined and it must be a room. 
I know all operators, operands and constraints i…
2021-09-28T23:24:50Z
Hi@ugoren, how did you solve this issue?  I encountered the same issue trying to train the EncoderDecodeModel using the seq2seqtrainer.
2021-09-29T05:20:57Z
Add a “decoder_” prefix
2021-09-30T04:25:32Z
Yea, I did just that, but still got the error (transformers==4.9.2):batch['attention_mask'] = inputs.attention_mask
batch['input_ids'] = inputs.input_ids
batch['token_type_ids'] = inputs.token_type_ids
batch["decoder_input_ids"] = outputs.input_ids.copy()
batch["labels"] = outputs.input_ids.copy()Whereoutputsare from decoding the translations. I guess the error I got was something else.
2021-10-31T12:23:05Z
I am facing the same issue.@ugorencan you please elaborate your solution?