Uploading Large Files to Hugging Face Hub

Prerequisites

  • Git installed
  • Git LFS installed
  • Python with huggingface_hub library
  • Hugging Face account

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

  1. Go to https://huggingface.co/new
  2. Create a new model repository
  3. 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 status to check file tracking

Best Practices

  • Use descriptive commit messages
  • Keep repository organized
  • Include a README.md with model details
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model is not currently available via any of the supported third-party Inference Providers, and HF Inference API was unable to determine this model's library.

Collection including agentlans/how-to-upload-to-huggingface-from-linux