This repository was archived by the owner on Sep 10, 2025. It is now read-only.
Commit 9af34c1
Integrate distributed inference into torchchat cli (#1327)
* add pp_dim, distributed, num_gpus, num_nodes as cmd line args
* add tp_dim
* add elastic_launch
* working, can now launch from cli
* Remove numpy < 2.0 pin to align with pytorch (#1301)
Fix #1296
Align with https://github.com/pytorch/pytorch/blame/main/requirements.txt#L5
* Update torchtune pin to 0.4.0-dev20241010 (#1300)
Co-authored-by: vmpuri <[email protected]>
* Unbreak gguf util CI job by fixing numpy version (#1307)
Setting numpy version to be the range required by gguf: https://github.com/ggerganov/llama.cpp/blob/master/gguf-py/pyproject.toml
* Remove apparently-unused import torchvision in model.py (#1305)
Co-authored-by: vmpuri <[email protected]>
* remove global var for tokenizer type + patch tokenizer to allow list of sequences
* make pp tp visible in interface
* Add llama 3.1 to dist_run.py
* [WIP] Move dist inf into its own generator
* Add initial generator interface to dist inference
* Added generate method and placeholder scheduler
* use prompt parameter for dist generation
* Enforce tp>=2
* Build tokenizer from TokenizerArgs
* Disable torchchat format + constrain possible models for distributed
* disable calling dist_run.py directly for now
* Restore original dist_run.py for now
* disable _maybe_parallelize_model again
* Reenable arg.model_name in dist_run.py
* Use singleton logger instead of print in generate
* Address PR comments; try/expect in launch_dist_inference; added comments
---------
Co-authored-by: lessw2020 <[email protected]>
Co-authored-by: Mengwei Liu <[email protected]>
Co-authored-by: vmpuri <[email protected]>
Co-authored-by: vmpuri <[email protected]>
Co-authored-by: Scott Wolchok <[email protected]>1 parent 7fe2c86 commit 9af34c1
File tree
6 files changed
+1010
-53
lines changed- torchchat
- cli
- distributed
6 files changed
+1010
-53
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | 23 | | |
26 | 24 | | |
27 | 25 | | |
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
| 29 | + | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
157 | 159 | | |
158 | 160 | | |
159 | 161 | | |
| |||
593 | 595 | | |
594 | 596 | | |
595 | 597 | | |
| 598 | + | |
596 | 599 | | |
597 | 600 | | |
598 | 601 | | |
| 602 | + | |
599 | 603 | | |
600 | 604 | | |
601 | 605 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | 19 | | |
| 20 | + | |
| 21 | + | |
24 | 22 | | |
25 | | - | |
26 | | - | |
27 | | - | |
| 23 | + | |
28 | 24 | | |
29 | 25 | | |
30 | 26 | | |
31 | | - | |
32 | | - | |
33 | 27 | | |
34 | 28 | | |
35 | 29 | | |
| |||
40 | 34 | | |
41 | 35 | | |
42 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
58 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
59 | 64 | | |
60 | 65 | | |
61 | 66 | | |
| |||
87 | 92 | | |
88 | 93 | | |
89 | 94 | | |
90 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
91 | 98 | | |
92 | 99 | | |
93 | 100 | | |
| |||
153 | 160 | | |
154 | 161 | | |
155 | 162 | | |
156 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
157 | 168 | | |
158 | 169 | | |
159 | 170 | | |
| |||
167 | 178 | | |
168 | 179 | | |
169 | 180 | | |
170 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
171 | 185 | | |
172 | 186 | | |
173 | 187 | | |
| |||
397 | 411 | | |
398 | 412 | | |
399 | 413 | | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
404 | 418 | | |
405 | 419 | | |
406 | 420 | | |
| |||
476 | 490 | | |
477 | 491 | | |
478 | 492 | | |
479 | | - | |
| 493 | + | |
480 | 494 | | |
481 | 495 | | |
482 | | - | |
483 | | - | |
| 496 | + | |
| 497 | + | |
484 | 498 | | |
485 | 499 | | |
486 | | - | |
| 500 | + | |
487 | 501 | | |
488 | 502 | | |
489 | 503 | | |
490 | 504 | | |
| 505 | + | |
491 | 506 | | |
492 | 507 | | |
493 | 508 | | |
| |||
496 | 511 | | |
497 | 512 | | |
498 | 513 | | |
499 | | - | |
500 | 514 | | |
501 | 515 | | |
502 | 516 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
402 | | - | |
403 | | - | |
| 402 | + | |
404 | 403 | | |
405 | 404 | | |
406 | 405 | | |
| |||
409 | 408 | | |
410 | 409 | | |
411 | 410 | | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
412 | 432 | | |
413 | 433 | | |
414 | 434 | | |
| |||
425 | 445 | | |
426 | 446 | | |
427 | 447 | | |
428 | | - | |
| 448 | + | |
429 | 449 | | |
430 | 450 | | |
431 | 451 | | |
432 | 452 | | |
433 | 453 | | |
434 | | - | |
| 454 | + | |
435 | 455 | | |
436 | 456 | | |
437 | 457 | | |
| |||
0 commit comments