From dc801c07cf38b0c495686463e6ca6f871a64440e Mon Sep 17 00:00:00 2001 From: YurenHao0426 Date: Tue, 27 Jan 2026 09:57:37 -0600 Subject: 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 --- collaborativeagents/slurm/run_rag_vector_3x.sh | 74 ++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 collaborativeagents/slurm/run_rag_vector_3x.sh (limited to 'collaborativeagents/slurm/run_rag_vector_3x.sh') diff --git a/collaborativeagents/slurm/run_rag_vector_3x.sh b/collaborativeagents/slurm/run_rag_vector_3x.sh new file mode 100644 index 0000000..7ca2e3e --- /dev/null +++ b/collaborativeagents/slurm/run_rag_vector_3x.sh @@ -0,0 +1,74 @@ +#!/bin/bash +#SBATCH --job-name=rag_3x +#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=4:00:00 +#SBATCH --output=rag_3x_%j.out +#SBATCH --error=rag_3x_%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 + +# 70B user simulator on GPUs 0,1 +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 & + +# 8B agent on GPUs 2,3 with 40% memory (leaving room for embedding + reranker) +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 + +# Run 3 times with different output directories +for run in 1 2 3; do + echo "=========================================" + echo "Starting Run $run of 3" + echo "=========================================" + + python run_experiments.py \ + --methods rag_vector \ + --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_vector_run${run}_$(date +%Y%m%d_%H%M%S) + + echo "Run $run complete" + echo "" +done + +echo "All 3 runs complete!" + +pkill -f "vllm.entrypoints" 2>/dev/null || true -- cgit v1.2.3