Get and save the embedded vector

I am a beginner in Pytorch. I have a model. I want to give all the training data to the trained model and get the embedded vector (vector with size 128) from the model and save it in a file. How do i get and save embedded vector?
Thanks