Generate sentence embeddings in fastai2

Has anyone been able to generate sentence embeddings in fastai2? I was referring a notebook written in fastai v1, but it no longer works.

I understand the idea of changing the embedding matrix according to the dataset. But how do I proceed further in this case?