How to add a new token and assign corresponding weights for all layers for BERT model?
I understand that the way to add a new token and assign values to its embedding is possible withembeddings.word_embeddings.weight:hereThat would correspond to updating the weight for the token of the final layer.Is it possible to assign new weights for the needed token for other layers in a similar fashion?We can access the weights for the deeper layers when passingoutput_hidden_states=True:AutoModel.from_pretrained("bert-base-uncased", output_hidden_states=True)But these weights are not stored in astay_dictlike the weights ofthe final layer stored in look-up matrix inembeddings.word_embeddings.weight.I am not sure what am I missing here?