File size: 1,467 Bytes
5d17710
 
c660059
 
 
 
 
5d17710
c660059
5d17710
 
c660059
 
5d17710
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c660059
 
5d17710
 
 
c660059
 
 
 
5d17710
 
c660059
5d17710
 
 
 
 
 
 
 
 
 
 
 
c660059
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
license: cc0-1.0
language:
- en
tags:
- tutorial
- help
---
# Uploading Large Files to Hugging Face Hub

## Prerequisites
- [Git](https://git-scm.com/) installed
- [Git LFS](https://git-lfs.com/) installed
- Python with `huggingface_hub` library
- Hugging Face account

## Step-by-Step Instructions

### 1. Install Required Tools
```bash
# 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](https://huggingface.co/new)
2. Create a new model repository
3. Copy the repository URL

### 3. Clone Repository Locally
```bash
git clone https://huggingface.co/<your-username>/<your-model-name>
cd <your-model-name>
```

### 4. Prepare for Large File Uploads
```bash
# 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:
```bash
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