Skip to content

Commit

Permalink
Fix the mitchich70 launch scripts for Beaker
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkgr committed Mar 27, 2024
1 parent 8362893 commit 0236ceb
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
35 changes: 35 additions & 0 deletions scripts/beaker/mitchish70-launch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env bash

set -ex

NUM_NODES=4

gantry run \
--workspace ai2/dirkg \
--task-name mitchish70 \
--description "OLMo large - 70B" \
--priority high \
--stop-preemptible \
--beaker-image petew/olmo-torch2-gantry \
--cluster ai2/pluto-cirrascale \
--gpus 8 \
--replicas "${NUM_NODES}" \
--leader-selection \
--host-networking \
--budget ai2/oe-training \
--nfs \
--mount /net/nfs.cirrascale/allennlp/petew/cache:/root/.cache \
--env LOG_FILTER_TYPE=local_rank0_only \
--env OMP_NUM_THREADS=8 \
--env OLMO_TASK=model \
--env-secret WANDB_API_KEY=WANDB_API_KEY \
--env-secret AWS_ACCESS_KEY_ID=AWS_ACCESS_KEY_ID \
--env-secret AWS_SECRET_ACCESS_KEY=AWS_SECRET_ACCESS_KEY \
--env-secret R2_ACCESS_KEY_ID=R2_ACCESS_KEY_ID \
--env-secret R2_SECRET_ACCESS_KEY=R2_SECRET_ACCESS_KEY \
--env-secret R2_ENDPOINT_URL=R2_ENDPOINT_URL \
--shared-memory 10GiB \
--venv base \
--yes \
--timeout=-1 \
-- /bin/bash -c "scripts/beaker/mitchish70.sh \$BEAKER_LEADER_REPLICA_HOSTNAME ${NUM_NODES}"
31 changes: 31 additions & 0 deletions scripts/beaker/mitchish70.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash
set -exuo pipefail
IFS=$'\n\t'

BEAKER_LEADER_REPLICA_HOSTNAME=$1
shift

NUM_NODES=$1
shift

# Warm HF cache
mkdir -p /root/.cache
pushd /root/.cache
curl "https://storage.googleapis.com/dirkgr-public/huggingface_cache_v2.tar.gz" | tar --keep-newer-files -xzf -
popd
export HF_DATASETS_OFFLINE=1

torchrun \
--nnodes ${NUM_NODES}:${NUM_NODES} \
--nproc-per-node 8 \
--rdzv_id=101 \
--rdzv_backend=c10d \
--rdzv_endpoint=$BEAKER_LEADER_REPLICA_HOSTNAME:29400 \
scripts/train.py \
configs/mitchish70-s3.yaml \
--run_name=mitchish70-002 \
--wandb.name=mitchish70-official \
--device_train_microbatch_size=3 \
--global_train_batch_size=1536 \
'--load_path=${path.last_checkpoint:${remote_save_folder}}' \
--save_overwrite

0 comments on commit 0236ceb

Please sign in to comment.