Download runpod/train_5090.sh from Infinity08/KAWK50M-Project: direct link, hf CLI and curl.
- Browser
- Download file 934 Bytes
-
https://huggingface.co/datasets/Infinity08/KAWK50M-Project/resolve/main/runpod/train_5090.sh
- Command line
-
hf download hf://datasets/Infinity08/KAWK50M-Project/runpod/train_5090.sh
-
curl -L -o train_5090.sh https://huggingface.co/datasets/Infinity08/KAWK50M-Project/resolve/main/runpod/train_5090.sh
934 Bytes
| set -euo pipefail | |
| PROJECT_DIR="${PROJECT_DIR:-/workspace/KAWK50M}" | |
| VENV_DIR="${VENV_DIR:-${PROJECT_DIR}/.venv}" | |
| CONFIG="${CONFIG:-configs/pretrain_5b_5090.yaml}" | |
| RESUME="${RESUME:-}" | |
| STOP_AFTER_STEPS="${STOP_AFTER_STEPS:-}" | |
| cd "${PROJECT_DIR}" | |
| if [[ ! -x "${VENV_DIR}/bin/python" ]]; then | |
| echo "Virtual environment not found: ${VENV_DIR}" >&2 | |
| echo "Run: bash runpod/bootstrap.sh" >&2 | |
| exit 1 | |
| fi | |
| source "${VENV_DIR}/bin/activate" | |
| python -m scripts.preflight --config "${CONFIG}" | |
| if [[ "${SKIP_BENCHMARK:-0}" != "1" ]]; then | |
| python -m scripts.benchmark \ | |
| --batch-size 32 \ | |
| --gradient-accumulation 4 \ | |
| --compile \ | |
| --warmup-steps 1 \ | |
| --steps 3 | |
| fi | |
| command=(python -m scripts.pretrain --config "${CONFIG}") | |
| if [[ -n "${RESUME}" ]]; then | |
| command+=(--resume "${RESUME}") | |
| fi | |
| if [[ -n "${STOP_AFTER_STEPS}" ]]; then | |
| command+=(--stop-after-steps "${STOP_AFTER_STEPS}") | |
| fi | |
| "${command[@]}" | |