Extract the last layer of the model

#1
by yaakov-tayeb - opened

Hi Author,

How can I extract, in addition to the model predictions, the last layer of the model.
To be more specifically, since this is a Bert structure model,

  1. How can I extract the Output hidden state corresponding to [CLS] ?
  2. How can I extract the Output hidden state of every other token ?

Thanks a lot!

DICTA: The Israel Center for Text Analysis org

Hi Yaakov!
This model was finetuned on top of the base model DictaBERT.
Using the base model, you can achieve what you want. The model is available here: https://huggingface.co/dicta-il/dictabert

Sign up or log in to comment