This directory contains ready-to-use configuration examples for different sync scenarios.
| File | Scenario | Description |
|---|---|---|
| 01-hf-to-ms-mirror.yaml | One-way mirror | HF -> MS for popular open-source models |
| 02-bidirectional-sync.yaml | Bidirectional | Keep HF and MS repos in sync both ways |
| 03-multi-model-batch.yaml | Batch sync | Sync many models at once |
| 04-dataset-sync.yaml | Datasets | Sync datasets (parquet, jsonl, images) |
| 05-minimal-external.yaml | Minimal | Smallest config for external projects |
| 06-selective-patterns.yaml | Selective | Only sync inference-ready files |
| File | Scenario | Description |
|---|---|---|
| simple-mirror.yml | Basic | Scheduled one-way sync with manual trigger |
| bidirectional-with-notify.yml | Notifications | Bidirectional sync with DingTalk alerts |
| webhook-triggered.yml | Event-driven | Sync triggered by external webhook |
| matrix-sync.yml | Parallel | Sync multiple models in parallel jobs |
# Pick the example closest to your use case
cp examples/05-minimal-external.yaml config/sync_config.yaml
# Edit with your repo IDscp examples/workflows/simple-mirror.yml .github/workflows/sync.ymlIn your GitHub repo: Settings > Secrets and variables > Actions
| Secret | Where to get it |
|---|---|
HF_TOKEN |
https://huggingface.co/settings/tokens |
MODELSCOPE_TOKEN |
https://modelscope.cn/my/myaccesstoken |
git add config/sync_config.yaml .github/workflows/sync.yml
git commit -m "Add HF-MS sync"
git pushThe sync will run on the next scheduled time, or you can trigger it manually from the Actions tab.