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
Rule of thumb for this REU: use the AI Cluster. Submit jobs via SLURM. You will not need the DGX or HGX for running Gemma3 or Llama3 inference on 137 scenarios.
No Jupyter notebooks on the cluster. The cluster is a shared resource. You must submit Python scripts as SLURM jobs — they run, produce output files, and exit. Notebooks that sit open holding a GPU for hours are not allowed and will be killed.

Step 1 — Request Access (Everyone Does This First)

1

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."
Your NetID is the same login you use for Brightspace, Wolfie email, and campus Wi-Fi. It is NOT the same as a CS department account. Example format: jsmith (not jsmith@cs)
2

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.

Mac / Linux
Windows — VS Code (Recommended)
Windows — PuTTY (Alternative)
1

Open Terminal

Press Cmd + Space, type Terminal, press Enter. Terminal is built into every Mac — no installation needed.

2

SSH into the cluster submit node

Replace yournetid with your actual NetID:

$ ssh yournetid@submit.ai.stonybrook.edu

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.

3

Accept the host key (first time only)

On first connection you'll see:

The authenticity of host 'submit.ai.stonybrook.edu' can't be established.
Are you sure you want to continue connecting (yes/no/[fingerprint])?

Type yes and press Enter. This only happens once.

4

Optional — set up SSH config for faster login

Run this once so you can type ssh cluster instead of the full address every time:

# On your Mac, not on the cluster
$ mkdir -p ~/.ssh && nano ~/.ssh/config

Paste this into the file (replace yournetid):

Host cluster
  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.

5

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):

# Upload a single script
$ 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/
Why VS Code? It turns the cluster into a remote file system you can browse, edit, and run — just like your local machine. Much better than a bare terminal for research work.
1

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."

2

Install the Remote - SSH extension

  • Open VS Code
  • Press Ctrl+Shift+X to open Extensions
  • Search: Remote - SSH
  • Install the one from Microsoft (ms-vscode-remote.remote-ssh)
3

Verify OpenSSH is installed on your Windows machine

Open PowerShell (search it in the Start menu) and run:

PS> ssh -V

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.

4

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)
5

Connect to the cluster

  • Press Ctrl+Shift+PRemote-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
First connection can take 1–2 minutes because VS Code is installing its server component on the cluster. Subsequent logins are fast.
6

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
PuTTY works but gives you only a terminal — no file browser. Use VS Code + Remote SSH if you can.
1

Download and install PuTTY

Go to putty.org → Download the MSI installer (64-bit) → install it.

2

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
3

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.

4

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.

1

Load required modules

$ module load slurm python3

Add this to your ~/.bashrc so it loads automatically on every login:

$ echo "module load slurm python3" >> ~/.bashrc && source ~/.bashrc
2

Install Miniconda (if not already present)

# Download Miniconda installer
$ 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
3

Create the ComplianceGPT conda environment

$ conda create -n compliancegpt python=3.10 -y
$ conda activate compliancegpt
4

Install required packages

$ pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
$ pip install transformers accelerate huggingface_hub
$ pip install pandas tiktoken requests
These installs can take 5–10 minutes. Run them, then go get coffee.
5

Copy the ComplianceGPT code to your home directory

# Ask Priscilla for the correct repository path
$ cp -r /path/to/compliancegpt ~/compliancegpt
# Or clone from GitHub if it's there
$ git clone https://github.com/YOUR_REPO ~/compliancegpt
6

Verify your environment works

$ conda activate compliancegpt
$ python -c "import torch; print(torch.__version__); print('CUDA:', torch.cuda.is_available())"
2.3.0+cu121
CUDA: True
You'll see 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.shSubmit a job
squeue -u yournetidSee your jobs in the queue (status: PD=pending, R=running, CG=finishing)
scancel JOBIDCancel a job
sacct -u yournetidSee your job history
scontrol show job JOBIDDetailed status of a specific job
sinfoSee all cluster nodes and their current state
tail -f output.txtWatch your output file update in real time

Step 5 — Submit Your First Test Job

1

Create a test job script

On the cluster, create the file ~/test_job.sh:

$ nano ~/test_job.sh

Paste this content (replace yournetid in all three places):

#!/bin/bash
#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

2

Submit it

$ sbatch ~/test_job.sh
Submitted batch job 48291

Note the job ID — in this example, 48291. You'll use it to check status.

3

Watch your job

# Check if it's running (R) or pending (PD)
$ 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.

4

Read the results

$ cat ~/test_out.txt
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.
If you see a V100 or H100 name and 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.

1

Create the experiment job script

Create ~/compliancegpt/run_experiment.sh:

#!/bin/bash
#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)"
2

Create the logs directory first

$ mkdir -p ~/compliancegpt/logs ~/compliancegpt/results
3

Submit your experiment

$ cd ~/compliancegpt
$ sbatch run_experiment.sh
Submitted batch job 48305
4

Monitor progress

# Check queue
$ 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
5

Download your results back to your laptop

Mac / Linux
Windows
# Run this on your Mac terminal (not on the cluster)
$ 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 --time limit — if your job hangs, it will be killed automatically
  • Use %j in 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

Problem
Fix
Permission denied (publickey)
Password auth may not be enabled from your network. Try on campus Wi-Fi. Or email aiadmins@cs.stonybrook.edu.
Job stays in PD (pending) forever
Run squeue -u yournetid — check the REASON column. "Resources" = waiting for a free GPU. "Priority" = other jobs ahead of yours. Add --nodelist=tesla1 or quadro1 to target a specific node.
Job fails immediately (empty output)
Check the --error file: cat ~/compliancegpt/logs/run_*_err.txt. Usually a missing file path or conda environment not activated.
conda: command not found
Add source /home/yournetid/miniconda3/etc/profile.d/conda.sh to your job script before conda activate.
CUDA: False in my Python test
You're running on the submit node, not a GPU node. Submit as a SLURM job — CUDA will be available there.
Model download fails mid-job
Pre-download the model in an interactive session using huggingface-cli download google/gemma-3-4b-it first. It gets cached to ~/.cache/huggingface/ and subsequent jobs skip the download.
VS Code hangs on "Opening Remote"
Kill it, wait 30 seconds, try again. If persistent, SSH in via PuTTY/Terminal, run pkill -f vscode, then retry from VS Code.

Who to Contact

System / technical issues

aiadmins@cs.stonybrook.edu

Nodes down, storage issues, environment problems that seem cluster-related.

Access / account issues

rt@cs.stonybrook.edu

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.