Code to generate embeddings using BERT forward pass Here Code to finetune BERT using Trainer Here Code to finetune BERT using Native pytorch Here