A cluster is a building, not a computer.

Explorer is a few hundred Linux machines, one shared disk and a scheduler that hands the machines out. This guide takes you from “what is /dev?” to serving an LLM, steering Qwen for your paper and writing CUDA kernels on Northeastern’s cluster. Every command is labeled with the machine it runs on, and the terminal is a sandbox of explorer-02 where mistakes cost nothing.

  1. 1The mental model
  2. 2The Linux filesystem
  3. 3Users, permissions, chmod
  4. 4Shell, PATH and modules
  5. 5SSH, Cursor and tunnels
  6. 6Slurm: asking for machines
  7. 7Environments that survive
  8. 8Your first real GPU job
  9. 9Inference engineering
  10. 10Your paper: steering Qwen
  11. 11CUDA kernels and NGC
  12. 12Robotics simulation
  13. 13Multi-GPU and DevOps
  14. 14Fixes to the starter kit
  15. 15Hacks and optimizations
  16. 16Syntax drills
  17. 17Questions people ask
Your laptop Login node Compute node, inside a job A file’s contents

Missions 0 / 12

    A simulation: outputs are trimmed and some paths are invented. Every command here is real, so run it on Explorer once it clicks. Type help for the full list.

    1The mental model

    laptoplogincompute

    When you SSH into Explorer you are not “on the cluster” in the way you are on your laptop. You are on one specific machine, explorer-02, whose only job is to be the front door. Think of a hotel. The login nodes are the lobby: anyone can walk in, sit down, read, write and plan. The Slurm controller is the front desk that assigns rooms. The compute nodes are the rooms, and nobody sleeps in the lobby. The shared storage is the building’s plumbing: the water in the lobby is the same water in every room, which is why a file you save on the login node is instantly visible on a GPU node. The InfiniBand network is the hallways, fast enough (200 Gb/s) that GPUs in different rooms can talk while training together.

    Your login node is not a toy. explorer-02 has two Xeon Gold 5318Y sockets, 96 logical CPUs and 256 GB of RAM, and still has no GPU. It is shared by every user logged into it, and a watchdog kills processes that hog it. That single fact explains half the “why did my thing die?” stories, including Claude Code being killed when you ran it there.

    Click any part of the building

    Your laptopMobaXterm, Cursor Login nodesexplorer-02, no GPU Slurm controllerexplorer-ctld CPU nodesc0xxx, 24–128 corespartition: short GPU nodesd1xxx, d4xxx, c2xxxV100 to H200 InfiniBand200 Gb/s fabric Shared storage (VAST, over the network)/home /scratch /projects /datasets /shared

    Pick a part

    Or follow one job from your keyboard to a GPU and back.

    What hardware you can actually ask for

    This comes from the scontrol show node dump you ran earlier. The --gres name is the exact word you type to request that GPU. “Compute capability” (written sm_80 and so on) is the GPU’s generation number, and it decides which software runs on it, so it matters more than the marketing name.

    --gres nameGPUMemoryCapabilitybf16 / fp8PartitionsGood for
    v100-sxm2V100 SXM2 ×4 per node32 GBsm_70no / nogpu*, sharingMost plentiful. Older software only (see chapter 7)
    v100-pcieV100 PCIe ×232 GBsm_70no / nogpu*Same chip, slower links
    t4T4 ×416 GBsm_75no / nogpu*Small inference, CUDA practice
    a100A100 ×3 (d1026)40 GBsm_80yes / nogpu*Training and serving 7B models
    a100 + --constraint=a100@80gA100 ×480 GBsm_80yes / nogpu*The all-rounder for LLM work
    h200H200 ×8141 GBsm_90yes / yesgpu*, sharingFastest. Native FP8. Longest queue
    h100H100 ×4 (d4041)~94 GBsm_90yes / yessharingShort runs only (sharing is capped at 1 hour)
    l40s, l40L40S ×8, L40 ×1048 GBsm_89yes / yessharingInference, and the only cards with ray-tracing cores for Isaac Sim
    rtx6000RTX 6000 ×8checkcheckchecksharingRun nvidia-smi to see which generation it is
    p100P100 ×416 GBsm_60no / nosharingSkip it

    gpu* means the three partitions gpu, gpu-short and gpu-interactive, which all draw from the same GPU nodes with different time limits. The system report guessed that c nodes are newer than d nodes. They aren’t: c2204 holds V100s and d4052 holds H200s. Node names are rack and purchase labels, so read the Gres= line instead of guessing from the name.

    Where does each thing run?

    Click where you’d do each one. Some have two right answers, and the explanation says why.

      If the login node has 96 CPUs and 256 GB of RAM, why can’t I just train there?

      Think about who else is sitting in that lobby.

      Hundreds of people share it, and everything they type (editing, git, squeue) has to stay snappy. The Research Computing policy says jobs run on login nodes get terminated, and a watchdog enforces it by capping or killing heavy processes. Also, it has no GPU, so for ML it is slow even when it works. The fix is one command away: srun -p short --cpus-per-task=8 --mem=16G --time=02:00:00 --pty bash gives you a private CPU room in seconds.

      Why does a file I create on explorer-02 show up instantly on a GPU node?

      Neither machine stores it. /home, /scratch and the rest live on a separate storage system (VAST, all-flash, at the MGHPCC data center in Holyoke) and every node mounts the same directories over the network. That is also why storage choices matter: every read is a network trip, so reading two million tiny files from /scratch each epoch is far slower than reading one big file, or copying the data to the node’s local disk first (chapter 15).

      2The Linux filesystem

      logincompute

      Explorer runs Rocky Linux 9 (a free rebuild of Red Hat Enterprise Linux). If you’ve used a Raspberry Pi, Ubuntu or a Mac terminal, most of what you know transfers, because Linux follows a shared map called the Filesystem Hierarchy Standard. There are no drive letters. Everything hangs off one tree that starts at / (“root”), and extra disks or network storage are mounted into that tree at some folder, so /scratch looks like an ordinary folder even though it is 2 petabytes of storage in another building.

      The other big idea: everything is a file. Your GPU appears as /dev/nvidia0. Your CPU’s details are readable text at /proc/cpuinfo. Writing to /dev/null throws data away. Once you see that, the strange folder names stop being strange.

      Walk the tree

      Explorer’s storage, and what each mistake costs

      PathSize and rulesBacked up?Put hereNever put here
      /home/$USER75 GB quotaYesCode, scripts, configs, conda envs, small resultsDatasets, model weights, checkpoints
      /scratch/$USERHuge and fast, but everything is deleted on the first Tuesday of every monthNoDownloaded weights, datasets, caches, checkpoints during a runAnything you can’t recreate, including your conda env
      /projects/<group>Requested by a faculty PI (up to 35 TB free)PersistentLong-lived data for a research group—
      /datasetsShared, read-only—Look here before downloading a public dataset(you can’t write here)
      /sharedCommunity space—/shared/container_repository/explorer/ has ready-made container images—
      /tmp on a compute nodeThe node’s own local diskNo, wiped after the jobMany small files you read over and over during one jobResults you need later
      The monthly purge changes some earlier advice

      The starter kit put your conda environments under /scratch to protect your home quota. On Explorer that means they vanish every month. Chapter 7 moves them to /home, where an ML environment of 6–12 GB fits comfortably inside 75 GB.

      Where should it live?

        The commands you’ll use every day

        What is a bin folder, and why are there so many of them?

        “bin” is short for binaries: programs you can run. /usr/bin holds the system’s programs (ls, python3, git). /usr/local/bin holds things an admin installed by hand. ~/.local/bin is your bin, where tools like Claude Code install themselves without root. When you load a module, its bin folder gets added to your search list (your PATH, chapter 4). Run which ls or which python to see which bin a command is coming from. On a modern distro, /bin is just a link to /usr/bin.

        Will I find the same folders on a Raspberry Pi?

        Almost exactly. /etc, /dev, /proc, /home, /usr/bin and the rest are all there. What differs: the Pi uses apt to install software and Explorer uses dnf (which you can’t run without root anyway); the Pi has an ARM CPU so compiled programs don’t move between the two; and only Explorer has the network mounts /scratch, /projects and /datasets. On the Pi, /dev also has GPIO pins (/dev/gpiochip0), which is the same “everything is a file” idea applied to wires.

        3Users, permissions and chmod

        login

        Linux was built for many people sharing one machine, which is exactly what a cluster is. Every file has an owner (a user), a group, and nine permission bits that say what the owner, the group and everyone else may do. Run ls -l and you’ll see lines like this:

        r means read, w means write, x means execute. For a folder the letters shift meaning: r lets you list its contents, w lets you create or delete files inside it, and x lets you enter it with cd. A folder with r but no x is a locked glass door: you can see the names but can’t open anything.

        The digits people type come from adding up the letters: r = 4, w = 2, x = 1. So rwx = 7, r-x = 5, rw- = 6, --- = 0, and chmod 750 run.sh produces the line above. Click the boxes to build any combination.

        Why sudo said no

        root is the one user allowed to do anything: install system packages, read everyone’s files, reboot. sudo asks to act as root for one command, and it checks a list called sudoers. You’re not on it and never will be on a shared cluster, which is why you got “ahmed.mohammedr is not in the sudoers file. This incident will be reported.” The “report” is a log line for admins. Nobody is in trouble.

        You don’t need root, because everything an ML engineer installs can live in folders you own: conda and pip environments in your home, programs in ~/.local/bin, software built from source with --prefix=$HOME/.local, and whole operating-system images through Apptainer containers (chapter 13). The one thing you truly can’t do is change the system: drivers, the kernel, /etc.

        I wrote run.sh myself. Why does ./run.sh say “Permission denied”?

        New files are created without the execute bit, for safety. Either run it through the shell, bash run.sh (bash only needs to read it), or mark it runnable with chmod +x run.sh. The ./ matters too: Linux doesn’t look in the current folder for commands unless you say so, which stops a file named ls in someone’s folder from hijacking you.

        SSH refuses my key with “UNPROTECTED PRIVATE KEY FILE”. Why does it care?

        A private key that other users can read isn’t private anymore, so OpenSSH refuses to use it rather than pretend. chmod 600 on the key and chmod 700 on ~/.ssh fixes it. On Windows the same rule exists, enforced through file properties instead of chmod.

        Could I chmod 777 my home so a classmate can read my code?

        You could, and then anyone on the cluster could also delete it. The better tools: share through Git, or ask your PI for a /projects space whose group you both belong to, then use chmod -R g+rX on just the folder you want to share.

        4Your shell: variables, PATH and modules

        logincompute

        The program reading your typing is bash. The prompt [ahmed.mohammedr@explorer-02 ~]$ is three facts: who you are, which machine you’re on, and which folder you’re in. When that middle part changes to d1028, you are on a GPU node. Glance at it before every command; it is the cheapest habit in this guide.

        Bash keeps a set of named strings called environment variables. Programs read them to decide where to look for things. You set one with NAME=value (no spaces around =), read it with $NAME, and export it so programs you start can see it too.

        PATH is the variable that explains most “command not found” errors. When you type nvcc, bash walks the folders in $PATH left to right and runs the first nvcc it finds. If none of the folders contain it, you get “command not found”, even if the program sits on disk somewhere else.

        That is all a module is. Explorer has dozens of versions of CUDA, compilers and Python installed under a shared folder. module load cuda/12.8.0 doesn’t install anything; it prepends that version’s bin folder to PATH and its libraries to LD_LIBRARY_PATH. Toggle modules below and watch.

        What module load actually changes

        PATH, first match wins (paths are illustrative):

        What these commands would print:

        Startup files: ~/.bashrc

        Every new interactive shell runs ~/.bashrc first. Put lines there that you want in every session: cache locations, aliases, small helper functions. Edit it with nano ~/.bashrc (Ctrl-O saves, Ctrl-X exits), then source ~/.bashrc to apply it to the shell you’re already in. source runs a file inside your current shell, so its variables stick; bash file.sh runs it in a child shell whose variables disappear when it exits.

        Plumbing: pipes, redirection and exit codes

        Why does conda activate work when I type it but fail inside an sbatch script?

        conda activate isn’t a program. It is a shell function that conda init wrote into your ~/.bashrc, and batch jobs run a non-interactive shell that may never read that file. Two reliable fixes inside scripts: source activate ml (an older entry point that is a real script), or eval "$(conda shell.bash hook)" followed by conda activate ml.

        If I load a module on the login node and then run sbatch, does the job get the module?

        Usually yes: by default Slurm copies your whole environment at submit time into the job (--export=ALL). That is convenient and a trap. A job that works today because of something you happened to load breaks next week in a fresh terminal. Always write the module load lines inside the script so the script fully describes what it needs.

        5Getting in: SSH, keys, Cursor and tunnels

        laptoplogin

        SSH (secure shell) is two programs talking over an encrypted connection: a client on your laptop and a server on the login node. MobaXterm, PowerShell’s ssh, and Cursor’s Remote-SSH are all just different SSH clients. Explorer’s address is login.explorer.northeastern.edu, which sends you to whichever login node is free (often explorer-02). The older discovery.neu.edu names in the starter kit come from the previous cluster.

        A password plus Duo works, but every new connection (and Cursor opens several) asks again. An SSH key fixes that. It is a pair of files: a private key that never leaves your laptop, and a public key you copy to the cluster’s ~/.ssh/authorized_keys. The server sends a challenge only the private key can answer. Research Computing’s docs also say passwordless SSH is needed for some graphical apps to launch properly.

        Set up a key, step by step

        In MobaXterm, edit your session, open Advanced SSH settings, tick Use private key and point it at the same id_ed25519 file. MobaXterm’s left sidebar is also an SFTP file browser: drag files between your laptop and the cluster without any commands.

        Build your SSH config

        An SSH config file gives each connection a short name, so ssh explorer replaces the long command and Cursor lists your hosts in a menu. The second block uses ProxyJump: “to reach this GPU node, hop through the login node first.” That only works while you hold a running job on that node, and only if Explorer lets you SSH into nodes where you have a job (many Slurm clusters do; test with ssh d1028 from the login node while a job runs there).

        C:\Users\you\.ssh\config

        Cursor (or VS Code) over SSH

        1. Install the Remote - SSH extension in Cursor if it isn’t there already.
        2. Save the config above to your laptop’s .ssh/config.
        3. Command Palette (Ctrl+Shift+P), run Remote-SSH: Connect to Host, pick explorer.
        4. Cursor copies a small server program into ~/.cursor-server on the cluster and connects your editor to it. Open the folder /home/ahmed.mohammedr.
        5. Use the built-in terminal (Ctrl+`) for sbatch and squeue. The file tree updates live as jobs write logs.
        The editor server counts as login-node usage

        Editing is light, but extensions that index your whole repo or run language servers on huge folders are not. Keep the opened folder small (not /scratch with a million files), and if the watchdog keeps killing it, connect Cursor to a compute node instead: start the “hold a node” job below, then connect to the explorer-gpu host from the config. Explorer’s web portal, Open OnDemand at ood.explorer.northeastern.edu, also launches JupyterLab and other apps on compute nodes for you, with no SSH config at all.

        Port forwarding: reaching a server inside the cluster

        Compute nodes live on a private network. Your laptop can reach the login node; the login node can reach the compute nodes; your laptop cannot reach a compute node directly. An SSH tunnel chains the two: “anything sent to port 8000 on my laptop, carry it through my SSH connection and deliver it to port 8000 on d1028.” This is how you’ll open a vLLM server, Jupyter, TensorBoard or a Grafana dashboard in your laptop’s browser.

        Your laptop localhost:8000 Login node port 22 (SSH) d1028 :8000 (vLLM) encrypted SSH, from outside private network
        Laptop terminal, leave it open
        Why can’t I just open http://d1028:8000 in my browser?

        Your laptop has never heard of d1028. It is a name on the cluster’s internal network, which isn’t routed to the internet or even to campus Wi-Fi. Only machines inside the cluster can resolve and reach it. The tunnel works because the last hop (login node to d1028) happens inside.

        Moving files

        6Slurm: asking for machines

        logincompute

        Slurm is the front desk. You never pick a machine; you describe what you need, and Slurm decides where and when. No one approves individual jobs and it costs you nothing: Explorer is free to Northeastern students with a sponsor, and your access already exists. What limits you is policy (how many GPUs per job, how many hours) and priority (whose job goes next).

        Every request is built from the same handful of words:

        FlagShortMeansExample
        --partition-pWhich queue (a named group of nodes with its own rules)-p gpu-short
        --gresGeneric resources: GPUs, as gpu:type:count--gres=gpu:a100:1
        --constraint-COnly nodes tagged with this feature--constraint=a100@80g
        --cpus-per-task-cCPU cores for your program (data loading lives here)-c 8
        --memSystem RAM for the job. Not GPU memory. Default is only 2 GB per CPU--mem=64G
        --time-tWall-clock limit. The job is killed when it runs out-t 01:30:00 or -t 90
        --nodes, --ntasks-N, -nMachines, and separate processes. Leave at 1 until chapter 13-N 1 -n 1
        --job-name, --output-J, -oLabel, and where stdout goes. %j = job id, %x = name-o logs/%x-%j.out

        Three ways to ask

        CommandWhat happensUse it for
        srun ... --pty bashWaits for a node, then your terminal becomes a shell on it. Close the terminal and the job ends.Exploring, debugging, installing, “does this even run?”
        sbatch job.sbatchQueues a script and returns immediately. The script runs unattended; output goes to a log file.Anything real: training, sweeps, serving. Survives you closing your laptop.
        salloc ...Reserves nodes and gives you back a login-node shell that “owns” them; you then srun or ssh into them.Multi-step interactive work, holding a node for an editor.

        Explorer’s partitions

        PartitionMax timeGPUs per jobRunning jobsNotes
        short (default)48 hCPU only—Preprocessing, installing, CPU jobs. Max 2 nodes per job
        gpu-interactive2 h12For srun --pty and Open OnDemand sessions
        gpu-short2 h12Higher priority than gpu: short jobs start sooner
        gpu8 h1up to 4 GPUs totalReal training runs
        multigpu24 hup to 8—Needs approval through a ServiceNow access request
        sharing1 hvaries—Low priority, but it’s where the H100, L40S, L40 and RTX 6000 live
        One GPU per job, unless you get multigpu access

        Research Computing’s docs say a request for more than one GPU on the gpu partition fails, and the GPU partition table lists a limit of 1 per job for gpu, gpu-short and gpu-interactive. The starter kit’s 4-GPU DDP job and the “4× A100” srun line would both be rejected. Limits do change, so treat this table as a snapshot and confirm with sinfo or scontrol show partition gpu.

        Your first batch job, line by line

        Click any line with a + to open its explanation. This exact file is in the sandbox’s home folder as hello.sbatch, with one deliberate trap. Submit it in the terminal and see if you can work out what went wrong before reading the last note.

        Request builder

        Describe a job and the builder writes the script or srun line, then checks it against Explorer’s rules. Try to make it fail: ask for 2 GPUs on gpu, 3 hours on gpu-short, or bf16 work on a V100.

        train.sbatch

          Reading a job’s life

          StateMeaning, and what to do
          PD pendingWaiting. The REASON column says why (right).
          R runningOn a node. squeue shows which.
          CD completedExited with code 0.
          F failedNon-zero exit: read the .err/.out file. No file at all? Check the output folder exists.
          TO timeoutHit --time. Ask for more, or checkpoint and resume.
          OOMExceeded --mem (CPU RAM). Raise it. GPU memory errors look different: “CUDA out of memory” inside your log.
          CA cancelledYou, or an admin, ran scancel.
          Pending reasonTranslation
          PriorityOthers are ahead of you. Wait, or ask for less.
          ResourcesYou’re next, but nothing that matches is free yet.
          QOSMax…, AssocGrp…You hit a per-user limit (GPUs, running jobs). It starts when one of yours ends.
          ReqNodeNotAvailNodes reserved, often for maintenance. Shorter --time may fit before it.
          PartitionTimeLimitYour --time exceeds the partition max. It will never start: cancel and resubmit.
          DependencyWaiting for another job you chained it to.

          How priority works here. Explorer scores pending jobs with a weighted formula. The heaviest weight is fairshare: the less you’ve used recently, the higher you rank, and GPU time is weighted heavily in that accounting. Waiting time (age) adds a bit. Then the backfill scheduler slots small jobs into gaps: if a big job is waiting 50 minutes for 4 GPUs to free up, your 30-minute job can run in that window without delaying it. That is why a truthful --time is the single best queue trick.

          I asked for 1 GPU on a node that has 4. Can my code see the other 3?

          No. Slurm sets CUDA_VISIBLE_DEVICES and uses Linux cgroups so your processes only see the GPU, CPU cores and memory you were given. nvidia-smi inside the job lists one GPU, and torch.cuda.device_count() returns 1. It also means asking for -c 8 and starting a DataLoader with 32 workers just makes 32 workers fight over 8 cores.

          What actually happens when my time runs out?

          Slurm sends your program SIGTERM (a polite “please stop”), waits a short grace period (often 30 seconds), then SIGKILL, which can’t be caught. Code that catches SIGTERM can save a checkpoint in that window; train.py in chapter 8 does exactly that. For more warning, #SBATCH --signal=USR1@300 sends a signal 5 minutes before the limit.

          7Environments that survive

          logincompute

          Software on Explorer comes in three layers. The system layer (Rocky Linux, the GPU driver, /usr/bin) belongs to the admins. The module layer (CUDA toolkits, compilers, Miniconda) is shared software you switch on. The personal layer is yours: conda or uv environments with exactly the Python packages a project needs, or a whole container image.

          Two decisions here matter more than they look. First, where the environment lives: /home, because /scratch is wiped monthly. Second, which PyTorch build you install, because the cluster spans GPU generations from 2016 to 2024 and current software is dropping the old ones.

          The V100 problem

          PyTorch’s current CUDA 12.8+ builds no longer include kernels for the V100 (compute capability 7.0). The CUDA 12.6 builds still do, and PyTorch has announced that 2.14 is the last release to ship them. Recent vLLM releases have dropped the V100 entirely. So: if you want one environment that runs on every GPU in gpu*, install PyTorch from the cu126 index (that build also covers A100, H200 and, through compatibility, L40S). For vLLM, use A100, H200 or L40S and don’t bother with V100.

          If PyTorch brings its own CUDA, why does anyone module load cuda?

          PyTorch’s pip wheels bundle the CUDA runtime libraries they need, and the GPU driver comes from the node. So plain PyTorch training needs no CUDA module at all. You need the module when you compile GPU code: nvcc for your own kernels, building a PyTorch C++/CUDA extension, or installing a package like flash-attn from source. That is why nvidia-smi can report “CUDA Version 12.x” while nvcc is “not found”: they are different pieces.

          Build the environment, line by line

          Run this inside a CPU job, not on the login node: pip resolving and unpacking several GB of wheels is exactly the kind of sustained load the watchdog kills. The login node and compute nodes share your home folder, so an environment built on a compute node works everywhere.

          Prove it works on a GPU

          Prefer containers? Apptainer runs Docker images without root, and a container freezes the entire software stack so a result can be reproduced months later. Chapter 13 covers it; Research Computing also keeps ready-made images in /shared/container_repository/explorer/.

          8Your first real GPU job

          logincompute

          The CIFAR-10 project in the starter kit is the right first job, and not because of the model. A ResNet-18 that reaches about 94% accuracy in ten minutes is a known quantity, so if anything goes wrong the problem is your pipeline: data location, environment, logging, checkpointing. Get those right once and every later project reuses them.

          The order of operations:

          1. Stage the data from the login node. Downloading 170 MB is light work, and compute nodes may not have internet access. Never let a job you waited an hour for spend its first minute failing to download.
          2. Write the job script (below), and create its log folder.
          3. Submit, watch, read. sbatch, squeue --me, tail -f.
          4. Check efficiency with seff and right-size the next request.

          The job script

          The four patterns inside train.py that make it cluster-safe

          Watching a running job

          What “good” looks like

          GPU utilization near 90–100% means the GPU is the bottleneck, which is what you want. Utilization bouncing between 0 and 100 means the GPU is starved, usually by too few DataLoader workers or slow file reads. seff reporting 10% memory efficiency means you asked for 10× the RAM you needed; next time ask for less and you’ll start sooner.

          Experiments to run once it works

          Change one thing at a time and predict before you look. Double --batch-size: does img/s rise, and does accuracy hold? Set -c 2: what happens to GPU utilization? Request --gres=gpu:h200:1: is it faster than an A100 for a model this small, or is something else the bottleneck? (Hint: a small ResNet often can’t keep an H200 busy.)

          9Inference engineering with vLLM

          laptoplogincompute

          Serving an LLM has two phases with opposite personalities. Prefill reads the whole prompt at once: lots of math, done in parallel, and it determines time to first token (TTFT). Decode produces one token at a time: little math per step, but every step re-reads all the model’s weights and the cached attention keys and values from GPU memory, so it is limited by memory bandwidth. It determines inter-token latency (ITL).

          The KV cache is the memory that stores those keys and values for every token of every active conversation. It is what fills up. vLLM’s PagedAttention stores it in small blocks so nothing is wasted, and continuous batching lets new requests join the running batch at every step. Together they explain the curve you’ll measure: throughput climbs as you add concurrent users, until the KV cache is full, after which new requests wait and TTFT shoots up.

          You can predict where that knee is before running anything. Pick a model and a GPU:

          How many conversations fit?

          weightsruntime overhead (rough)KV cachehatched: held back by utilization

            KV bytes per token = 2 (K and V) × layers × KV heads × head size × bytes. The overhead slice is a flat 2 GB guess for activations and CUDA graphs; vLLM prints the real KV capacity at startup (“GPU KV cache size: … tokens”). Compare the two.

            Why does throughput keep rising with more users while each user gets slower?

            Decode reads all the weights once per step. How many users share that read?

            One decode step for 1 user and for 32 users costs almost the same weight-reading time, because the weights are read once and applied to every sequence in the batch. So total tokens per second rises nearly linearly at first. Each step does get a bit slower (more KV cache to read, more math), so each individual user sees a higher ITL. Once the KV cache is full, extra users can’t join the batch at all and just queue, which is the TTFT cliff.

            Step by step

            1. Download the model from the login node

            2. Serve it

            3. Connect from your laptop

            vLLM also exposes Prometheus metrics at /metrics (queue length, KV cache usage, token throughput). Through the same tunnel, a Prometheus and Grafana pair running in Docker on your laptop can scrape it, which gives you the observability piece of your portfolio project without touching the cluster’s rules.

            Your four-way benchmark, mapped onto Explorer

            Your portfolio plan is to serve an 8B model four ways (naive HuggingFace, vLLM BF16, FP8, INT4 AWQ) and measure TTFT, ITL, p95/p99 and VRAM from 1 to 64 concurrent users. Explorer adds a dimension most people can’t test: the same configs on two GPU generations.

            ConfigA100 80 GB (sm_80)H200 141 GB (sm_90)What to look for
            HF generate()Run itOptionalThe baseline with no continuous batching. The gap at concurrency 32 is the headline chart.
            vLLM BF16Run itRun itYour reference curve on each GPU; the H200’s extra memory bandwidth shows up in ITL.
            vLLM FP8Runs, but A100 has no FP8 math, so vLLM uses weight-only FP8 kernelsNative FP8 tensor coresSame flag, different mechanism. Does FP8 speed up the A100 or only save memory? A finding worth a paragraph.
            vLLM INT4 AWQRun itRun itFar smaller weights, so far more KV cache: watch where the knee moves. Check output quality too.

            Each config is one job on one GPU, which fits the 1-GPU limit perfectly. Make the model and quantization variables in the script and submit the whole grid as a job array (chapter 10 shows how).

            10Your paper: steering Qwen

            logincompute

            You’re reproducing “Playing Devil’s Advocate: Off-the-Shelf Persona Vectors Rival Targeted Steering for Sycophancy” on a single model. Whatever the paper’s exact recipe (follow it for layers, prompts, scaling and metrics), the computational shape of activation steering is the same, and it maps onto the cluster cleanly.

            A transformer passes a vector for each token from layer to layer (the residual stream). A steering vector is a direction in that space, often found by averaging activations on prompts that show a trait and subtracting the average on prompts that don’t. Steering adds α × v to the residual stream at some layer during generation. You don’t edit the model’s code to do this: PyTorch forward hooks let you intercept and modify any layer’s output from outside.

            1. Login node: download Qwen2.5-7B-Instruct to /scratch (chapter 9, step 1). In bf16 it is about 15 GB, so one A100 80 GB holds it with lots of room, and one GPU per job is all you need.
            2. Interactive GPU: gpushell a100 120, or JupyterLab on Open OnDemand with the Python (ml) kernel. Load the model, print model to find the layer list (model.model.layers for Qwen2), and test one hook by hand.
            3. One batch job: extract the vectors for every layer at once and save them to your home (they’re tiny).
            4. A job array: sweep layers × α, one GPU task per combination, each writing a JSON file.
            5. Login node or a short CPU job: aggregate the JSON files into tables and plots.

            Extracting vectors

            Applying a vector with a hook

            The sweep: one submission, many GPUs

            A job array submits N copies of one script; each copy gets a different $SLURM_ARRAY_TASK_ID (0, 1, 2, …) and uses it to pick its settings. %2 caps how many run at once, which matters on gpu-short where you can only have two running jobs anyway. Edit the lists and click a cell to see how bash turns a task id into a layer and an α.

              Why α = 0 belongs in every sweep

              It’s your control: the same code path, the hook attached, adding nothing. If α = 0 doesn’t reproduce the unsteered model’s answers exactly, something else changed (a different prompt template, sampling turned on, a dtype difference) and none of the other cells can be trusted yet.

              11NVIDIA: CUDA kernels and NGC containers

              logincompute

              A CPU has a few dozen powerful cores that each run their own instruction stream. A GPU has thousands of simple lanes grouped into streaming multiprocessors (an A100 has 108 SMs), and lanes run in lock-step groups of 32 called warps. CUDA asks you to write one function, a kernel, and launch it on a grid of blocks, each block holding up to 1024 threads. Every thread runs the same code; the only thing that differs is its index, so each thread computes “which element is mine?” from blockIdx, blockDim and threadIdx.

              Memory explains most performance. HBM (the 80 GB on an A100) is huge but far away; shared memory and registers inside each SM are tiny but fast. Many real kernels, like adding two arrays, do one addition per 12 bytes moved, so they are limited by memory bandwidth, not math. That’s why fusion (doing several operations while the data is already on-chip) is the idea behind FlashAttention, torch.compile and the starter kit’s fused GELU kernel.

              Which thread handles which element?

              Hover or tap an element.

              Real launches use 128–256 threads per block. Colors are blocks; hatched cells are threads that exist but fail the if (i < n) test and do nothing.

              Your first kernel

              Matching the toolkit to the GPU

              -arch must match where the binary will run, or it fails with “no kernel image is available for execution on the device”. The CUDA 13 toolkits dropped Volta and Pascal targets, so for a V100 compile with cuda/12.x and -arch=sm_70. If nsys or ncu aren’t found after loading CUDA, try module load nvidia-hpc-sdk/24.7, which bundles the Nsight tools.

              Next step after this: the starter kit’s custom_cuda_kernel.py, which compiles a fused scale + bias + GELU kernel into PyTorch with load_inline and benchmarks it against eager PyTorch (three separate kernels, three full trips to HBM). Run it on a GPU node with module load cuda/12.8.0 so nvcc is on the PATH. Predict the speedup from the memory traffic before you look.

              NVIDIA software, packaged

              NVIDIA publishes ready-built containers on NGC (nvcr.io): PyTorch builds tuned for their GPUs, NeMo for speech and LLM training, TensorRT-LLM for fast inference, Isaac Sim for robotics. Docker can’t run on the cluster (it needs a root daemon), but Apptainer converts these images into single .sif files you run as yourself. Pick a tag from NGC’s catalog page; tags look like 25.01-py3.

              Project ideas with NVIDIA tools

              12Robotics simulation without a screen

              logincomputelaptop

              Compute nodes have no monitor and no desktop. Simulators therefore run headless: physics steps with no window, and if you want pictures, the GPU renders frames into memory (EGL offscreen rendering) that you save as images or video and watch on your laptop. Once you accept that, three tiers open up:

              SimulatorRuns onBest forExplorer notes
              MuJoCo (+ Gymnasium)CPU; GPU only for renderingClassic control and RL, quick experimentspip install into your env. Train on short, render on any GPU node
              MuJoCo MJX / PlaygroundGPU (JAX)Thousands of parallel robots for fast RLAny A100/H200 in gpu*
              Isaac Sim / Isaac LabRTX GPUsPhotoreal sensors, large scenes, NVIDIA’s robot stackNeeds ray-tracing cores: A100, H100 and H200 don’t have them. The L40, L40S and RTX cards are in sharing (1 hour, low priority). Run from the NGC container with Apptainer

              A starter you can run today

              Next, train instead of flailing: stable-baselines3’s PPO on Humanoid-v5 as a batch job. Classic RL with small networks is mostly CPU-bound (the simulator, not the network, is the slow part), so -p short -c 16 for several hours is often a better fit than a GPU. GPUs pay off when the simulator itself runs on the GPU, which is the point of MJX and Isaac Lab.

              Can I see the simulator’s window live?

              Open OnDemand can start remote desktop sessions on compute nodes, if that app is offered on Explorer; check its Interactive Apps menu. It works for occasional inspection, but streaming a 3D view over the network is laggy, so the standard workflow stays headless: train in batch jobs, render a few evaluation episodes to video, and watch them locally.

              13Multi-GPU, containers and DevOps habits

              logincompute

              Distributed training, before you have the GPUs for it

              Data-parallel training (PyTorch DDP) runs one process per GPU. Each process holds a full copy of the model, processes a different slice of each batch, and after backward() the processes all-reduce their gradients so every copy takes the identical step. On GPUs that exchange goes through NCCL over NVLink within a node and InfiniBand between nodes.

              Since the general GPU partitions allow one GPU per job, real multi-GPU work needs the multigpu partition, which you request through a ServiceNow ticket (your faculty sponsor’s backing helps). You can learn every moving part now, though: the same code runs on CPUs with the gloo backend, four processes in one CPU job.

              Containers with Apptainer

              This is the same skill as Docker on Kubernetes, minus root. An image that runs your vLLM server under Apptainer here is the image you’d deploy to a K8s cluster later.

              Pipelines with job dependencies

              Habits that pay off

              14Fixes to the starter kit

              files

              The starter kit’s structure is good, and some of its code (the SIGTERM-safe training loop, the benchmark) is worth keeping as is. Checking it against Explorer’s published policies and current software turned up these problems, several of them from my earlier answers. Each one would have cost you a confusing failure.

              WhereProblemFix
              setup_env.shConda envs live in /scratch/$USER/conda-envs, which is wiped on the first Tuesday of every month.Keep envs in ~/.conda/envs (home, 75 GB, backed up). Only caches go to scratch. Chapter 7.
              setup_env.sh, gpushellInstalls the CUDA 12.8 PyTorch build, then defaults to V100s. Current cu128 builds have no V100 kernels.Install from the cu126 index for V100 support, or default to A100.
              serve.sbatchThe V100 --dtype half branch assumes vLLM runs on V100; recent vLLM doesn’t support it at all.Serve on A100, H200 or L40S. Rewritten in chapter 9, with an API key and a collision-free port.
              every .sbatch--output=logs/... with mkdir -p logs inside the script. Slurm needs the folder before the script starts, so the first run fails with no log.mkdir -p logs before sbatch, or write logs to the submit folder.
              train_ddp.sbatch, interactive_gpu.shRequests 4 GPUs on gpu / gpu-interactive, where the limit is 1 per job.Request multigpu access; meanwhile learn DDP on CPUs (chapter 13).
              bashrc_additions.shgpushell a100 4 asks gpu-interactive for 4 hours (max is 2); 0${hours}:00:00 breaks at 10+ hours.Take minutes, default 60 (chapter 4).
              sweep.sbatch%3 throttle on gpu-short, where only 2 of your jobs run at once.%2, or move the sweep to gpu.
              upload.sh, tunnel.shHost explorer-02.discovery.neu.edu is the old cluster’s naming; rsync isn’t on Windows by default.Use login.explorer.northeastern.edu (or the explorer alias). On Windows use MobaXterm’s SFTP panel, scp, or WSL.
              install_claude_code.shSuggests running Claude Code on the login node.Run it inside an srun -p short job (chapter 13).
              System reportSays c nodes are newer A100/H100 class.Read Gres= per node; names don’t encode generation.

              15Hacks and optimizations

              logincompute

              16Syntax drills

              loginlaptop

              Type each command from memory. Flag order doesn’t matter and short or long forms both count. Stuck? Scroll up rather than revealing the answer: finding it is the part that makes it stick.

                17Questions people ask

                Access and rules

                Do I need permission to run jobs? Does it cost anything?

                No and no. Your Explorer account already lets you submit to the general partitions, free. Limits are per-user policies (GPUs per job, running jobs, hours), and heavy use lowers your priority for a while through fairshare. multigpu and PI-owned partitions need an approval request.

                What am I not allowed to do?

                Run work on login nodes, use the cluster for anything other than Northeastern research or coursework, share your account, or leave reserved GPUs idle. Breaking the rules can get an account suspended, so when unsure, email rchelp@northeastern.edu.

                Why do my processes on the login node get killed?

                A watchdog limits each user’s CPU and memory on login nodes and kills sustained heavy processes. pip installs, unpacking archives, model loading, Claude Code running tests and VS Code/Cursor language servers on large folders are the usual victims. Move the work into srun -p short.

                Can I SSH directly into a compute node?

                Usually only while you have a job running on it, and only from inside the cluster. Test it: start a job, see its node in squeue, and run ssh d1028 from the login node. If that works, the ProxyJump config in chapter 5 works too.

                Do compute nodes have internet?

                Don’t assume either way: test once from inside a job with curl -sI https://huggingface.co | head -1. Whatever the answer, downloading on the login node and running jobs offline is the reliable pattern.

                Linux and storage

                What’s the difference between a node, a socket, a core and a thread?

                A node is one physical server. A socket is one CPU chip on it (Explorer’s login node has two). A core is an independent processor on the chip (24 per socket there). A hardware thread is one of two instruction streams a core can interleave (hyper-threading), which is why that node reports 96 “CPUs”. In Slurm, --cpus-per-task counts these logical CPUs.

                My home is full. Where did 75 GB go?

                Usually hidden caches. du -sh ~/.[!.]* ~/* | sort -h | tail shows the biggest items; the culprits are ~/.cache/pip, ~/.cache/huggingface, ~/.conda/pkgs and old environments. Delete the caches (they rebuild) and point them at scratch with the .bashrc lines in chapter 4.

                What exactly happens on purge day?

                Files on /scratch are deleted on the first Tuesday of each month during maintenance, and RC posts reminders on its status page. Jobs don’t run during the maintenance window either. Anything you need goes to home or a projects space beforehand; anything re-downloadable can stay and be fetched again.

                What are /dev/null and 2>&1?

                /dev/null is a file that discards anything written to it. Programs have two output streams: 1 (stdout, normal output) and 2 (stderr, errors). 2>&1 means “send stream 2 wherever stream 1 is going”, so cmd > log 2>&1 captures both in one file.

                source script.sh or bash script.sh?

                bash runs the script in a new child shell; its variables and cds vanish when it ends. source runs it in your current shell, so changes persist. Use source for things meant to change your session (~/.bashrc, activating environments) and bash for everything else.

                Jobs and GPUs

                “CUDA out of memory” versus state OUT_OF_MEMORY: what’s the difference?

                “CUDA out of memory” is a Python error: your model or batch didn’t fit in GPU memory. Lower the batch size, use bf16, or use gradient checkpointing. OUT_OF_MEMORY in sacct means the job used more system RAM than --mem and the kernel killed it: raise --mem.

                Will asking for more CPUs make my GPU job faster?

                Only if the CPU is the bottleneck, usually data loading and augmentation. Watch GPU utilization: if it’s already near 100%, more CPUs do nothing except make you wait longer for a node with them free.

                --ntasks versus --cpus-per-task?

                A task is a separate process (an MPI rank, or one srun launch). CPUs-per-task is how many cores each process may use for its threads. A single Python training script is one task with several CPUs. Multi-node DDP uses one task per node, each running torchrun.

                Can I keep a Jupyter notebook open on a GPU all day?

                Interactive GPU sessions end at 2 hours, and an idle reserved GPU blocks someone else. Explore in short sessions, then move anything long into a batch script; notebooks are for poking, scripts are for running.

                How big a model can I run on one GPU?

                For inference in bf16, roughly 2 GB per billion parameters plus room for the KV cache: a 7–8B model is comfortable on an A100 80 GB, 14B fits, 32B needs FP8 or INT4 or an H200. Use the calculator in chapter 9. Full fine-tuning needs several times more (gradients and optimizer state), which is why LoRA and QLoRA exist.

                Why can’t I use Docker?

                Docker runs a background service as root, and any user who controls it effectively has root on the machine. Apptainer runs containers as you, with your normal permissions, and reads Docker images directly. Same images, safe model.

                What next

                What’s a good order to do all this in?

                Sandbox missions, then SSH key and config, then the environment build, then the GPU sanity check, then CIFAR end to end. After that, split by goal: chapter 10 for your paper, chapter 9 for the inference portfolio, chapter 11 for CUDA. Each later chapter assumes only chapters 1–8.

                Where are the official docs?

                Research Computing’s documentation at rc-docs.northeastern.edu and the partitions page at rc.northeastern.edu/partitions are the sources of truth when anything here disagrees with the cluster. Help: rchelp@northeastern.edu, or book a consultation.