Turn word embedding to word id (using T5 decoder)

i can get word embedding by
output = model(input_ids=input_ids)
but how can i turn output back to input_ids
or something that input an embedding an output the highest prob of the word id
thx