# Turn word embedding to word id (using T5 decoder)

**URL:** <https://discuss.huggingface.co/t/turn-word-embedding-to-word-id-using-t5-decoder/13493>\
**Category:** 🤗Transformers\
**Created:** [January 8, 2022, 12:11pm UTC](https://discuss.huggingface.co/t/turn-word-embedding-to-word-id-using-t5-decoder/13493 "2022-01-08T12:11:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![henry12338](https://avatars.discourse-cdn.com/v4/letter/h/6bbea6/32.png) [@henry12338](https://discuss.huggingface.co/u/henry12338)\
**Post date:** [January 8, 2022, 12:11pm UTC](https://discuss.huggingface.co/t/turn-word-embedding-to-word-id-using-t5-decoder/13493/1 "2022-01-08T12:11:21Z")

</div>

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
