diff options
| author | YurenHao0426 <blackhao0426@gmail.com> | 2026-01-27 09:57:37 -0600 |
|---|---|---|
| committer | YurenHao0426 <blackhao0426@gmail.com> | 2026-01-27 09:57:37 -0600 |
| commit | dc801c07cf38b0c495686463e6ca6f871a64440e (patch) | |
| tree | 599f03114775921dbc472403c701f4a3a8ea188a /collaborativeagents/slurm/run_rag_v2.sh | |
| parent | e43b3f8aa36c198b95c1e46bea2eaf3893b13dc3 (diff) | |
Add collaborativeagents module and update gitignore
- Add collaborativeagents subproject with adapters, agents, and evaluation modules
- Update .gitignore to exclude large binary files (.whl, .tar), wandb logs, and results
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'collaborativeagents/slurm/run_rag_v2.sh')
| -rwxr-xr-x | collaborativeagents/slurm/run_rag_v2.sh | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/collaborativeagents/slurm/run_rag_v2.sh b/collaborativeagents/slurm/run_rag_v2.sh new file mode 100755 index 0000000..29cd6c2 --- /dev/null +++ b/collaborativeagents/slurm/run_rag_v2.sh @@ -0,0 +1,59 @@ +#!/bin/bash +#SBATCH --job-name=rag_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=rag_v2_%j.out +#SBATCH --error=rag_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.40 --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 rag \ + --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/rag_v2_$(date +%Y%m%d_%H%M%S) + +pkill -f "vllm.entrypoints" 2>/dev/null || true |
