pipeline_tag, you can skip to Deploy a model.
Architectures from Transformers, Diffusers, and vLLM are supported. Custom code is supported only when those libraries can load it in their standard way (remote code and modeling files in the repository). Safetensors weights are supported.
Prerequisites
- Hugging Face account: huggingface.co
- Personal Access Token with read access: huggingface.co/settings/tokens
huggingface_hub,transformers, andsafetensorsinstalled
Create a model repository
Create a new model repo on Hugging Face (UI or CLI):- UI: huggingface.co/new
- CLI:
Required files
Your repository should include:- Model weights, including Safetensors. Custom code must be loadable by Transformers, Diffusers, or vLLM in the standard way.
- Model configuration files (for example,
config.json) - Tokenizer files (for example,
tokenizer.json,tokenizer_config.json,vocab.json,merges.txt) - Any processors (for example,
preprocessor_config.json, image processor files) - A
README.mdwith apipeline_tag
.bin or .pt weights, see Convert models to Safetensors.
Push model weights and artifacts
Below is a Python example that saves a model and tokenizer, then pushes them to the Hub.Verify the repository
- Confirm all required files are present (weights, config, tokenizer, processors).
- Ensure
README.mdincludes a pipeline tag: