Add new tokens and learn the embeddings of the new tokens and keeping all the other parametes frozen

I want to add new tokens and learn their embeddings (by finetuning on a dataset) and keeping all the other parameters (including the already existing embeddings) fixed. Essentially, I want to fine-tune the embeddings of the new tokens on a dataset by keeping the model parameters same. How can I achieve that?

1 Like