What Is the Cluster and Why Are You Using It?
Your laptop is fast enough to run small experiments. But running 137 HIPAA scenarios through a 7B-parameter LLM — on every prompt variant you want to test — takes hours on a CPU and minutes on a GPU. The Stony Brook AI Cluster gives you access to NVIDIA H100s, V100s, and Quadro RTX 8000s, shared across the lab.
AI Cluster (your primary target)
- Login: submit.ai.stonybrook.edu
- Port: 22 (standard SSH)
- GPUs: V100 (32GB), RTX 8000 (48GB), H100 (80GB)
- Submit via: SLURM
- Use for: all inference + fine-tuning experiments
DGX A100 (if you need it)
- Login: 130.245.162.235 port 130
- GPUs: 8× A100 (40GB each)
- Requires: Docker containers only
- Use for: training from scratch
- Most students: won't need this
HGX H100 (restricted)
- GPUs: 8× H100 (80GB each)
- Requires: separate form request
- Use for: very large models only
- Most students: won't need this
Step 1 — Request Access (Everyone Does This First)
Email the request to rt@cs.stonybrook.edu
Send an email with the subject line: "AI Cluster Access Request — REU 2026"
Include in the body:
- Your full name
- Your NetID (this is what you use for Brightspace/campus SSO — NOT your CS ID)
- One sentence: "I am a summer REU student in the ComplianceGPT Lab under Priscilla Kyei Danso."
Wait for the confirmation email
You will receive an email from the AI admins confirming access. Keep that email — it contains useful links. First login may be slow because your home directory is being created. That is normal.
Step 2 — Connect to the Cluster
Choose your operating system below. If you are on Windows, we strongly recommend the VS Code + Remote SSH method — it gives you a file browser, editor, and terminal all in one, which is much more useful than PuTTY alone.
Open Terminal
Press Cmd + Space, type Terminal, press Enter. Terminal is built into every Mac — no installation needed.
SSH into the cluster submit node
Replace yournetid with your actual NetID:
You will be asked for your password — this is the same password you use for Brightspace and campus Wi-Fi. You will not see characters while typing. Press Enter when done.
Accept the host key (first time only)
On first connection you'll see:
Are you sure you want to continue connecting (yes/no/[fingerprint])?
Type yes and press Enter. This only happens once.
Optional — set up SSH config for faster login
Run this once so you can type ssh cluster instead of the full address every time:
$ mkdir -p ~/.ssh && nano ~/.ssh/config
Paste this into the file (replace yournetid):
HostName submit.ai.stonybrook.edu
User yournetid
Port 22
Save with Ctrl+O Enter, exit with Ctrl+X. Now you can connect with just ssh cluster.
Copy files to the cluster with scp
To upload a file from your Mac to the cluster (run this on your Mac, not on the cluster):
$ scp /path/to/run.py yournetid@submit.ai.stonybrook.edu:/home/yournetid/
# Upload an entire folder
$ scp -r /path/to/compliancegpt/ yournetid@submit.ai.stonybrook.edu:/home/yournetid/
Install VS Code (if you haven't already)
Download from code.visualstudio.com — free, runs on Windows 10/11. During installation, check "Add to PATH."
Install the Remote - SSH extension
- Open VS Code
- Press
Ctrl+Shift+Xto open Extensions - Search: Remote - SSH
- Install the one from Microsoft (ms-vscode-remote.remote-ssh)
Verify OpenSSH is installed on your Windows machine
Open PowerShell (search it in the Start menu) and run:
You should see something like OpenSSH_for_Windows_8.6p1. If you get "command not found," go to Settings → System → Optional Features → Add a Feature → OpenSSH Client and install it.
Add the cluster as a Remote SSH host in VS Code
- Press
Ctrl+Shift+P→ type Remote-SSH: Add New SSH Host → Enter - In the box that appears, type:
ssh yournetid@submit.ai.stonybrook.edu(replace with your NetID) - When asked which config file to update, choose the first option (usually
C:\Users\YourName\.ssh\config)
Connect to the cluster
- Press
Ctrl+Shift+P→ Remote-SSH: Connect to Host - Select submit.ai.stonybrook.edu from the list
- A new VS Code window opens. It will ask for your password — type your Stony Brook NetID password
- Wait for the status bar (bottom-left) to show SSH: submit.ai.stonybrook.edu in green
Open a terminal and browse your files
- In the remote VS Code window: Terminal → New Terminal — this is a shell ON the cluster
- Click the folder icon (Explorer) on the left → Open Folder → navigate to
/home/yournetid/ - You can now drag-and-drop files from your Windows desktop into the VS Code file panel to upload them
Download and install PuTTY
Go to putty.org → Download the MSI installer (64-bit) → install it.
Configure the connection
- Open PuTTY
- Host Name:
submit.ai.stonybrook.edu - Port:
22 - Connection type: SSH
- In the left panel: Connection → Data → set Auto-login username to your NetID
- Back at Session: type a name in Saved Sessions (e.g., "AI Cluster") → click Save
Connect
Double-click your saved session. A terminal window opens. Enter your Stony Brook password when prompted. You won't see characters as you type — that's normal.
Transfer files using WinSCP
PuTTY doesn't transfer files. Download WinSCP (winscp.net) for a GUI file transfer tool. Use the same hostname, port 22, and your NetID credentials. You can drag files from Windows to the cluster like a file browser.
Step 3 — First-Time Environment Setup (Do This Once)
Once you're logged in, run these commands once to set up your Python environment. Everything after this uses the compliancegpt conda environment.
Load required modules
Add this to your ~/.bashrc so it loads automatically on every login:
Install Miniconda (if not already present)
$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
# Run it (follow the prompts — say yes to everything)
$ bash ~/miniconda.sh
# Reload shell so conda is available
$ source ~/.bashrc
Create the ComplianceGPT conda environment
$ conda activate compliancegpt
Install required packages
$ pip install transformers accelerate huggingface_hub
$ pip install pandas tiktoken requests
Copy the ComplianceGPT code to your home directory
$ cp -r /path/to/compliancegpt ~/compliancegpt
# Or clone from GitHub if it's there
$ git clone https://github.com/YOUR_REPO ~/compliancegpt
Verify your environment works
$ python -c "import torch; print(torch.__version__); print('CUDA:', torch.cuda.is_available())"
2.3.0+cu121
CUDA: True
CUDA: False on the submit node — that's expected. The submit node has no GPU. CUDA will be True only inside a running SLURM job on a GPU node.Step 4 — Understanding SLURM
SLURM is the job scheduler. You write a script describing what you want to run and how many resources you need, then submit it. SLURM queues your job and runs it when a GPU node is available. You never SSH directly into a GPU node.
Key SLURM Commands
sbatch myjob.sh | Submit a job |
squeue -u yournetid | See your jobs in the queue (status: PD=pending, R=running, CG=finishing) |
scancel JOBID | Cancel a job |
sacct -u yournetid | See your job history |
scontrol show job JOBID | Detailed status of a specific job |
sinfo | See all cluster nodes and their current state |
tail -f output.txt | Watch your output file update in real time |
Step 5 — Submit Your First Test Job
Create a test job script
On the cluster, create the file ~/test_job.sh:
Paste this content (replace yournetid in all three places):
#SBATCH --job-name=test_gpu
#SBATCH --output=/home/yournetid/test_out.txt
#SBATCH --error=/home/yournetid/test_err.txt
#SBATCH --time=0-00:10 # 10 minutes max
#SBATCH --mem=8000 # 8 GB RAM
#SBATCH --gres=gpu:1 # 1 GPU
# Activate your conda environment
source /home/yournetid/miniconda3/etc/profile.d/conda.sh
conda activate compliancegpt
# Check GPU is visible
nvidia-smi
# Check Python + CUDA
python -c "import torch; print('PyTorch:', torch.__version__); print('CUDA available:', torch.cuda.is_available()); print('GPU:', torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'none')"
echo "Test job complete."
Save: Ctrl+O Enter, exit: Ctrl+X
Submit it
Submitted batch job 48291
Note the job ID — in this example, 48291. You'll use it to check status.
Watch your job
$ squeue -u yournetid
JOBID PARTITION NAME USER ST TIME NODES NODELIST
48291 gpu test_gpu jsmith R 0:03 1 tesla1
# Watch the output file update live
$ tail -f ~/test_out.txt
Press Ctrl+C to stop watching. After the job finishes, the output file will contain the GPU name and PyTorch version.
Read the results
Sun Jun 29 10:14:22 2025
+-----------------------------------------------------------------------+
| NVIDIA-SMI 525.89 Driver Version: 525.89 CUDA Version: 12.0 |
+-----------------------------------------------------------------------+
...
PyTorch: 2.3.0+cu121
CUDA available: True
GPU: Tesla V100-SXM2-32GB
Test job complete.
CUDA available: True, you're set. Your environment works.Step 6 — Run a ComplianceGPT Experiment
This is the job script template for your actual research experiments. Copy it, change the parameters, and submit.
Create the experiment job script
Create ~/compliancegpt/run_experiment.sh:
#SBATCH --job-name=cg_gemma_batch
#SBATCH --output=/home/yournetid/compliancegpt/logs/run_%j_out.txt
#SBATCH --error=/home/yournetid/compliancegpt/logs/run_%j_err.txt
#SBATCH --time=0-04:00 # 4 hours — enough for 137 scenarios
#SBATCH --mem=32000 # 32 GB RAM for 7B model
#SBATCH --gres=gpu:1 # 1 GPU is enough for inference
# ── Environment ─────────────────────────────────────────
source /home/yournetid/miniconda3/etc/profile.d/conda.sh
conda activate compliancegpt
# ── Parameters (change these per experiment) ────────────
MODEL="google/gemma-3-4b-it" # or meta-llama/Llama-3-8b-instruct
DATA="/home/yournetid/compliancegpt/data/goldcoin_hhs_merged.csv"
OUTPUT="/home/yournetid/compliancegpt/results/gemma3_run_$SLURM_JOB_ID.csv"
# ── Run ─────────────────────────────────────────────────
echo "Job ID: $SLURM_JOB_ID"
echo "Model: $MODEL"
echo "Data: $DATA"
echo "Output: $OUTPUT"
echo "Started: $(date)"
python /home/yournetid/compliancegpt/batch_runner.py \
--model "$MODEL" \
--data "$DATA" \
--output "$OUTPUT"
echo "Finished: $(date)"
Create the logs directory first
Submit your experiment
$ sbatch run_experiment.sh
Submitted batch job 48305
Monitor progress
$ squeue -u yournetid
# Watch live output (replace 48305 with your job ID)
$ tail -f ~/compliancegpt/logs/run_48305_out.txt
# Check for errors
$ cat ~/compliancegpt/logs/run_48305_err.txt
Download your results back to your laptop
$ scp yournetid@submit.ai.stonybrook.edu:/home/yournetid/compliancegpt/results/gemma3_run_48305.csv ~/Downloads/
In VS Code with Remote SSH: click the Explorer panel → navigate to /home/yournetid/compliancegpt/results/ → right-click the CSV → Download.
With WinSCP: connect, navigate to /home/yournetid/compliancegpt/results/, drag the CSV to your Windows folder.
How Much to Request — Resource Guidelines
For ComplianceGPT inference experiments (Gemma3:4B, Llama3:8B)
| Resource | What to request | Why |
|---|---|---|
--gres=gpu:1 |
1 GPU | Inference on 137 scenarios fits on one GPU. Don't request more than you need. |
--mem=32000 |
32 GB RAM | 4B model needs ~8GB GPU VRAM + system memory for data loading. |
--time=0-04:00 |
4 hours | 137 scenarios at ~10-30 sec each = under 1 hour. 4 hrs gives buffer for queue wait. |
DO
- Request only what your job needs — check your last run's actual memory use with
sacct - Set a realistic
--timelimit — if your job hangs, it will be killed automatically - Use
%jin output file names to embed the job ID — keeps logs organized - Test with 5–10 rows before submitting the full 137-row run
- Free your results immediately when done — cluster storage quota is 500 GB
DO NOT
- Run anything interactively on the submit node — it has no GPUs and is shared by everyone
- Request
--mem=300000"to be safe" — this blocks your job in the queue and starves other users - Request 8 GPUs for a single inference job — 1 is enough
- Run Jupyter notebooks on the cluster
- Leave experiments running for weeks without checking on them
Common Issues
Who to Contact
System / technical issues
Nodes down, storage issues, environment problems that seem cluster-related.
Access / account issues
Can't log in, access not granted yet, NetID questions. Always include your NetID in the email.
Stuck? Message Priscilla on Slack first.
Before emailing the admins, post your error in #cluster-help on Slack with the full error message and your job ID. Most issues are quick to diagnose and don't need admin intervention.