How to Wrap torch models

I have written a model in pure torch from scratch, its about word generation , How to save and load this model on hugging face models?

Please guide step wise step. I am new here.