Uploading Large Files to Hugging Face Hub
Prerequisites
Step-by-Step Instructions
1. Install Required Tools
# Install Hugging Face CLI
python -m pip install huggingface_hub
# Login to Hugging Face
huggingface-cli login
2. Create Repository
- Go to https://huggingface.co/new
- Create a new model repository
- Copy the repository URL
3. Clone Repository Locally
git clone https://huggingface.co/<your-username>/<your-model-name>
cd <your-model-name>
4. Prepare for Large File Uploads
# Initialize Git LFS
git lfs install
# Enable large file support
huggingface-cli lfs-enable-largefiles .
# Track safetensor files and tokenizer.json (because they're large)
git lfs track "*.safetensors" "tokenizer.json"
5. Add and Push Files
Copy all your model files to repository directory
Then you can run:
git add .
git commit -m "Add model files"
git push
Troubleshooting
- Ensure files are < 5GB per file
- Check internet connection
- Verify Git LFS is correctly installed
- Use
git lfs statusto check file tracking
Best Practices
- Use descriptive commit messages
- Keep repository organized
- Include a
README.mdwith model details
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support