[Help] Getting embeddings of ara-gpt2 #112
-
Hi, Good day. i'm trying to get the embedding output of ara-gpt2 but looks like facing error: And here's the code:
i checked and doesn't see any 'last_hidden_state' in the outputs too: Could you advise on how to get the embedding? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
check the following notebook https://colab.research.google.com/drive/17B3bY38CW5VeWkfJsLOaxq6pzHtHKc5W?usp=sharing for how to extract embeddings from GPT2 models. Also please be careful from where are you import the GPT2Model class (use the huggingface library for aragpt2-base and medium, and from arabert.grover... for large and mega) |
Beta Was this translation helpful? Give feedback.
check the following notebook https://colab.research.google.com/drive/17B3bY38CW5VeWkfJsLOaxq6pzHtHKc5W?usp=sharing for how to extract embeddings from GPT2 models. Also please be careful from where are you import the GPT2Model class (use the huggingface library for aragpt2-base and medium, and from arabert.grover... for large and mega)