Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- README.md +274 -0
- vllm.sif +3 -0
.gitattributes
CHANGED
|
@@ -58,3 +58,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
vllm.sif filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,274 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
| 2 |
+
|
| 3 |
+
Self-contained Apptainer SIF for running vLLM on NVIDIA GH200 (Grace-Hopper, aarch64) nodes.
|
| 4 |
+
Baked with vLLM bleeding-edge, Transformers 5.x (for new models like gemma-4),
|
| 5 |
+
and all runtime deps. No build-time setup needed on the target machine.
|
| 6 |
+
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
## 1. Contents
|
| 10 |
+
|
| 11 |
+
| Component | Version |
|
| 12 |
+
| --- | --- |
|
| 13 |
+
| Base image | NGC `nvcr.io/nvidia/pytorch:26.03-py3` |
|
| 14 |
+
| CUDA runtime | 13.2 (with `cuda-compat` 595.45.04 baked in for older drivers) |
|
| 15 |
+
| PyTorch | 2.11.0a0 (NGC build) |
|
| 16 |
+
| Triton | 3.6.0 (NGC build) |
|
| 17 |
+
| flash_attn | 2.7.4.post1 (NGC build) |
|
| 18 |
+
| vLLM | 0.19.1rc1.dev285+g19ec9a0a6 |
|
| 19 |
+
| Transformers | **5.5.4** (installed into `/opt/extra_pkgs`, auto-loaded via `PYTHONPATH`) |
|
| 20 |
+
| huggingface_hub | 0.36.2 |
|
| 21 |
+
| Tool parsers registered | 34 (includes `qwen3_coder`, `gemma4`, `deepseek_v3`, ...) |
|
| 22 |
+
|
| 23 |
+
Note: vLLM's internal metadata says it wants `transformers<5`. We bypass that at
|
| 24 |
+
runtime by shadowing the system Transformers 4.57 with 5.5.4 from `/opt/extra_pkgs`
|
| 25 |
+
via `PYTHONPATH` (set up automatically by `/.singularity.d/env/92-extra-packages.sh`).
|
| 26 |
+
|
| 27 |
+
---
|
| 28 |
+
|
| 29 |
+
## 2. Hardware / software requirements
|
| 30 |
+
|
| 31 |
+
| Requirement | Value |
|
| 32 |
+
| --- | --- |
|
| 33 |
+
| CPU arch | **aarch64** (ARM64 — Grace, Ampere Altra, Neoverse) |
|
| 34 |
+
| GPU | NVIDIA Hopper-class (GH200, H100, H200). Compute capability ≥ 9.0 assumed. |
|
| 35 |
+
| NVIDIA driver | **R535 or newer** (compat layer in SIF handles up to CUDA 13.2). DeltaAI's 570.172.08 is compatible. |
|
| 36 |
+
| Apptainer | 1.3+ (tested on 1.4.2). Singularity CE 4.x should also work. |
|
| 37 |
+
| Disk for SIF | ~40 GB |
|
| 38 |
+
| GPU memory | 80 GB+ per GPU recommended for TP=1 on 27-30B models |
|
| 39 |
+
|
| 40 |
+
---
|
| 41 |
+
|
| 42 |
+
## 3. Quick start
|
| 43 |
+
|
| 44 |
+
```bash
|
| 45 |
+
SIF=/path/to/vllm.sif
|
| 46 |
+
|
| 47 |
+
apptainer run --nv $SIF python -c "import vllm; print(vllm.__version__)"
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
If that prints a version, you're done with setup. Proceed to section 4 for a
|
| 51 |
+
real serve command.
|
| 52 |
+
|
| 53 |
+
---
|
| 54 |
+
|
| 55 |
+
## 4. Required bind mounts and env vars
|
| 56 |
+
|
| 57 |
+
The SIF is read-only. To let vLLM write caches and find your model checkpoints,
|
| 58 |
+
you must provide writable host paths via `--bind` and point env vars at them.
|
| 59 |
+
|
| 60 |
+
### 4.1 Minimal set
|
| 61 |
+
|
| 62 |
+
```bash
|
| 63 |
+
# HuggingFace model cache (the model weights live here)
|
| 64 |
+
--bind /path/on/host/.cache/huggingface:/hf_cache
|
| 65 |
+
--env HF_HOME=/hf_cache
|
| 66 |
+
--env HF_HUB_CACHE=/hf_cache/hub
|
| 67 |
+
--env HF_HUB_DISABLE_IMPLICIT_TOKEN=1
|
| 68 |
+
|
| 69 |
+
# Runtime caches (torch.compile, triton JIT, vLLM model info, etc.)
|
| 70 |
+
--bind /path/on/host/cache_dir:/app_cache
|
| 71 |
+
--env XDG_CACHE_HOME=/app_cache
|
| 72 |
+
--env VLLM_CACHE_ROOT=/app_cache/vllm
|
| 73 |
+
--env TRITON_CACHE_DIR=/app_cache/triton
|
| 74 |
+
--env TORCHINDUCTOR_CACHE_DIR=/app_cache/inductor
|
| 75 |
+
```
|
| 76 |
+
|
| 77 |
+
Create the cache dirs once: `mkdir -p $HOME/vllm_cache/{vllm,triton,inductor}`.
|
| 78 |
+
|
| 79 |
+
### 4.2 Why this is needed
|
| 80 |
+
|
| 81 |
+
- Apptainer's auto-home mount breaks on directories protected by POSIX ACLs
|
| 82 |
+
(common on HPC cluster home dirs), so we bind our own paths explicitly.
|
| 83 |
+
- vLLM writes: `~/.cache/vllm/modelinfos`, torch.compile cache, triton JIT cache.
|
| 84 |
+
All of these need a writable persistent path.
|
| 85 |
+
- `HF_HUB_DISABLE_IMPLICIT_TOKEN=1` avoids the container trying to read a
|
| 86 |
+
non-existent token file when home has no HF credentials.
|
| 87 |
+
|
| 88 |
+
---
|
| 89 |
+
|
| 90 |
+
## 5. Example: Serve Qwen3.5-27B with tool-calling
|
| 91 |
+
|
| 92 |
+
```bash
|
| 93 |
+
SIF=/work/nvme/bdjz/rwang18/vllm_container/vllm.sif
|
| 94 |
+
HF_CACHE=$HOME/.cache/huggingface
|
| 95 |
+
APP_CACHE=$HOME/vllm_cache
|
| 96 |
+
mkdir -p $APP_CACHE
|
| 97 |
+
|
| 98 |
+
apptainer run --nv \
|
| 99 |
+
--bind $HF_CACHE:/hf_cache \
|
| 100 |
+
--bind $APP_CACHE:/app_cache \
|
| 101 |
+
--env HF_HOME=/hf_cache \
|
| 102 |
+
--env HF_HUB_CACHE=/hf_cache/hub \
|
| 103 |
+
--env HF_HUB_DISABLE_IMPLICIT_TOKEN=1 \
|
| 104 |
+
--env XDG_CACHE_HOME=/app_cache \
|
| 105 |
+
--env VLLM_CACHE_ROOT=/app_cache/vllm \
|
| 106 |
+
--env TRITON_CACHE_DIR=/app_cache/triton \
|
| 107 |
+
--env TORCHINDUCTOR_CACHE_DIR=/app_cache/inductor \
|
| 108 |
+
$SIF \
|
| 109 |
+
python -m vllm.entrypoints.openai.api_server \
|
| 110 |
+
--model Qwen/Qwen3.5-27B \
|
| 111 |
+
--port 8000 \
|
| 112 |
+
--data-parallel-size 4 \
|
| 113 |
+
--max-model-len 163840 \
|
| 114 |
+
--quantization fp8 \
|
| 115 |
+
--gdn-prefill-backend triton \
|
| 116 |
+
--reasoning-parser qwen3 \
|
| 117 |
+
--enable-auto-tool-choice \
|
| 118 |
+
--tool-call-parser qwen3_coder
|
| 119 |
+
```
|
| 120 |
+
|
| 121 |
+
### Flag reference
|
| 122 |
+
|
| 123 |
+
| Flag | Why |
|
| 124 |
+
| --- | --- |
|
| 125 |
+
| `--nv` | Inject host NVIDIA driver libs |
|
| 126 |
+
| `--data-parallel-size 4` | One vLLM engine per GPU (4x GH200) |
|
| 127 |
+
| `--quantization fp8` | GH200 native FP8; halves weight memory, frees mamba cache blocks |
|
| 128 |
+
| `--gdn-prefill-backend triton` | Avoid missing `flashinfer` dependency for Qwen3.5 linear attention |
|
| 129 |
+
| `--reasoning-parser qwen3` | Parses `<thinking>...</thinking>` from Qwen3 output |
|
| 130 |
+
| `--tool-call-parser qwen3_coder` | Required for tool/function calling with Qwen3.5-Coder |
|
| 131 |
+
|
| 132 |
+
---
|
| 133 |
+
|
| 134 |
+
## 6. Example: Serve a model that needs Transformers 5.x (e.g. gemma-4)
|
| 135 |
+
|
| 136 |
+
Exactly the same command as above — Transformers 5.5.4 is preloaded into the
|
| 137 |
+
container. Just swap the model name and parser:
|
| 138 |
+
|
| 139 |
+
```bash
|
| 140 |
+
apptainer run --nv \
|
| 141 |
+
[... same bind/env flags as above ...] \
|
| 142 |
+
$SIF \
|
| 143 |
+
python -m vllm.entrypoints.openai.api_server \
|
| 144 |
+
--model google/gemma-4-31B-it \
|
| 145 |
+
--port 8000 \
|
| 146 |
+
--data-parallel-size 4 \
|
| 147 |
+
--max-model-len 262144 \
|
| 148 |
+
--quantization fp8 \
|
| 149 |
+
--enable-auto-tool-choice \
|
| 150 |
+
--tool-call-parser gemma4
|
| 151 |
+
```
|
| 152 |
+
|
| 153 |
+
---
|
| 154 |
+
|
| 155 |
+
## 7. Querying the served endpoint
|
| 156 |
+
|
| 157 |
+
vLLM defaults to `0.0.0.0:8000`, so any machine that can reach the compute node
|
| 158 |
+
can hit it.
|
| 159 |
+
|
| 160 |
+
```bash
|
| 161 |
+
# From the same node:
|
| 162 |
+
curl http://localhost:8000/v1/models
|
| 163 |
+
|
| 164 |
+
# From another node on the cluster:
|
| 165 |
+
curl http://<node_hostname>:8000/v1/models
|
| 166 |
+
|
| 167 |
+
# From outside the cluster (e.g. your laptop):
|
| 168 |
+
ssh -L 8000:<node_hostname>:8000 user@login_host
|
| 169 |
+
# then in your laptop browser: http://localhost:8000
|
| 170 |
+
```
|
| 171 |
+
|
| 172 |
+
OpenAI-compatible chat completion:
|
| 173 |
+
|
| 174 |
+
```bash
|
| 175 |
+
curl http://localhost:8000/v1/chat/completions \
|
| 176 |
+
-H "Content-Type: application/json" \
|
| 177 |
+
-d '{
|
| 178 |
+
"model": "Qwen/Qwen3.5-27B",
|
| 179 |
+
"messages": [{"role": "user", "content": "hello"}]
|
| 180 |
+
}'
|
| 181 |
+
```
|
| 182 |
+
|
| 183 |
+
---
|
| 184 |
+
|
| 185 |
+
## 8. Tunable knobs for resource-constrained setups
|
| 186 |
+
|
| 187 |
+
| Symptom | Fix |
|
| 188 |
+
| --- | --- |
|
| 189 |
+
| `max_num_seqs (1024) exceeds available Mamba cache blocks (N)` | Add `--quantization fp8` (frees memory), OR `--max-num-seqs <N>`, OR `--gpu-memory-utilization 0.95` |
|
| 190 |
+
| Model too large to fit one GPU | Use `--tensor-parallel-size 4` (shards weights across 4 GPUs) instead of `--data-parallel-size 4` |
|
| 191 |
+
| Context length too short | Increase `--max-model-len`; you may need to lower `--max-num-seqs` to compensate |
|
| 192 |
+
| First run very slow | JIT compiling kernels; cache is persisted in `$APP_CACHE/triton` + `$APP_CACHE/inductor`, so second run is fast |
|
| 193 |
+
|
| 194 |
+
---
|
| 195 |
+
|
| 196 |
+
## 9. Troubleshooting
|
| 197 |
+
|
| 198 |
+
### `cuDriverGetVersion = 12080` instead of 13020
|
| 199 |
+
The cuda-compat layer isn't active. Sanity-check:
|
| 200 |
+
```bash
|
| 201 |
+
apptainer exec --nv $SIF bash -c 'echo $LD_LIBRARY_PATH; python -c "import ctypes; l=ctypes.CDLL(\"libcuda.so.1\"); v=ctypes.c_int(); l.cuDriverGetVersion(ctypes.byref(v)); print(v.value)"'
|
| 202 |
+
```
|
| 203 |
+
Expected: `/usr/local/cuda/compat` as the first entry in LD_LIBRARY_PATH, and `cuDriverGetVersion = 13020`.
|
| 204 |
+
If missing, the env-script `/.singularity.d/env/91-cuda-compat.sh` didn't fire — check `apptainer --version` is ≥ 1.3.
|
| 205 |
+
|
| 206 |
+
### `Permission denied` on `~/.cache/huggingface/...`
|
| 207 |
+
Your cluster's home dir probably uses POSIX ACLs that don't survive user
|
| 208 |
+
namespace. Use `--bind /explicit/path/to/cache:/hf_cache` (section 4) rather than
|
| 209 |
+
relying on auto-home.
|
| 210 |
+
|
| 211 |
+
### `ModuleNotFoundError: No module named 'flashinfer'`
|
| 212 |
+
Some models (linear-attention Qwen3.5) try to use `flashinfer` for prefill.
|
| 213 |
+
It's not installed in this SIF. Pass `--gdn-prefill-backend triton` to fall back
|
| 214 |
+
to the Triton kernel (~5-10% slower but works).
|
| 215 |
+
|
| 216 |
+
### `NVIDIA Driver Release 595.45 or later ... compatibility mode is UNAVAILABLE`
|
| 217 |
+
This NGC entrypoint warning is a false positive — it doesn't detect our baked-in
|
| 218 |
+
cuda-compat. The actual runtime verifies with `cuDriverGetVersion = 13020` (see above).
|
| 219 |
+
Safe to ignore.
|
| 220 |
+
|
| 221 |
+
### Model weights not found / re-downloading
|
| 222 |
+
vLLM looks in `$HF_HUB_CACHE` (which you set to `/hf_cache/hub` via `--env`).
|
| 223 |
+
Make sure the model is already in `<host>/.cache/huggingface/hub/models--<org>--<name>/`
|
| 224 |
+
and that you bind-mounted the correct parent directory.
|
| 225 |
+
|
| 226 |
+
### Container crashes silently right after launch
|
| 227 |
+
Check `nvidia-smi --query-compute-apps=pid --format=csv` — a previous vLLM run
|
| 228 |
+
may have orphaned workers holding the GPU. Clean up:
|
| 229 |
+
```bash
|
| 230 |
+
pkill -9 -u $USER -f "VLLM::Worker\|vllm\|api_server"
|
| 231 |
+
```
|
| 232 |
+
|
| 233 |
+
---
|
| 234 |
+
|
| 235 |
+
## 10. What's baked in vs. what's bound
|
| 236 |
+
|
| 237 |
+
At runtime the container sees a merged view:
|
| 238 |
+
- **Read-only squashfs** (ID 3 in `apptainer sif list`): the NGC 26.03 base.
|
| 239 |
+
- **Read-only ext3 overlay** (ID 4): cuda-compat, vLLM, tool parsers, `/opt/extra_pkgs/` with Transformers 5.x.
|
| 240 |
+
- **Your bind mounts**: `/hf_cache`, `/app_cache`.
|
| 241 |
+
- **Auto-injected by `--nv`**: host NVIDIA driver libs (`libcuda.so`, `libnvidia-ml.so`, `nvidia-smi`).
|
| 242 |
+
|
| 243 |
+
Nothing inside the SIF can be modified at runtime. To upgrade any baked-in
|
| 244 |
+
package, you'd need to rebuild the SIF (see repo-root install script).
|
| 245 |
+
|
| 246 |
+
---
|
| 247 |
+
|
| 248 |
+
## 11. Moving the SIF between machines
|
| 249 |
+
|
| 250 |
+
The SIF is a single file, portable across aarch64 Linux boxes. Copy:
|
| 251 |
+
```bash
|
| 252 |
+
scp vllm.sif user@other_host:/path/
|
| 253 |
+
# or
|
| 254 |
+
rsync -avh --progress vllm.sif user@other_host:/path/
|
| 255 |
+
```
|
| 256 |
+
|
| 257 |
+
Target machine just needs:
|
| 258 |
+
- `apptainer` installed
|
| 259 |
+
- aarch64 + NVIDIA driver ≥ R535
|
| 260 |
+
- Enough disk for the SIF (~40 GB) and model checkpoints
|
| 261 |
+
|
| 262 |
+
No python, no conda, no vllm install on the target.
|
| 263 |
+
|
| 264 |
+
---
|
| 265 |
+
|
| 266 |
+
## 12. Files in this directory
|
| 267 |
+
|
| 268 |
+
| File | Purpose |
|
| 269 |
+
| --- | --- |
|
| 270 |
+
| `vllm.sif` | The actual container image |
|
| 271 |
+
| `README.md` | This file |
|
| 272 |
+
|
| 273 |
+
For the build recipe (how `vllm.sif` was produced) see
|
| 274 |
+
`/taiga/illinois/eng/cs/tozhang/ricky/vllm_container/install_container.sh`.
|
vllm.sif
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:80bb5f6a68abd20485c0d9f922e7798ad9cbdf4af6bc9a6dbb0ffb3a1a01421f
|
| 3 |
+
size 41429217280
|