Download scripts/restore_selected_checkpoints.sh from zzhongyj/Dual: direct link, hf CLI and curl.
- Browser
- Download file 368 Bytes
-
https://huggingface.co/datasets/zzhongyj/Dual/resolve/main/scripts/restore_selected_checkpoints.sh
- Command line
-
hf download hf://datasets/zzhongyj/Dual/scripts/restore_selected_checkpoints.sh
-
curl -L -o restore_selected_checkpoints.sh https://huggingface.co/datasets/zzhongyj/Dual/resolve/main/scripts/restore_selected_checkpoints.sh
368 Bytes
| set -euo pipefail | |
| OUT=${1:-./checkpoints} | |
| mkdir -p "$OUT" | |
| SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) | |
| REPO_ROOT=$(cd "$SCRIPT_DIR/.." && pwd) | |
| find "$REPO_ROOT/checkpoint_shards" -name "*.tar" | sort | while read -r shard; do | |
| echo "Extracting $shard" | |
| tar -xf "$shard" -C "$OUT" | |
| done | |
| echo "Restored selected checkpoints to $OUT" | |