chore: bootstrap reusable quantization template workspace
This commit is contained in:
25
scripts/upload_to_modelscope.sh
Executable file
25
scripts/upload_to_modelscope.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# 用法:
|
||||
# ./upload_to_modelscope.sh <repo_id> <token>
|
||||
# 示例:
|
||||
# ./upload_to_modelscope.sh your_username/your_repo_name ms-xxxxxxxx
|
||||
|
||||
REPO_ID="${1:-}"
|
||||
TOKEN="${2:-}"
|
||||
|
||||
if [[ -z "${REPO_ID}" || -z "${TOKEN}" ]]; then
|
||||
echo "Usage: $0 <repo_id> <token>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ROOT_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
||||
|
||||
"${ROOT_DIR}/.venv/bin/modelscope" login --token "${TOKEN}"
|
||||
"${ROOT_DIR}/.venv/bin/modelscope" upload "${REPO_ID}" "${SCRIPT_DIR}" . \
|
||||
--repo-type model \
|
||||
--commit-message "Upload Qwen3.5-27B quantized GGUF weights"
|
||||
|
||||
echo "Upload finished: ${REPO_ID}"
|
||||
Reference in New Issue
Block a user