Commit 40920c2
committed
Remove 4-GPU limit and support unlimited GPUs with optional limiting
- Remove arbitrary limit of 4 GPUs - now uses ALL available GPUs by default
- Add --max-gpus/-g flag to optionally limit the number of GPUs used
- Update both run_llm_stylometry.sh and generate_figures.py with new flag
- Pass MAX_GPUS environment variable through to main.py
- Show appropriate message when GPU usage is limited vs using all GPUs
Usage examples:
- ./run_llm_stylometry.sh -t # Use all available GPUs
- ./run_llm_stylometry.sh -t -g 2 # Limit to 2 GPUs
- python code/generate_figures.py --train --max-gpus 4 # Limit to 4 GPUs
This allows better scalability on large GPU clusters while still allowing
users to limit GPU usage if they need to share resources.1 parent d8defd2 commit 40920c2
3 files changed
+32
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
81 | 85 | | |
82 | 86 | | |
83 | 87 | | |
| |||
194 | 198 | | |
195 | 199 | | |
196 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
197 | 208 | | |
198 | 209 | | |
199 | 210 | | |
| |||
211 | 222 | | |
212 | 223 | | |
213 | 224 | | |
214 | | - | |
| 225 | + | |
215 | 226 | | |
216 | 227 | | |
217 | 228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | | - | |
304 | | - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
305 | 310 | | |
306 | 311 | | |
307 | 312 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
51 | | - | |
| 52 | + | |
| 53 | + | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| |||
278 | 280 | | |
279 | 281 | | |
280 | 282 | | |
| 283 | + | |
281 | 284 | | |
282 | 285 | | |
283 | 286 | | |
| |||
301 | 304 | | |
302 | 305 | | |
303 | 306 | | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
304 | 311 | | |
305 | 312 | | |
306 | 313 | | |
| |||
410 | 417 | | |
411 | 418 | | |
412 | 419 | | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
413 | 424 | | |
414 | 425 | | |
415 | 426 | | |
| |||
0 commit comments