OpenNMT to Huggingface Transformers

Hi! I have trained a transformer model using OpenNMT-py. Can I now somehow convert this .pt model to Huggingface Transformers format to be able to use it there? I need to manipulate the embeddings and translate with that model. Thank you in advance!

you can’t out of the box, but why do you need transformers to use it ? what’s wrong with OpenNMT-py to manipulate what you want to do ?

I have trained a multilingual model with language tags and I want to replace the embeddings for language tags with another vectors and to translate/ generate the sequences with those changed vectors. I have working code for transformers with other models, but have no idea how to implement the same thing using OpenNMT with my model. Is it possible in general and how tricky is that?