Create a transformer model from a pytorch model (model.bin))

Not sure what you mean could please rephrase the question?
What do you mean by

generate a transformer, tokenizer, model and optimizer