Skip to main content

Downloading Models

If you want to get and download the models on CSGHub, we currently support downloading models via Git, Web interface, Command line and SDK.

Downloading Models Using Git

  • Downloading model repositories using HTTP:
git lfs install
git clone http://101.200.14.180/models/opencsg/model123.git
  • Downloading model repositories using SSH:
git lfs install
git clone ssh://git@localhost:2222/models/opencsg/model123.git

Note: You need to add your SSH public key to your user settings in order to push changes or access private repositories. Click on "Account Settings" in the top right corner and go to "SSH Keys" to add your public key. SSH Key

Downloading Files Using Web Interface

Click the download button under the Files tab to download the file directly. Download file

Downloading Files Using Command Line

Use command line tool csghub-cli to download data easily, the installation method is as follows:

pip install csghub-sdk

Here is an example of how to download a model:

export CSG_TOKEN=your_access_token

# download model
csghub-cli download demo/test_model

Downloading Files Using SDK

CSGHub SDK Provide a Python Libaray,you can download files by code.

Here is an example of how to download a model:

from pycsghub.snapshot_download import snapshot_download
token = "your_access_token"

endpoint = "https://hub.opencsg.com"
repo_id = 'OpenCSG/csg-wukong-1B'
cache_dir = '/Users/hhwang/temp/'
result = snapshot_download(repo_id, cache_dir=cache_dir, endpoint=endpoint, token=token)

Multi-source Synchronization of Models

In the open-source version of CSGHub, you can browse models from the remote OpenCSG community. By entering a project and clicking the sync button, you can quickly synchronize the model to your local server. Multi-source Sync

Click the sync button to start synchronizing the project. The button will change to "Syncing". Once synchronization is successful, you can access and download the project normally.

Check the video tutorial for more details: