.bin or .pt files and you want to publish Safetensors weights, convert them with the steps below. Custom code is supported when Transformers, Diffusers, or vLLM can load it in the standard way.
Quick conversion with Transformers
If your model is supported by thetransformers library, reload and re-save with safe_serialization=True:
Diffusers models
For diffusion and image models:Verify before deploying
- Confirm
.safetensorsfiles appear in the repository file list on Hugging Face. - Ensure
config.json, tokenizer, and processor files are present. - Add a
pipeline_tagtoREADME.md(for example,pipeline_tag: text-generation).