torchchat
torchchat copied to clipboard
Distributed inference runtime error
🐛 Describe the bug
When trying to run distributed/run_dist_inference.sh . It has below error. [rank0]:[rank0]: model = _load_model(builder_args) [rank0]:[rank0]: File "/scratch/grace/torchchat/torchchat/cli/builder.py", line 473, in _load_model [rank0]:[rank0]: model = _maybe_parellelize_model(model, builder_args, world_mesh, parallel_dims) [rank0]:[rank0]: File "/scratch/grace/torchchat/torchchat/cli/builder.py", line 460, in _maybe_parellelize_model [rank0]:[rank0]: parallelize_llama(model, world_mesh, parallel_dims) [rank0]:[rank0]: File "/scratch/grace/torchchat/distributed/parallelize_llama.py", line 124, in parallelize_llama [rank0]:[rank0]: model = apply_tp(model, world_mesh) [rank0]:[rank0]: File "/scratch/grace/torchchat/distributed/parallelize_llama.py", line 69, in apply_tp [rank0]:[rank0]: for transformer_block in model.layers: [rank0]:[rank0]: File "/opt/conda/envs/ptca/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1729, in getattr [rank0]:[rank0]: raise AttributeError(f"'{type(self).name}' object has no attribute '{name}'") [rank0]:[rank0]: AttributeError: 'TextOnlyModel' object has no attribute 'layers'
Versions
PyTorch version: 2.4.1+cu121 Is debug build: False CUDA used to build PyTorch: 12.1 ROCM used to build PyTorch: N/A
OS: Ubuntu 20.04.6 LTS (x86_64) GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0 Clang version: Could not collect CMake version: version 3.26.0 Libc version: glibc-2.31
Python version: 3.10.14 (main, May 6 2024, 19:42:50) [GCC 11.2.0] (64-bit runtime) Python platform: Linux-5.15.0-1045-azure-x86_64-with-glibc2.31 Is CUDA available: True CUDA runtime version: 12.1.105 CUDA_MODULE_LOADING set to: LAZY GPU models and configuration: GPU 0: NVIDIA A100 80GB PCIe GPU 1: NVIDIA A100 80GB PCIe GPU 2: NVIDIA A100 80GB PCIe GPU 3: NVIDIA A100 80GB PCIe
Nvidia driver version: 535.86.10 cuDNN version: Probably one of the following: /usr/lib/x86_64-linux-gnu/libcudnn.so.8.9.0 /usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.9.0 /usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.9.0 /usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.9.0 /usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.9.0 /usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.9.0 /usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.9.0 HIP runtime version: N/A MIOpen runtime version: N/A Is XNNPACK available: True
CPU: Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian Address sizes: 48 bits physical, 48 bits virtual CPU(s): 96 On-line CPU(s) list: 0-95 Thread(s) per core: 1 Core(s) per socket: 48 Socket(s): 2 NUMA node(s): 4 Vendor ID: AuthenticAMD CPU family: 25 Model: 1 Model name: AMD EPYC 7V13 64-Core Processor Stepping: 1 CPU MHz: 2445.443 BogoMIPS: 4890.88 Hypervisor vendor: Microsoft Virtualization type: full L1d cache: 3 MiB L1i cache: 3 MiB L2 cache: 48 MiB L3 cache: 384 MiB NUMA node0 CPU(s): 0-23 NUMA node1 CPU(s): 24-47 NUMA node2 CPU(s): 48-71 NUMA node3 CPU(s): 72-95 Vulnerability Gather data sampling: Not affected Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Not affected Vulnerability Retbleed: Not affected Vulnerability Spec store bypass: Vulnerable Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Mitigation; Retpolines, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl tsc_reliable nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core invpcid_single vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves clzero xsaveerptr rdpru arat umip vaes vpclmulqdq rdpid fsrm
Versions of relevant libraries: [pip3] numpy==1.23.5 [pip3] onnx==1.16.2 [pip3] onnxruntime-training==1.18.0 [pip3] pytorch-lightning==1.9.5 [pip3] torch==2.4.1 [pip3] torch-nebula==0.16.13 [pip3] torch-ort==1.18.0 [pip3] torch-tb-profiler==0.4.3 [pip3] torchao==0.5.0 [pip3] torchaudio==2.4.1 [pip3] torchdata==0.7.1 [pip3] torchmetrics==1.2.0 [pip3] torchsnapshot==0.1.0 [pip3] torchtune==0.3.0 [pip3] torchvision==0.19.1 [pip3] triton==3.0.0 [conda] magma-cuda121 2.6.1 1 pytorch [conda] mkl 2022.2.1 pypi_0 pypi [conda] mkl-include 2022.2.1 pypi_0 pypi [conda] numpy 1.23.5 pypi_0 pypi [conda] pytorch-lightning 1.9.5 pypi_0 pypi [conda] torch 2.4.1 pypi_0 pypi [conda] torch-nebula 0.16.13 pypi_0 pypi [conda] torch-ort 1.18.0 pypi_0 pypi [conda] torch-tb-profiler 0.4.3 pypi_0 pypi [conda] torchao 0.5.0 pypi_0 pypi [conda] torchaudio 2.4.1 pypi_0 pypi [conda] torchdata 0.7.1 pypi_0 pypi [conda] torchmetrics 1.2.0 pypi_0 pypi [conda] torchsnapshot 0.1.0 pypi_0 pypi [conda] torchtune 0.3.0 pypi_0 pypi [conda] torchvision 0.19.1 pypi_0 pypi [conda] triton 3.0.0 pypi_0 pypi