How to save model with .pt extension

How to save the trained Roberta model with .pt extension instead of .bin extension?

Follow the steps mentioned here
or follow the code specified below.

Creating the trace

traced_model = torch.jit.trace(model, [tokens_tensor, segments_tensors])
torch.jit.save(traced_model, "traced_bert.pt")