DeepSpeed-MII DeepSpeed bug multi-gpu in single node

k10s72fa  于 4个月前  发布在  其他
关注(0)|答案(1)|浏览(78)

我有一个运行在g4dn.12xlarge上的代码,使用了Nvidia T4 GPU(4 x 16 GB)~ 64 GB。

问题

我的代码:

import mii

model = "meta-llama/Llama-2-13b-chat-hf"

mii_configs = {
    "tensor_parallel": 4,
    "dtype": "fp16",
    "enable_restful_api": True,
    "trust_remote_code": True,
    "skip_model_check": True,
    "max_tokens": 200,
    "load_with_sys_mem": True,
    "deploy_rank": [0,1,2,3]
}

mii.deploy(
    task="text-generation",
    model=model,
    deployment_name=f"meta-llama-2-13b-deployment",
    mii_config=mii_configs,
    deployment_type=mii.constants.DeploymentType.LOCAL
)

然后我使用deepspeed运行它。

deepspeed --num_gpus 4 main.py

但是当我检查日志时,它显示

[2023-10-29 12:12:54,160] [INFO] [runner.py:570:main] cmd = /home/ubuntu/deepspeed/venv/bin/python3 -u -m deepspeed.launcher.launch --world_info=eyJsb2NhbGhvc3QiOiBbMCwgMSwgMiwgM119 --master_addr=0.0.0.0 --master_port=29500 --no_python --no_local_rank --enable_each_rank_log=None /home/ubuntu/deepspeed/venv/bin/python3 -m mii.launch.multi_gpu_server --deployment-name bloom-560m-deployment --load-balancer-port 50050 --restful-gateway-port 51080 --server-port 50051 --model-config eyJtb2RlbCI6ICJtZXRhLWxsYW1hL0xsYW1hLTItMTNiLWNoYXQtaGYiLCAidGFzayI6ICJ0ZXh0LWdlbmVyYXRpb24iLCAiZHR5cGUiOiAidG9yY2guZmxvYXQxNiIsICJtb2RlbF9wYXRoIjogIi90bXAvbWlpX21vZGVscyIsICJsb2FkX3dpdGhfc3lzX21lbSI6IHRydWUsICJtZXRhX3RlbnNvciI6IGZhbHNlLCAiZGVwbG95X3JhbmsiOiBbMCwgMSwgMiwgM10sICJ0b3JjaF9kaXN0X3BvcnQiOiAyOTUwMCwgInJlcGxpY2FfbnVtIjogMSwgInJlcGxpY2FfY29uZmlncyI6IFt7Imhvc3RuYW1lIjogImxvY2FsaG9zdCIsICJ0ZW5zb3JfcGFyYWxsZWxfcG9ydHMiOiBbNTAwNTEsIDUwMDUyLCA1MDA1MywgNTAwNTRdLCAidG9yY2hfZGlzdF9wb3J0IjogMjk1MDAsICJncHVfaW5kaWNlcyI6IFswLCAxLCAyLCAzXX1dLCAicHJvZmlsZV9tb2RlbF90aW1lIjogZmFsc2UsICJza2lwX21vZGVsX2NoZWNrIjogdHJ1ZSwgImhmX2F1dGhfdG9rZW4iOiBudWxsLCAidHJ1c3RfcmVtb3RlX2NvZGUiOiB0cnVlLCAicGlwZWxpbmVfa3dhcmdzIjoge30sICJlbmFibGVfZGVlcHNwZWVkIjogdHJ1ZSwgImVuYWJsZV96ZXJvIjogZmFsc2UsICJkc19jb25maWciOiB7fSwgInRlbnNvcl9wYXJhbGxlbCI6IDQsICJlbmFibGVfY3VkYV9ncmFwaCI6IGZhbHNlLCAicmVwbGFjZV93aXRoX2tlcm5lbF9pbmplY3QiOiB0cnVlLCAiY2hlY2twb2ludF9kaWN0IjogbnVsbCwgIm1heF90b2tlbnMiOiAyMDB9
[2023-10-29 12:12:54,211] [WARNING] [config_utils.py:69:_process_deprecated_field] Config parameter hf_auth_token is deprecated. Parameter will be removed. Please use the `pipeline_kwargs` field to pass kwargs to the HuggingFace pipeline creation.
[2023-10-29 12:12:54,211] [WARNING] [config_utils.py:69:_process_deprecated_field] Config parameter trust_remote_code is deprecated. Parameter will be removed. Please use the `pipeline_kwargs` field to pass kwargs to the HuggingFace pipeline creation.
Starting RESTful API gateway on port: 51080
Address already in use

