Skip to content

Commit

Permalink
feat: add sync.sh for copy-to-modelscope
Browse files Browse the repository at this point in the history
  • Loading branch information
wsxiaoys committed Oct 4, 2023
1 parent 8a03c9b commit 1d364fd
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
5 changes: 3 additions & 2 deletions experimental/copy-to-modelscope/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ if [ -z "${MODEL_ID}" ]; then
usage
fi

git clone https://oauth2:${ACCESS_TOKEN}@www.modelscope.cn/$MODEL_ID.git ms_model
git clone https://huggingface.co/$MODEL_ID hf_model
git clone https://oauth2:${ACCESS_TOKEN}@www.modelscope.cn/$MODEL_ID.git ms_model --depth 1
git clone https://huggingface.co/$MODEL_ID hf_model --depth 1

echo "Sync directory"
rsync -avh --exclude '.git' --delete hf_model/ ms_model/
Expand Down Expand Up @@ -52,6 +52,7 @@ set -x
pushd ms_model
git add .
git commit -m "sync with upstream"
git lfs push origin
git push origin
popd

Expand Down
20 changes: 20 additions & 0 deletions experimental/copy-to-modelscope/sync.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

set -ex

# TabbyML/StarCoder-3B

MODELS=$(cat <<EOF
TabbyML/StarCoder-7B
TabbyML/WizardCoder-1B
TabbyML/WizardCoder-3B
TabbyML/CodeLlama-7B
TabbyML/CodeLlama-13B
TabbyML/StarCoder-1B
EOF
)

for i in $MODELS; do
./main.sh $i $1
done

0 comments on commit 1d364fd

Please sign in to comment.