# How to input word2vec embeddings to gpt2 model?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-input-word2vec-embeddings-to-gpt2-model%2F18047%3E%5C
**Category:** 🤗Transformers\
**Created:** [May 17, 2022, 11:41am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-input-word2vec-embeddings-to-gpt2-model%2F18047 "2022-05-17T11:41:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tejaravi67598](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@tejaravi67598](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ftejaravi67598)%5C
**Post date:** [May 17, 2022, 11:41am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-input-word2vec-embeddings-to-gpt2-model%2F18047%2F1 "2022-05-17T11:41:24Z")

</div>

Hi,  
I am working on the huggingface gpt2 model. I have a word2vec model trained on a dataset (dimensions similar to gpt2, 768). Now I want to input these embeddings to gpt2. I understand I must use inputs\_embeds to input the embeddings but I am little unclear about how exactly to do it. My problem is I am unable to understand how exactly to code (Not very handy with complex coding). So I wanted to know if there were any examples which I can refer to to understand the finetuning part and understand how to add my word embeddings to gpt2 model. Any source or help would be appreciated.