...
[2023-10-29 12:15:09,407] [INFO] [server.py:63:_wait_until_server_is_live] waiting for server to start...
Traceback (most recent call last):
  File "/home/ubuntu/deepspeed/main.py", line 17, in <module>
    mii.deploy(
  File "/home/ubuntu/deepspeed/venv/lib/python3.11/site-packages/mii/deployment.py", line 89, in deploy
    _deploy_local(mii_config)
  File "/home/ubuntu/deepspeed/venv/lib/python3.11/site-packages/mii/deployment.py", line 95, in _deploy_local
    mii.utils.import_score_file(mii_config.deployment_name, DeploymentType.LOCAL).init()
  File "/tmp/mii_cache/bloom-560m-deployment/score.py", line 33, in init
    mii.MIIServer(mii_config)
  File "/home/ubuntu/deepspeed/venv/lib/python3.11/site-packages/mii/server.py", line 47, in __init__
    self._wait_until_server_is_live(processes,
  File "/home/ubuntu/deepspeed/venv/lib/python3.11/site-packages/mii/server.py", line 60, in _wait_until_server_is_live
    raise RuntimeError(
RuntimeError: server crashed for some reason, unable to proceed

...
[2023-10-29 12:15:14,223] [INFO] [launch.py:315:sigkill_handler] Killing subprocess 105174
[2023-10-29 12:15:14,236] [INFO] [launch.py:315:sigkill_handler] Killing subprocess 105175
[2023-10-29 12:15:14,247] [INFO] [launch.py:315:sigkill_handler] Killing subprocess 105176
[2023-10-29 12:15:14,258] [INFO] [launch.py:324:sigkill_handler] Main process received SIGTERM, exiting
[2023-10-29 12:15:14,656] [ERROR] [launch.py:321:sigkill_handler] ['/home/ubuntu/deepspeed/venv/bin/python3', '-u', 'main.py', '--local_rank=3'] exits with return code = 1

它显示地址已在使用中

Deepspeed环境报告

(venv) ubuntu@ip-172-31-1-47:~/deepspeed$ python -m deepspeed.env_report
[2023-10-30 03:24:00,505] [INFO] [real_accelerator.py:158:get_accelerator] Setting ds_accelerator to cuda (auto detect)
--------------------------------------------------
DeepSpeed C++/CUDA extension op report
--------------------------------------------------
NOTE: Ops not installed will be just-in-time (JIT) compiled at
      runtime if needed. Op compatibility means that your system
      meet the required dependencies to JIT install the op.
--------------------------------------------------
JIT compiled ops requires ninja
ninja .................. [OKAY]
--------------------------------------------------
op name ................ installed .. compatible
--------------------------------------------------
async_io ............... [NO] ....... [OKAY]
fused_adam ............. [NO] ....... [OKAY]
cpu_adam ............... [NO] ....... [OKAY]
cpu_adagrad ............ [NO] ....... [OKAY]
cpu_lion ............... [NO] ....... [OKAY]
 [WARNING]  Please specify the CUTLASS repo directory as environment variable $CUTLASS_PATH
evoformer_attn ......... [NO] ....... [NO]
fused_lamb ............. [NO] ....... [OKAY]
fused_lion ............. [NO] ....... [OKAY]
quantizer .............. [NO] ....... [OKAY]
random_ltd ............. [NO] ....... [OKAY]
 [WARNING]  sparse_attn requires a torch version >= 1.5 and < 2.0 but detected 2.1
 [WARNING]  using untested triton version (2.1.0), only 1.0.0 is known to be compatible
sparse_attn ............ [NO] ....... [NO]
spatial_inference ...... [NO] ....... [OKAY]
transformer ............ [NO] ....... [OKAY]
stochastic_transformer . [NO] ....... [OKAY]
transformer_inference .. [NO] ....... [OKAY]
--------------------------------------------------
DeepSpeed general environment info:
torch install path ............... ['/home/ubuntu/deepspeed/venv/lib/python3.11/site-packages/torch']
torch version .................... 2.1.0+cu121
deepspeed install path ........... ['/home/ubuntu/deepspeed/venv/lib/python3.11/site-packages/deepspeed']
deepspeed info ................... 0.11.1, unknown, unknown
torch cuda version ............... 12.1
torch hip version ................ None
nvcc version ..................... 12.1
deepspeed wheel compiled w. ...... torch 0.0, cuda 0.0
shared memory (/dev/shm) size .... 93.30 GB

问题

为什么没有使用负载均衡器端口?谢谢

ghg1uchk

ghg1uchk1#

对于这种问题,有什么建议吗?我似乎从文档中丢失了关于多GPU的翻译,因为在同一服务器上没有相关联的文档。

相关问题