Date: 05.09.2026
Uploading Custom GGUF Models to ModelScope
Table of Contents
Overview
This guide explains how to upload custom .gguf models to a repository on ModelScope using Git LFS.
ModelScope is a Chinese model hosting platform similar to Hugging Face. The workflow is almost identical — with one key difference: authentication is done via OAuth2 token instead of a personal access token.
1. Install Git LFS
Install Git LFS if you don’t already have it.
- Linux
sudo apt install git-lfs
- Mac
brew install git-lfs
- Windows
Download and install from: https://git-lfs.github.com/
- Initialize Git LFS:
git lfs install
2. Create a ModelScope Access Token
- Go to https://www.modelscope.cn/my/myaccesstoken
- Click Create new token with write permissions
- Copy the generated token — you will need it for Git authentication
3. Create a New ModelScope Repository
Create a model repository on ModelScope via the web UI:
- Go to https://www.modelscope.cn
- Click Create → Model
- Fill in the repository name (e.g.
username/my-gguf-model) - Choose Model type and License
- Click Create
4. Clone the Repository and Authenticate
Clone the newly created repository:
git clone https://www.modelscope.cn/username/my-gguf-model.git
cd my-gguf-model
ModelScope uses OAuth2 authentication over HTTPS. When prompted for credentials:
- Username:
oauth2 - Password: your ModelScope Access Token (from step 2)
Tip: To avoid entering credentials every time, cache them:
git config credential.helper store
Alternatively, embed credentials directly in the remote URL:
git remote set-url origin https://oauth2:<YOUR_TOKEN>@www.modelscope.cn/username/my-gguf-model.git
5. Track GGUF Files with Git LFS
Tell Git to store .gguf files using Git LFS:
This creates or updates the
.gitattributesfile.
git lfs track "*.gguf"
- Commit it:
git add .gitattributes
git commit -m "Enable Git LFS for GGUF models"
6. Add Model Files
Copy your .gguf model files into the repository folder.
Example:
my-gguf-model/
│
├── README.md
├── model-Q4_K.gguf
├── model-Q8_0.gguf
└── model-bf16.gguf
- Add files:
git add *.gguf
git commit -m "Add GGUF model files"
7. Rebase Before Push
If the repository was initialized with system files (e.g. .gitattributes, configuration.json) by ModelScope, you need to rebase your local commits on top of the remote history before pushing.
- Fetch the remote:
git fetch origin
- Rebase your local branch onto the remote:
git rebase origin/master
- Resolve any conflicts (common in
.gitattributesandREADME.md), then continue:
git add <resolved-files>
git rebase --continue
8. Push to ModelScope
Push your branch to ModelScope. Note that the default remote branch is master:
git push origin main:master
- You should see something like:
Uploading LFS objects: 100% (3/3), 12 GB
9. Verify Files
- Check that files are tracked by Git LFS:
git lfs ls-files
- Example output:
model-Q4_K.gguf
model-Q8_0.gguf
model-bf16.gguf
10. Updating Models Later
To upload new versions or additional quantizations:
Git LFS will automatically upload the large files.
git add new-model.gguf
git commit -m "Add new quantization"
git push origin main:master
Notes
- Always track
.gguffiles with Git LFS before committing. - ModelScope authenticates via
oauth2username + your Access Token as password. - ModelScope uses
masteras the default branch name. - If your local branch is
main, push withmain:master. - Rebase is required if ModelScope created system files in the repository before your first push.
ModelScope documentation: https://www.modelscope.cn/docs/advanced/git-usage