| #!/usr/bin/env bash |
| set -euo pipefail |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| SEED="${SEED:-42}" |
| STEPS="${STEPS:-2000}" |
|
|
| |
| echo "[job] cwd: $(pwd)" |
| echo "[job] python: $(python --version)" |
| echo "[job] gpu:" |
| nvidia-smi || true |
|
|
| echo "[job] installing deps" |
| python -m pip install --upgrade pip |
| |
| python -m pip install --upgrade torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121 |
| python -m pip install fastapi uvicorn pydantic matplotlib huggingface_hub |
| python -m pip install "transformers>=4.50.3,<4.55.0" |
| python -m pip install "accelerate>=1.0.0" "peft>=0.13.0" "datasets>=3.0.0" |
| python -m pip install "trl>=0.12.0,<0.16.0" |
| python -m pip install bitsandbytes |
| |
| python -m pip install --no-deps unsloth_zoo |
| python -m pip install --no-deps unsloth |
| python -m pip install xformers --index-url https://download.pytorch.org/whl/cu121 || true |
| python -m pip install triton tyro typeguard cut_cross_entropy sentence-transformers msgspec hf_transfer |
|
|
| |
| python -c "import torch; print('[job] torch', torch.__version__, 'cuda?', torch.cuda.is_available())" |
| python -c "import unsloth; from unsloth import FastLanguageModel; print('[job] unsloth import OK')" |
|
|
| export PYTHONPATH=. |
| echo "[job] starting training: seed=$SEED steps=$STEPS env=$ENV_URL upload=$UPLOAD_REPO" |
|
|
| python -m training.train \ |
| --env-url "$ENV_URL" \ |
| --upload-repo "$UPLOAD_REPO" \ |
| --seed "$SEED" \ |
| --steps "$STEPS" |
|
|
| echo "[job] done" |
|
|