summaryrefslogtreecommitdiff
path: root/collaborativeagents/slurm/run_vanilla_v2.sh
diff options
context:
space:
mode:
Diffstat (limited to 'collaborativeagents/slurm/run_vanilla_v2.sh')
-rwxr-xr-xcollaborativeagents/slurm/run_vanilla_v2.sh59
1 files changed, 59 insertions, 0 deletions
diff --git a/collaborativeagents/slurm/run_vanilla_v2.sh b/collaborativeagents/slurm/run_vanilla_v2.sh
new file mode 100755
index 0000000..5db6064
--- /dev/null
+++ b/collaborativeagents/slurm/run_vanilla_v2.sh
@@ -0,0 +1,59 @@
+#!/bin/bash
+#SBATCH --job-name=vanilla_v2
+#SBATCH --account=bfqt-delta-gpu
+#SBATCH --partition=gpuH200x8
+#SBATCH --nodes=1
+#SBATCH --ntasks=1
+#SBATCH --cpus-per-task=32
+#SBATCH --gres=gpu:h200:4
+#SBATCH --mem=200G
+#SBATCH --time=2:00:00
+#SBATCH --output=vanilla_v2_%j.out
+#SBATCH --error=vanilla_v2_%j.err
+
+set -e
+cd /projects/bfqt/users/yurenh2/ml-projects/personalization-user-model
+source /u/yurenh2/miniforge3/etc/profile.d/conda.sh
+conda activate eval
+
+export HF_HOME=/projects/bfqt/users/yurenh2/hf_cache/huggingface
+export PYTHONPATH="${PWD}/src:${PWD}/collaborativeagents:${PYTHONPATH}"
+export NCCL_P2P_DISABLE=1
+
+MODEL_70B="meta-llama/Llama-3.1-70B-Instruct"
+MODEL_8B="/projects/bfqt/users/yurenh2/ml-projects/personalization-user-model/models/llama-3.1-8b-instruct"
+
+pkill -f "vllm.entrypoints" 2>/dev/null || true
+sleep 2
+
+CUDA_VISIBLE_DEVICES=0,1 python -m vllm.entrypoints.openai.api_server \
+ --model $MODEL_70B --port 8004 --tensor-parallel-size 2 \
+ --gpu-memory-utilization 0.95 --max-model-len 16384 \
+ --download-dir $HF_HOME --dtype bfloat16 --disable-log-requests &
+
+CUDA_VISIBLE_DEVICES=2,3 python -m vllm.entrypoints.openai.api_server \
+ --model $MODEL_8B --port 8003 --tensor-parallel-size 2 \
+ --gpu-memory-utilization 0.90 --max-model-len 16384 \
+ --dtype bfloat16 --disable-log-requests &
+
+for i in $(seq 1 120); do
+ R1=$(curl -s http://localhost:8004/health > /dev/null 2>&1 && echo 1 || echo 0)
+ R2=$(curl -s http://localhost:8003/health > /dev/null 2>&1 && echo 1 || echo 0)
+ [ "$R1" = "1" ] && [ "$R2" = "1" ] && break
+ sleep 3
+done
+
+cd collaborativeagents/scripts
+python run_experiments.py \
+ --methods vanilla \
+ --datasets math-hard \
+ --n-profiles 5 \
+ --n-sessions 20 \
+ --use-vllm \
+ --vllm-user-url http://localhost:8004/v1 \
+ --vllm-agent-url http://localhost:8003/v1 \
+ --parallel-profiles 5 \
+ --profile-path ../data/complex_profiles_v2/profiles_200.jsonl \
+ --output-dir ../results/vanilla_v2_$(date +%Y%m%d_%H%M%S)
+
+pkill -f "vllm.entrypoints" 2>/dev/null || true