Linly icon indicating copy to clipboard operation
Linly copied to clipboard

直接加载ChatLLaMA-zh-7B模型失败

Open 15810856129 opened this issue 3 years ago • 12 comments

[2023-03-29 23:51:48,504] [INFO] [comm.py:634:init_distributed] Not using the DeepSpeed or dist launchers, attempting to detect MPI environment... [2023-03-29 23:51:49,947] [INFO] [comm.py:688:mpi_discovery] Discovered MPI settings of world_rank=0, local_rank=0, world_size=1, master_addr=10.163.165.254, master_port=29500 [2023-03-29 23:51:49,947] [INFO] [comm.py:652:init_distributed] Initializing TorchBackend in DeepSpeed with backend nccl [2023-03-29 23:51:50,194] [INFO] [logging.py:93:log_dist] [Rank 0] DeepSpeed info: version=0.8.3, git-hash=unknown, git-branch=unknown Traceback (most recent call last): File "scripts/generate_lm_deepspeed.py", line 46, in model = deepspeed.init_inference(model=model, mp_size=args.mp_size, replace_method=None) File "/home/hdp-nlu/xiebin1-data/chatglm-6b/miniconda3/envs/py38-chatLLaMA/lib/python3.8/site-packages/deepspeed/init.py", line 309, in init_inference ds_inference_config = DeepSpeedInferenceConfig(**config_dict) File "/home/hdp-nlu/xiebin1-data/chatglm-6b/miniconda3/envs/py38-chatLLaMA/lib/python3.8/site-packages/deepspeed/runtime/config_utils.py", line 62, in init super().init(**data) File "pydantic/main.py", line 341, in pydantic.main.BaseModel.init pydantic.error_wrappers.ValidationError: 1 validation error for DeepSpeedInferenceConfig replace_method none is not an allowed value (type=type_error.none.not_allowed)

15810856129 avatar Mar 29 '23 15:03 15810856129

我也遇到这个问题了

pan-2001 avatar Mar 30 '23 07:03 pan-2001

换成generate_lm.py推理脚本试一下?


发件人: louisxavier123 @.> 发送时间: Thursday, March 30, 2023 3:35:45 PM 收件人: ydli-ai/Chinese-ChatLLaMA @.> 抄送: Subscribed @.***> 主题: Re: [ydli-ai/Chinese-ChatLLaMA] 直接加载ChatLLaMA-zh-7B模型失败 (Issue #1)

我也遇到这个问题了

― Reply to this email directly, view it on GitHubhttps://github.com/ydli-ai/Chinese-ChatLLaMA/issues/1#issuecomment-1489834283, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AE3SPV73GGBG4QENQJJSLNLW6UZVDANCNFSM6AAAAAAWMCW3CM. You are receiving this because you are subscribed to this thread.Message ID: @.***>

ydli-ai avatar Mar 30 '23 07:03 ydli-ai

设备显存限制,换成不使用deepspeed会出现oom的问题,所以得用deepspeed启动

pan-2001 avatar Mar 30 '23 07:03 pan-2001

换成generate_lm.py推理脚本试一下? ________________________________ 发件人: louisxavier123 @.> 发送时间: Thursday, March 30, 2023 3:35:45 PM 收件人: ydli-ai/Chinese-ChatLLaMA @.> 抄送: Subscribed @.> 主题: Re: [ydli-ai/Chinese-ChatLLaMA] 直接加载ChatLLaMA-zh-7B模型失败 (Issue #1) 我也遇到这个问题了 ― Reply to this email directly, view it on GitHub<#1 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AE3SPV73GGBG4QENQJJSLNLW6UZVDANCNFSM6AAAAAAWMCW3CM. You are receiving this because you are subscribed to this thread.Message ID: @.>

请问下你们使用的deepspeed是哪个版本?

dtxwhzw avatar Mar 30 '23 07:03 dtxwhzw

0.8.3,应该是最新版

pan-2001 avatar Mar 30 '23 08:03 pan-2001

0.8.3,应该是最新版

尝试回退一个版本,0.8.2

15810856129 avatar Mar 30 '23 08:03 15810856129

版本没问题了,但是请问我用40G的A100都会出现OOM,配置文件的多卡部署应该怎么调?这个deepspeed的调用方法和我之前用的不太一样,我自己之前的方法好像用不了了

pan-2001 avatar Mar 30 '23 08:03 pan-2001

版本没问题了,但是请问我用40G的A100都会出现OOM,配置文件的多卡部署应该怎么调?这个deepspeed的调用方法和我之前用的不太一样,我自己之前的方法好像用不了了

world_size 应该是调卡的数量,batch_size调下先跑起来。我也是2张40G的A100,bsz调成16跑起来了。

15810856129 avatar Mar 30 '23 08:03 15810856129

版本没问题了,但是请问我用40G的A100都会出现OOM,配置文件的多卡部署应该怎么调?这个deepspeed的调用方法和我之前用的不太一样,我自己之前的方法好像用不了了

world_size 应该是调卡的数量,batch_size调下先跑起来。我也是2张40G的A100,bsz调成16跑起来了。

不好意思,我现在还在推理的generate阶段,代码里面没有这些参数

pan-2001 avatar Mar 30 '23 08:03 pan-2001

试着将这个参数改小点,默认是128,--seq_length。

15810856129 avatar Mar 30 '23 09:03 15810856129

版本没问题了,但是请问我用40G的A100都会出现OOM,配置文件的多卡部署应该怎么调?这个deepspeed的调用方法和我之前用的不太一样,我自己之前的方法好像用不了了

world_size 应该是调卡的数量,batch_size调下先跑起来。我也是2张40G的A100,bsz调成16跑起来了。

不好意思,我现在还在推理的generate阶段,代码里面没有这些参数

试着将这个参数改小点,默认是128,--seq_length。

15810856129 avatar Mar 30 '23 09:03 15810856129

我在按流程加载7B的模型时也失败,使用generate_lm_deepspeed.py可以加载模型,generate_lm.py加载模型OOM,作者给的generate_chatllama.py脚本也会OOM。然后我按照generate_lm_deepspeed.py的方式对对generate_chatllama.py进行了修改,还是加载不了。有可以正常跑generate_chatllama.py的朋友么?

hepj987 avatar Apr 15 '23 07:04 hepj987