Why does Hugging Face's push_to_hub convert saved models to .bin instead of using safetensor mode?

I am attempting to push a saved model in model-00001-of-00006.safetensors mode, but the model gets converted to pytorch_model-00001-of-00006.bin before being saved to the hub.

How can I prevent this?

Here is what I am simply doing:

model.push_to_hub(new_model, use_temp_dir=False)
tokenizer.push_to_hub(new_model, use_temp_dir=False)

cc @lysandre and @Wauplin =)

Thanks for the ping. Duplicate from a github issue. See @lysandre’s answer: Why does Hugging Face's push_to_hub convert saved models to .bin instead of using safetensor mode? · Issue #25992 · huggingface/transformers · GitHub